Skip to main content

Applying texture to complex shapes

Please note these forums are being decommissioned and use the new and improved forums at
2 replies [Last post]
Joined: 2012-02-29


i want to apply a 2D texture to my 3D shape (its a chair). I'm using a TexCoordGeneration to map my texels to the vertices. The generation mode is set to OBJECT_LINEAR but this works (or looks good) only for one perspective. If i rotate the chair you can see how the texture is kinda stretched around the object.

I've attached two picture, the first one shows the chair from top and this is the perspective where it looks like the texture were applied proper.

The second one shows the problem i've described.

The generation mode EYE_LINEAR solves this problem, it looks like the texture mapping is applied new every time the perspective changes. But it looks like the texture is moving and this is very weird?

Is there anything i can do without mapping the textures by hand?

Thanks in advance!

Seat1_OK.jpg145.1 KB
Seat2_Stretched.jpg177.97 KB

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2012-03-08

Hi Shaguar,

I have yet to really play around with Java3D, but I am pretty experienced in 3D in general. From what you are describing when you are using OBJECT_LINEAR you are projecting the texture onto the object from up above it. That is why it looks flawless from a birds eye view, but has stretching when viewed from other angles. When you are using EYE_LINEAR the texture is being projected from the camera, and that is why it appears to move. I'm sorry to say my advice to you would be to map it by hand.


Joined: 2012-02-29

Thanks for your answer,

i've already thought that this is the only solution, i actually wont be able to map them by hand because there are too many textures and models which have a lot of faces and vertices.

But thanks anyway!