61
Support / Re: trying to get default shader code
« on: August 13, 2020, 07:58:53 pm »
adding "/" to file name solved my problem, thank you !
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
No, not really. Because these lights still have to be part of the World or otherwise, they won't be processed properly. But if they are part of the World, they will have an influence on all other objects as well. They would limit the lights for one object but not for all the others, which is actually what you want. You could of course use this to add a light list to ALL objects managing them all by yourself, but wouldn't that be a bit tedious?
when the engine select Lights for object3d, (hence there is setDistanceOverride method) can you do this ? -Code: [Select]if (there is light list) test lights in list;
else test all lights in World;Code: [Select]if (this light has object list) { if (object is in list) light on; else light off }
for example, a scene is divided into rooms, a light in a room should not affect objects in another room, even if the light is near to the other room. with Object3D list for Light, this scene can be setup easier.The things is, it's not designed that way. The idea was to have a world filled with lights, just like the real world, and objects moving around which will in turn be affected by the closest light sources. Lights per object were never planned. However, I see your point. I'm just not sure how to handle this. I can't add a list of lights to Object3D, because that would break too many things in the lighting code. The "best hack" that I can come up with ATM is to extend the IRenderHook-interface (or create a LightingHook interface) that allows you to suppress some world lights for an Object3D. That's not that great either, but it would fit the engine's render pipeline...I guess...I have to think about this some more...
if (there is light list) test lights in list;
else test all lights in World;
if (this light has object list) { if (object is in list) light on; else light off }