Difference between revisions of "No or wrong textures after loading a model"

From JPCT
Jump to: navigation, search
(Created page with '=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 cor…')
 
(No difference)

Latest revision as of 08:53, 26 April 2013

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.