Is it possible to make probuilder meshes block lighting on the other side as well? I've tried making the material two-way etc but nothing seems to work. Is it possible somehow? Because if I have an indoor level with windows where I want the sun to shine in, for example, would I have to model out the outside part too, to block the sun leaking into the entire level? Modelling out the entire thing is obviously bad for performance since the player never sees the level from the outside. Adding one huge mesh to the outside to block the sunlight seems also bad for performance. Is it possible somehow to make a mesh that blocks light but doesnt affect the performance at all, doesnt get rendered etc? Or is there a way to make lighting treat meshes two-sided, without any effect on performance?
What are the best options to solve this issue? (keep in mind there can be a level with lots of windows everywhere and other sources of light behind meshes with no backface so how hard would it be to fix this issue for a big level like this. Also for example, a level where you can both be outdoors and indoors. So you definitely need a sun, but then when you go indoors you don't want the sun to leak in there through the ceiling. And the indoors part isn't fully modeled on the outside at all, only a bit around the entrance part. Imagine its a large indoor part with lots of areas) And how is this issue solved?
#Probuilder walls with two-sided lighting?
1 messages · Page 1 of 1 (latest)
what i would do is have modular walls made of cubes that are just vertex snapped togheder instead of 1 big cube with inverted normals
thats not good for performance though, both of those options. im wonder what the absolute best solution is
there shoulndt be massive performance issues, it actually gives a way better workflow and works rly well with lightmapping and occlusion culling
is there a way to make the walls not render at all? and just block lighting? that way there wouldnt be that much performance impact
you can add the directional light on another light layer and exclude those walls from that layer, but then you wont be able to get any outside lighting
no i mean i want the walls to not render. draw calls and such. meshes affect performance. especially if i make a HUGE one (which is needed to cover an entire huge indoors area)
Hi! 🙂 Funny story, we used to have a volume specifically for "Light Blocking" ... but now there is a more generic way, works with any mesh at all (ProBuilder, imported, standard cubes/etc ... )
- Draw or place a shape that is facing the light source
- In the inspector, look for the "Mesh Renderer" component
- Set "Cast Shadows" to "Shadows Only"
That should do it!
Another option - you can use your existing window, and set "Cast Shadows" to "Two Sided".
the "two sided" option on a mesh does not seem to work for some reason (i also tried setting the material to two sided, still doesn't work). it might be because it doesnt work with baked lighting?
the shadows only method sounds good though, thanks! i assume that when i do this, the only thing that affects performance is the fact that its a gameobject and those have some performance overhead? but apart from that, it doesnt affect drawcalls, doesnt need culling, or anything? so wouldnt it be beneficial to combine all of these into one gameobject to save performance even more? is there any drawback to combining hundreds of these from all across my level into a single gameobject? i know that doing it with regular meshes is bad because then they're rendered all the time and don't get culled. but in this case, it's fine, right?