No or wrong textures after loading a model

From JPCT
Revision as of 09:53, 26 April 2013 by Admin (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The problem

You have a model in OBJ or 3DS format and you are pretty sure that everything fine with it. You've textures and coordinates assigned and are loading everything correctly. However, textures don't show up on the model after loading or they look distorted.

Possible reason

Check if you are doing one of these call in your code:

obj.calcTextureWrap();

...or...

obj.calcTextureWrapSpherical();

...or...

obj.setEnvmapped(true);

These will either create new, none-fitting texture coordinates or enable environment mapping. Either way, the coordinates from your model won't be used.

Solution

Delete these lines if you find them and try again.