Load multiple texture in cube(Object3D)

Started by nima.sh23, May 20, 2015, 07:37:54 AM

Previous topic - Next topic

nima.sh23

How can I load multiple textures in cube?

nima.sh23

I think "find it"
http://www.jpct.net/forum2/index.php/topic,3992.msg28066.html#msg28066
by readTextureNames3DS(java.io.InputStream stream),but I dont know how to use this?
what is exactly stream(my textures in zip file)?
help me please
thanks

EgonOlsen

I'm not sure if that thread really covers your actual problem. The way described in that thread works only if your cube was made in some 3d modeller and has been exported with different textures for each side. Maybe this is better: http://www.jpct.net/forum2/index.php?topic=2300.0?

nima.sh23

Thanks for you answer.
I use of 3DS file for Object3D,I have some texture for one 3DS.
whats exactly this method?

EgonOlsen

If your cube is a modeled 3d object, the best way to do this is (as already mentioned) to model and export it in a way that each side uses a different texture. That way, you can assign textures as explained in the thread that you linked to. Another option is to use the PolygonManager class, but that requires a bit of guessing which polygon is on which side.