Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


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


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

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

#1 sap   Members   -  Reputation: 115

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: 20409

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



#3 sap   Members   -  Reputation: 115

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!






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS