Jump to content

  • Log In with Google      Sign In   
  • Create Account

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

  • You cannot reply to this topic
2 replies to this topic

#1 sap   Members   -  Reputation: 111

Like
0Likes
Like

Posted 26 August 2014 - 01:08 PM

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?

Attached Thumbnails

  • close.png
  • far.png
  • far2.png


Sponsor:

#2 L. Spiro   Crossbones+   -  Reputation: 13600

Like
4Likes
Like

Posted 26 August 2014 - 02:17 PM

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


It is amazing how often people try to be unique, and yet they are always trying to make others be like them. - L. Spiro 2011
I spent most of my life learning the courage it takes to go out and get what I want. Now that I have it, I am not sure exactly what it is that I want. - L. Spiro 2013
I went to my local Subway once to find some guy yelling at the staff. When someone finally came to take my order and asked, “May I help you?”, I replied, “Yeah, I’ll have one asshole to go.”
L. Spiro Engine: http://lspiroengine.com
L. Spiro Engine Forums: http://lspiroengine.com/forums

#3 sap   Members   -  Reputation: 111

Like
0Likes
Like

Posted 26 August 2014 - 03:28 PM

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

 

works fine now, thanks a lot!







PARTNERS