Multiple textures

Started by fireside, August 06, 2008, 04:23:52 PM

Previous topic - Next topic

fireside

Can I use the usual setTexture method when there are multiple textures for a 3ds file, or do I have to do something different?  I did a search but i don't quite understand it.  Lets say i have an object with wall.jpg and floor.jpg.  What's the simplest way to add the textures to the object?
click here->Fireside 7 Games<-

Melssj5

the setTexture method will aply the texture to the whole object3d. If you want to change just the floor.jpg texture with another one you have to replace that texture reference in the TextureManager or you can have each textured object as a different object3d.
Nada por ahora

EgonOlsen

If the textures are already defined in the file itself, the loader will take care of this (read the javadocs or search the forum about to assign textures to a 3ds with texture definitions). If it's a file without textures assigned and you want to assign  them afterwards and the parts belong to one object only, Melssj5 is right.

fireside

O.K.  It was so easy it was going over the top of my head for some reason.  You just name the texture the same name as the file and it's automatic as long as it's before you do the loading.
click here->Fireside 7 Games<-

Melssj5

mm Yes, when you export from 3ds max and the name of the file is larger than the 8.3 format then its renamed to fit the 8.3 naming format, in those cases you have to adjust the name of your texture to it.
Nada por ahora

fireside

OK, I'll use short names, then.  Thanks.
click here->Fireside 7 Games<-

EgonOlsen

Yes, that's a limit in the 3ds format that seems to date back to the "good old" days of DOS.