Not logged in, Join Here! or Log In Below:  
News Articles Search    

 Home / 3D Theory & Graphics / Texture swimming problems Account Manager
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.

July 13, 1999, 04:08 PM


I'm coding a hw oriented engine, and there is problem with the texture mapping. As multi-edge polys are tesselated into triangles the gradients used for texture mapping in hardware very A LOT. this gives an effect as if the texture is swimming across the polygon, especially when clipping is on. This gets worse as the z-component of the normal of the poly after transformation to camera coords approaches 1.0(remember normals are normalized=length 1). at z-component=0 the problem is non existant. this does not happen with any other components. if anyone knows what the heck is happening please respond. maybe it has something to do with perspective correction?

NOTE! if the projection to 2D coords is of the form:
where x' is 2D coord, x is the 3D x coord and z is 3D z coord and c is a constant.
In this case as c->infinity the problem grows less and less. however as c->infinity
projection->parallel and not perspective.
in a projection of the form(which is my projection and glide3 clip coords projection):
where x x' z are the usual stuff and hres is horizontal resolution this problem is very evident.

this is all with clipping on so that the final x and y screen coords are actually the same with both projections. the more you think about this the more rediculous this error is. HELP!


July 16, 1999, 04:04 PM

OOPS! Silly me. I got the projection formula wrong. Fixed it now

Anybody who reads this, the moral of the story is ALWAYS listen to your books. They are ALWAYS right. Your books are god. Your books are always right...

This thread contains 2 messages.
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.