Jump to content

Best way to create lamp


Hersir
 Share

Recommended Posts

Hi again, Hersir!  I like this one...

https://www.babylonjs-playground.com/#1GUOCF#9

MIGHT crash FF occasionally.  Keep trying.  MY Firefox has been getting out-of-memory and many garbage collection pauses, lately.  Not sure why.

No transparency involved in this lamp... because... BJS lights shine right through ANY mesh that isn't included in a shadow map/generator.

Just a pointLight inside a sphere, with a little highlightLayer glow, and a shadowGenerator for that light... and a .range set on the light... and there's an optional lens flare system nearby, in case you want to play with that. 

The "bulb" sphere is lit via self-illumination (material.emissiveColor)... an easy way to deal-with that task  If you wish-to light the bulb via the pointLight located inside it (using .diffuseColor instead of .emissiveColor), then you might need to create the bulb sphere... as "doublesided".  I'll let YOU play with that challenge, if you want-to.  :) 

Hope this helps.  Others may have better ideas.  Party on!

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...