Jump to content

View more

Image of the Day

雑魚は多めにして、爽快感重視にしつつ・・・(´・ω・`)
早いとこ、ベースを作って、完成にもっていかないとね。
タイトルもまだ迷ってるだよなぁ。 
#indiedev  #indiegame #screenshotsaturday https://t.co/IwVbswGrhe
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

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

4: Adsense

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   

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


#2 L. Spiro   Members   

25463
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   

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.