Jump to content
  • Advertisement
Sign in to follow this  
SIAS87

models not displaying correctly

This topic is 3758 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have started creating a game engine and so far it has been going well. I have got a method for loading levels although i am having some graphical issues. I am not sure whether its my models, the exported .x file or directx but thought you guys may have an idea whats wrong. When i move away from or around a scene some surfaces get covered by others and some go black and generally it looks bad. when you move close to the objects it seems to stop happening. I have taken a video of it as its hard to explain, i took this from directx viewer to ensure it wasn't my program causing the problems. The model was created in 3DS max, exported to .x with panda soft and then loaded into the directx viewer.
any help would be great Thanks

Share this post


Link to post
Share on other sites
Advertisement
forgot to mention its most noticable on the pillars in the video but occurs throughout the model (mostly inside of the room)

Share this post


Link to post
Share on other sites
What you are seeing is the z-buffer is fighting between different models. You have two (or more) polygons overlapping in the same area of space and your video card is not able to decide which one is on top of which. So sometimes you see the bottom one, sometimes you see the top one.

To fix this you need to change your geometry. Don't overlap objects.

Share this post


Link to post
Share on other sites
Thats what i thought of immeditely but i checked on 3DS max and all the surfaces dont fall on the same space. The seperate models do intersect but none of the surfaces are in the same places.
Is it that the individual components are intersecting or that the surfaces are in the same position?
Thanks

Share this post


Link to post
Share on other sites
You might also want to check your depth buffer size, and projection matrix settings(specifically the near and far clipping plane).

Share this post


Link to post
Share on other sites
While this is a Z-Buffer precision issue (change the Near/Far plane values accordingly - i.e. increase Near Plane by a factor or 10 or 100 and/or decrease Far plane value by a factor of 10 / 100), you can also encounter a similar artifact on edges. It`s very easy to create a mesh with doubled vertices, thus you have 2 edges fighting for the same space on screen. To check, open the mesh, select the area around each vertex and check if there aren`t 2 or more vertices. Collapse them.

Share this post


Link to post
Share on other sites
brilliant thanks for the help guys. I had the z-biffer set up as 16bit increasing it helped alot. Still slight problems from a far distance but this is acceptable.
I will try messing around with the view planes aswell.
Thanks

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!