Thanks for the reply, but unfortunately it's not the problem. My znear is very small (like 5 cm), and here the distance from camera to terrain is like 2 meters. Usually if I move forward everything is fine, but when I move backwards sometimes a big part of terrain is not rendered.
I'm using Irrlicht FPP camera, but I set camera position manually (because Bullet controlls player's position) via camera->setPosition(). When I move forward everything is fine, but when I move backwards, a part of terrain seems to be not updated properly and is just not rendered (probably ...
So I disabled shadow volumes, but unfortunately the problem is still there.
I set GouraudShading to true for all model's materials. I replaced directional light with point light, to make sure it's not caused by bugged OpenGL directional light. I tried recalculating normals ...
But how? In Blender everything looks fine. In Irrlicht I used setPosition() on whole node, and new position is set correctly, except feet have some offset relative to the body position.
I see the bug, but don't seem to have an .X exporter in Blender. Where did you get yours from? Blender does have a .x exporter but it's not enabled by default. You have to enable it in File->User Preferences->Addons->Search for "directx"
edit: If you still have a dxviewer from old Microsoft sdk ...
I exported this model using Blender to .x file: blend: https://dl.dropboxusercontent.com/u/12301540/misc/zombie.blend x: https://dl.dropboxusercontent.com/u/12301540/misc/zombie.x
With the following export options: http://img713.imageshack.us/img713/3366/7gj9.png
I tried setting lower 'infinite' value passed to createShadowVolumeSceneNode() and it fixed the problem.
These shadow volumes are extremely slow though, I use 16 vertices shadow mesh and for like 10 meshes the framerate drops significantly, so I guess shadow volumes aren't very useful ...
Thanks. Changing light direction indeed solved the problem. But it's still worying that there are some angles at which sharp edges occur - I'm not using flat shading so it should never occur, should it?
Is it better (or faster) to write custom per-pixel shader for directional lighting?
I'd really like to keep the smoothing factor, since I need this in my project too. Otherwise terrain is too bumpy.
@ralian I'd also be very happy if you could fix this bug. The problem seems trivial, but in my case it's very problematic. As I said before, I can't scale the ...
Hello. I read somewhere that Irrlicht terrain scene node has exactly the same size in units as height map texture used to generate the terrain. However, it's not true in my case. I'm using code from this example: http://irrlicht.sourceforge.net/docu/example012.html And I changed terrain scale to 1 ...