Re: get slice texture?

New Message Reply Date view Thread view Subject view Author view

From: Dave Akers (dla@engr.sgi.com)
Date: 04/13/2000 17:13:57


Hi Werner,

  There are a couple of things you need to know about MPR in 2D texturing
mode. What you get back in this case is a whole bunch of polygon-pairs
associated with the bricks of the current brickset. The two polygons in
each pair have identical vertex information, but they are binned in
different bricks and have different per-vertex colorings. The two polygons
in each pair are drawn on top of each other, and the colors are used as
weights in the blending process. Make sense?

  So the result of all of this is that you absolutely must use C3F_V3F or
C4F_V3F as your interleavedArray type for MPR and 2D texturing. (You'll
notice that the voglMPR demos use C4F_V3F.) That would explain why you
would be getting strange results from the call to polygonizeMPR().

  You may also be confused about the way the texture mapping works in
Volumizer. You asked where the texture was stored when using an
interleavedArrayFormat without a T3F component to it. In this case,
Volumizer uses texgen in order to set up the texture coordinate system
implicitly from the vertex coordinates. So just before each brick is
bound, there is a call to voAppearanceActions::texgenSetEquation(), which
sets up the OpenGL texgen equations depending on whether 2-D or 3-D
textures are being used.

  That said, can you tell us more about what you're trying to do - not
just how you're trying to do it? Understanding the context in more detail
would give us a better idea of how to help you solve your problem..

Thanks,

Dave

 On Thu, 13 Apr 2000, Werner Wohlfahrter wrote:

> Hi!
>
> I use Volumizer in combination with OpenInventor. I cutted my Volume
> using a SoClipPlane (works great!). Now I try to grab the texture of the
> cuttingPlane and map it on an OpenInventor Object.
> I think the following should work (please correct me if i'm wrong!):
> - create allVertexData
> - create aPolygonSetArray
> - xfmVox2TexCoords
> - polygonizeMPR using the planeEquation of SoClipPlane
> - grab the geometry data from the aPolygonSetArray
> - grab the texture data from the aPolygonSetArray
> - use SoCoordinate3 Object to store geometry
> - use SoTextureCoordinate2 to store texture
> - use SoNormal
> - use SoNormalBinding
> - use SoTextureCoordinateBinding
> - use So(Indexed)FaceSet
>


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Wed Apr 19 2000 - 11:32:42 PDT