Try this:
cd demo/java3d/ObjLoad
java ObjLoad ../geometry/minimart.obj
This will load and display the file, including all material
properties and textures.
The source for the ObjLoad demo program and the ObjectFile class
are both included in the Java 3D SDK. The javadoc for the
ObjectFile class contains a complete description of the format
of .obj and .mtl files (the javadoc is in a separate download).
The .mtl file is loaded automatically by the ObjectFile class when it
sees the "mtllib" token in the .obj file. If your .mtl file isn't
being loaded, perhaps it's in the wrong directory. All of the files
associated with an .obj file are assumed to be in the same directory.
If they are not, you need to use ObjectFile.setBasePath().
-Paul
> Date: Thu, 5 Oct 2000 14:00:38 GMT
> From: david Xia <[EMAIL PROTECTED]>
> Subject: [JAVA3D] ObjLoader to use MTL file problem continued
> To: [EMAIL PROTECTED]
>
> HI,Paul:
>
> Thanks for your reply. I checked the Java3D /demo/geometry/minimart.obj,
> it also has minimart.mtl file, but I did not find any Java3D example code to
> use these two files to display a picture. I find that the ObjLoad.java does
> not have this mtl function. How to use mtl file in Java3D together with Obj
> file? when using obj file, I use code like: file.load("myfile.obj") to get
> the scene, but how to load the mtl file to get the appearance? My OBJ file
> will surely need MTL file to work properly. Can you provide and tell me some
> example code to combine obj and mtl together in Java3D? That will be more
> easier to understand it.
>
> Thanks a lot.
>
> David Xia
>
>
> _________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
>
> Share information about yourself, create your own public profile at
> http://profiles.msn.com.
>
> ===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff JAVA3D-INTEREST". For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".