Dong Posted August 2, 2018 Share Posted August 2, 2018 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? Quote Link to comment Share on other sites More sharing options...
Guest Posted August 2, 2018 Share Posted August 2, 2018 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) Quote Link to comment Share on other sites More sharing options...
Dong Posted August 3, 2018 Author Share Posted August 3, 2018 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 Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted August 3, 2018 Share Posted August 3, 2018 Maybe you can make a script which take object center position and try to find lights near this position, then deal with includedOnlyMeshes? Quote Link to comment Share on other sites More sharing options...
Guest Posted August 3, 2018 Share Posted August 3, 2018 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 Quote Link to comment Share on other sites More sharing options...
Dong Posted August 6, 2018 Author Share Posted August 6, 2018 @Deltakosh When material.maxSimultaneousLights more than 10 , the shader will report an error as shown @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 Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted August 6, 2018 Share Posted August 6, 2018 Do you need realtime light positionning? 'cause if not, you can also use lightmap texture baking, and have infinite lights using raytracing render engine (in addition, you also gain realism). Dong 1 Quote Link to comment Share on other sites More sharing options...
Guest Posted August 6, 2018 Share Posted August 6, 2018 @Dong: This is really dependent on the options you have in your materials. So perhaps in your case 10 is the max Dong 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.