Sign in to follow this  
jwezorek

Need help with unwanted rendering artifacts

Recommended Posts

jwezorek    2663
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
Steve_Segreto    2080
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
jwezorek    2663
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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this