Main Menu
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - bayee

#1
Support / Re: Load 3DS with texture
September 28, 2010, 12:02:35 PM
Quote from: JKumar on September 28, 2010, 09:46:19 AM
Hi,

          Its an image file which u might have as an additional with the 3ds.You can put the file in any of the resource folders and can access the same using the above code.



hi JKumar, thx once again... does this mean the texture image file is not embed in the 3ds file which i download from the net ? but most of the free 3ds file in the net does not come with an image texture file, though many of their preview have texture....
#2
Support / Re: Load 3DS with texture
September 27, 2010, 12:14:20 PM
 :-\
Quote from: JKumar on September 27, 2010, 11:59:36 AM
HI,

       Follow the steps below.

TextureManager.getInstance().addTexture("<Name of texture>", new Texture(getResources().openRawResource(R.raw.mytexture)));


model.setTexture("<Name of texture>);
         

thx for the quick reply, but where do i get the mytexture file ? it is in the 3ds file right ? sorry if this sound stupid, but I am really new with all these...
#3
Support / Load 3DS with texture
September 27, 2010, 11:29:02 AM
Hi,

I have download a 3DS file from the net and I try to load it into AE.

I have use the DeSerializer from PC. Here is my code:


                Config.oldStyle3DSLoader = true;
                Object3D[] obj = Loader.load3DS(args[0], 1f);
                System.out.println("Object loaded!");
                DeSerializer ds = new DeSerializer();
                for(int i = 0; i < obj.length; i++) {
                        System.out.println("serializing object: " + i + "/" + obj.length);
                        obj[i].build();
                        ds.serialize(obj[i], new FileOutputStream("out"+i+".ser"), true);
                }



When I run the above program, I got this in console (my 3DS file is called 23moon.3DS)


Loading file 23moon.3DS
File 23moon.3DS loaded...243558 bytes
Processing new material Material #1!
Texture named MOONMAP.JPG added to TextureManager!
Processing object from 3DS-file: Sphere01
Object 'Omni04_jPCT-2' created using 9800 polygons and 4902 vertices.
Object loaded!
serializing object: 0/1



Now I have out0.ser which I can load into AE, but I am not sure how I can apply texture to it.

Please advice. Thx.