PDA

View Full Version : Cross section textures



TriangleMan
06-11-2004, 01:00 PM
The reason I need to do this is too long to explain. Here is what I am trying to do.

I have a complex 3D model of a tree.
I am trying to get textured images of cross sections of the tree, from many different slicing angles.

The cross sectional area texture needs to have what the polygon (rectangle) intersected with (for a given thickness) and nothing more.
I do not need the actual tree texture, just a created texture that has a map of the intersecting points of the polygon, and tree.

When the angle is overhead, I can play with the near and far clipping planes, and make rectangular slices that way.

I then move the eyepoint, do a screen save, and am done.

Trying to capture the image of a triangular intersection at a weird angle is hard.

I somehow think that this could be accomplished with either a depth buffer read / write or stencil buffer read / write.

Anybody have any ideas?

ZbuffeR
06-12-2004, 01:37 AM
Better to simply use user clip planes. Go for glEnable(GL_CLIP_PLANE0) glEnable(GL_CLIP_PLANE1) and define postion/angle with glClipPlane.