[vtkusers] Texture Mapping in OpenGL
Bill Lorensen
wlorens1 at nycap.rr.com
Wed Aug 2 19:24:00 EDT 2000
Randall,
You should not have to pad. The OpenGLTexture class does that (at least since May, 1999). Hoever, looking at the coverage of vtkOBJReader, I see that we do not have any tests that exercise the texture coordinate reading of obj files. I suspect that the code is wrong, especially since it's not tested.
If you can provide an obj model with a texture, I 'll correct the problem and add a test for this condition.
Also, the tcl script graphics/examplesTcl/clipArt.tcl does padding to power of 2 with adjusted tcoords.
Bill
At 08:21 AM 8/2/00 -0400, Randall Hopper wrote:
> I have a texture map (.TIF) and an object file (.OBJ) with texture
>coordinates. If I bring up the OBJ with the texture map in Maya it
>displays fine, but in VTK the texture doesn't display correctly.
>
> In the file, the 450x512 texture is correct. In VTK, half of the
>texture is missing (black), and the other half is shifted on the dataset.
>I'm using vtkImageConstantPad to pad up to 512x512, and using
>vtkTransformTextureCoords to scale the texture coordinates for this pad.
>
> Any other VTKer's padding textures for OpenGL and gotten their
>textures to sync-up correctly? If you have a code snippet for the pad and
>tcoords transform you could post I'd appreciate it.
>
>Thanks,
>
>Randall
More information about the vtkusers
mailing list