Jump to content

How can multiple lights be displayed in a scene


Dong
 Share

Recommended Posts

44359BB9-F637-4f7f-9056-1683C5216E29.png.a9dbbc4f8fad0bee6c9ccce93b1b14c6.png

In my business, I want to show the lighting effect as shown in the picture.Unfortunately, at present the material can only accept 10 lights max(I need more than 50).
I can set the glowLayer and the billBoard to simulate halo effect.
but i cant't simulate the materials effected by the true light,especially the water...
can anyone help me?

Link to comment
Share on other sites

8 hours ago, Deltakosh said:

Hello Dong!

So technically you will have to split the water into multiple meshes and then use includedOnlyMeshes property of the light to define which mesh should be lit by the given light (http://doc.babylonjs.com/babylon101/lights#choosing-meshes-to-light)

 

but the "excludeMeshes,includedOnlyMeshes" for light is also max to 10,when my lights more than 10,how can i decide which mesh will be lighted,and How did it look as though he was illuminated by real light

Link to comment
Share on other sites

technically 10 is not the limit. If your material is simple you can even generate 16 lights (with material.maxSimultaneousLights property)

But as @V!nc3r mentioned, the best option is to limit the active lights per mesh 

Link to comment
Share on other sites

@Deltakosh
When material.maxSimultaneousLights  more than 10 , the shader will report an error as shown
image.png.29ad3fa57160323c65138c93b538e5c5.png

@V!nc3r
Thank you for your response, but it helps with performance only, there is always a number bottleneck of 10.

I can't. I'll create another fake billBoard at the bottom  of each pole

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