Jump to content

Why the 4 light limit? [EDIT: Limit has been increased!]


Dal
 Share

Recommended Posts

I am playing with babylon-js to render a 3D perspective of 1000 of our nearest solar neighbours at:

www.inthesky.xyz

At the moment, the stars look like billiard balls, centred in each sphere there is a point light x 1000 [ 1000 stars]

 var light = new BABYLON.PointLight("Omni", new BABYLON.Vector3(x, y, z), scene);

Is there a way to make the sphere's material transparent to make the billiard balls look more like stars?

Link to comment
Share on other sites

(Wingy hugs DK for being off-topic cordial)  :)

Hey tg, I was able to browse your project, and it is COOOL.  I like it.  (and welcome to the forum) 

Um, perhaps you should start a new topic in Questions and Answers...  maybe call it "Ongoing Questions - In The Sky Project"  (or similar)  (if you wish).  I think lots of people would like to hear about it, and help if they could.

Link to comment
Share on other sites

@tg121268 Hey, your project looks cool!

As much as I was trying to argue in this thread that we DO need more than 4 lights per object in some scenes, I don't think your example is a good case for that.
Dynamic lights are expensive and you don't need them unless you need to have them cast light on something else that is moving around the scene. Your stars don't really need to light up anything else, they just need to look bright in themselves, and that's a different trick.

For your stars, you can just give them a bright colour and emissive texture to look bright and possibly use a bloom shader: http://www.babylonjs.com/Demos/PPBloom/
You can also use a billboard texture behind the star or a shader effect to make it look like it has an aura, take a look at davrous' cool example of a star:

 

Link to comment
Share on other sites

  • 2 weeks later...

Holy crap, @Deltakosh  I didn't see this til now, when @adam pointed it out.  Unbelievable!   How the heck?  Sigh.  Wow!

Friggin' miracle workers!  I bookmarked this 50 times, just to make sure I don't lose it.  :)

Ya know those fountains in fancy places... water jets lit with colored spots... lined-up to make a wall of colored fountains?  yuh yuh yuh, I think it can be done in webGL now.  Particle materials... hmm.

I think I tried shooting particles through a spotlight frustum once... just to see what would happen.  Apparently I wasn't real successful, as I never produced one of my "ridiculous demos" from that.

You genius guys are removing all the "impossible" from impossible things, ya know?  :)

Dk, while I have your ear, would you please check/update the playground tutorial URL that is shown with the PG 'new' button?  thx.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...