assimp + sponza scene - texture or vertex corruption when looking from afar

Started by
1 comment, last by sap 9 years, 7 months ago

Hello,

im trying to load the sponza scene using opengl and the assimp library. but some texture and models become full of artifacts when im looking from a far.

i create mipmaps for every texture in the scene. i create 1 VAO, 1 VBO and 1 IBO for each mesh in the scene (about 78 total according to opengldebugcallback message).

i clear color, depth and stencil every frame. i also set the culling mode as:

glEnable(GL_CULL_FACE);

glFrontFace(GL_CCW);

but as you can see from the images, when im close the the lion head everything seems good, but i move away from it and i get all these issues. the same for the green and red textures on the walls (they look fine when close them).

also this bug doesnt happen with anything else like the walls, doors, windows, etc.

is there something im missing?

Advertisement

Research Z-fighting.

Change your near plane to something such as 1.0f, 2.0f, 5.0f, or 10.0f, and don’t set your far plane ridiculously far away.

L. Spiro

I restore Nintendo 64 video-game OST’s into HD! https://www.youtube.com/channel/UCCtX_wedtZ5BoyQBXEhnVZw/playlists?view=1&sort=lad&flow=grid

thanks for the tip, i had no idea about that phenomenon.

works fine now, thanks a lot!

This topic is closed to new replies.

Advertisement