Using openGL, terrain mesh flickers on camera rotation.

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
AlexAzazel
Posts: 31
Joined: Sun Jan 10, 2016 3:42 pm
Location: Tbilisi

Using openGL, terrain mesh flickers on camera rotation.

Post by AlexAzazel »

I think my problem is similar to this guys problem: http://irrlicht.sourceforge.net/forum/v ... hp?t=23942 but I do have VSync enabled, doesn't help.
Terrain mesh looks fine when I do simple linear motion of a camera with WASD but when I rotate the camera target around its position, the mesh flickers. When I'm using EDT_DIRECT3D9 instead of EDT_OPENGL this problem goes away for addCameraSceneNodeFPS() but them my custom camera fails to rotate at all in full screen mode. So I basically can't find settings where everything will work fine, when I fix one thing the other fails. You can download the project here:
https://github.com/insanewarlock/irrRTS-RTT
(WASD to move around and right click and hold for rotation)

Please move this post to bug reports if you think it's a bug.

What should I try?
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Using openGL, terrain mesh flickers on camera rotation.

Post by CuteAlien »

Sorry, too much code to check this quickly. Try experimenting with near-far-plane when you get flicker, often it's the z-buffer resolution.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Mel
Competition winner
Posts: 2292
Joined: Wed May 07, 2008 11:40 am
Location: Granada, Spain

Re: Using openGL, terrain mesh flickers on camera rotation.

Post by Mel »

Also, don't use scales on the terrain to set its size, that messes the whole visibility checks, instead use the creation parameters to set its size, and keep it fixed if you can.
"There is nothing truly useless, it always serves as a bad example". Arthur A. Schmitt
AlexAzazel
Posts: 31
Joined: Sun Jan 10, 2016 3:42 pm
Location: Tbilisi

Re: Using openGL, terrain mesh flickers on camera rotation.

Post by AlexAzazel »

CuteAlien wrote:Sorry, too much code to check this quickly. Try experimenting with near-far-plane when you get flicker, often it's the z-buffer resolution.
I have only a single plane, you can see it in this video
https://www.youtube.com/watch?v=X7z0bJWDPw8
Though you won't see flickering there since I used DirectX while recording it.
Mel wrote:Also, don't use scales on the terrain to set its size, that messes the whole visibility checks, instead use the creation parameters to set its size, and keep it fixed if you can.
It didn't help.
Post Reply