Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
3D z-clipping code
#1
Anyone got any good info on the above? Its easy with a doom wall, just use a direct linear equation. But for polys that run on angles that aren't so confined, I need to do proper clipping, often resulting in little bits being hacked off. Least that's how I pictured it. I understand the theory, I'm just too damn lazy to write the code. Does anyone have any already working code that they wouldn't mind me modifying for my own occult purposes or am I likelier to discover nirvana on earth?
am part of the legion of n00b. We are numerous if dumb. We will enslave you all!
Reply
#2
Try back-face culling....i don't ahve teh code handy, but im sure if you ask relsoft, he could easily help you.

I suggest getting all the poiints in a model, and getting the median coords (add all teh coordinates together (xs with xs, ys with ys, etc.), then divide by the number of points)
Then make a temporary mesh with all these points, then do a back-face cull...this won't always work nicely, and I don't think it's the best way, but I'm really tired right now, and don't feel like thinking...

Oz~
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)