Jump to content
  • Advertisement
Sign in to follow this  
jwezorek

Need help with unwanted rendering artifacts

This topic is 3172 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

Hi, I'm familiar with Direct3D but not an expert. Mostly I write 2D games, wrote my 2D engine on top of Direct3D a long time ago and usually I don't have to think about Direct3D too much. Currently I'm working on an animated title screen and am doing actual 3D with Direct3D and am running into problems. Basically, I've constructed an animation of one wall of an infinite hallway slowing scrolling past the viewer. The hallway occasionally has windows through which the viewer can see an infinitely scrolling cityscape. This all pretty much works. Very simple 3d model, everything is rectilinear, and mostly parallel to the plane of the camera. I'm having problems with little artifacts that I can't get rid of, however. (1) Occasionally, very rarely, the seam between two "hallway tiles" becomes a visible flicker. Doesn't happen often and I can even get it to go away by fooling around with the projection matrix ... but I'd like to understand what is going on. (2) This is a bigger problem. My hallway tiles are extremely simple and stylized. I'm going for the look of a very simple black on white animated cartoon. When a window is scrolling past it is outlined in black; thus, I have a texture for the wall that in places has single pixel wide (or double pixel wide -- i'd have to check) vertical lines. When these vertical lines are scrolling past they appear to vibrate in a way that I don't like. I think what is happening is that the vertical line texels are getting rendered to the screen with varying widths in pixels depending, I guess, on where they are being rendered along the x-axis. If anyone has any thoughts on this situation I'd be interested...

Share this post


Link to post
Share on other sites
Advertisement
Your first problem sounds like z-fighting, Google it and see if it matches your problem.

The second problem may likely be aliasing, try creating your device with multi-sampling antialiasing (2x) MSAA, and see if the problem goes away or gets less ugly looking at least.

Share this post


Link to post
Share on other sites
Quote:
Original post by Steve_Segreto
Your first problem sounds like z-fighting, Google it and see if it matches your problem.

The second problem may likely be aliasing, try creating your device with multi-sampling antialiasing (2x) MSAA, and see if the problem goes away or gets less ugly looking at least.


Thank you very much. Turning on multi-sampling antialiasing fixes both problems. That is like magic...

Now, I can't just count on everyone's system to have this capability right? So I guess on those systems I'll just have to live with (2) and figure out some kluge for (1).

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!