Lighting and shadows splits surfaces into blocks (Bug?)

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Slywater
Posts: 7
Joined: Fri May 25, 2018 8:09 am

Lighting and shadows splits surfaces into blocks (Bug?)

Post by Slywater »

I have made a randomly generated block-like structure using Lonesome Ducky's BatchingMesh Class.
I believe that it merges the vertices, but the shadows behave as if the blocks are not connected at all.

This is what happens when I set the lvl->setMaterialFlag(EMF_LIGHTING, true) flag (lvl == the grouped meshes):
Image

Instead I tried using lvl->addShadowVolumeSceneNode(), and I saw every outline of every block. I also looked at BlindSide's tutorial on orthogonal shadows, but the tutorial is dated it seems that XEffects doesn't work like that anymore.

I need the game to treat the grouped blocks as one object, and have the lighting cast across the entire surface, no just for each block.
If anyone has a fix or workaround that would be great.
Post Reply