I’m making a 90s FPS style game and using the shadowGenerator doesn’t produce sharp shadows (well it does but I have to increase the size of the shadow map and it kills performance for me with lots of shadows)
My question is would it be possible to do something like the BUILD engine (Duke Nukem, Blood etc), that is manually placing all of the shadows?
Where I create a “shadow mesh” - that is if it mesh overlaps with another mesh it changes the color to its color (e.g. so you would set the shadow mesh to black with a transparency of 0.5) - this would give me the sharp angles for shadows I believe.
I’ve seen shaders written in Unity to do this, but before I start trying to figure how to do it in Babylon - I was wondering if anyone could give me feedback in terms of this being a good idea for performance?
Hi, I was creating a force field these days and it seems similar like your blender generated image. So maybe you can place spheres in the corners where you want the desired shadow effect and create a node material for that sphere to achieve the effect quite easily.
I’m not sure I understand fully your question, but in those old days we used the vertex colors to add some shadowing to meshes. Shadow generators are for dynamic shadows, if you only want static shadows, vertex colors or lightmaps may be what you need. A minimal repro in the Playground may also help to better understand your needs.
I get it, so you have the geometry adapted to your needs and your lights are static I suppose, so this is working and I think it’s a quite good and optimized solution, if you have time to modify your meshes. I like this approach, for a small level it might work. However I was confused by the term vertex colors.
Thanks for sharing!
R.