dcsimg
3DJava: ObjLoad tool
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Alex_Brown
Posted On:   Friday, December 14, 2001 11:44 AM

The problem is connected to ObjLoad tool from the SUN distribution of Java3D utils. 1)How it is possible to read the material file ("****.mtl") for the given model "****.obj"? Normally the reference to the material file is included in "****.obj" file and any 3D tools is accepting one. But it's seems to be that even the single example from the SUN in the standart Java 3D distribution (minimart.obj)ignoring the material file. 2)If there is a way lo load the "obj" model from the local file to the remote WEB brouser when ObjLoad working like an applet? ObjLoad is working properly with the appletviewer. As soon as one attempt to load the applet to the    More>>

The problem is connected to ObjLoad
tool from the SUN distribution of
Java3D utils.

1)How it is possible to read the material file ("****.mtl") for the
given model "****.obj"? Normally the reference to the material file is included in "****.obj" file and any 3D tools is accepting one.
But it's seems to be that even
the single example from the SUN in the standart Java 3D distribution (minimart.obj)ignoring the material file.


2)If there is a way lo load the "obj" model from the local file to the remote WEB brouser when ObjLoad working like an applet?
ObjLoad is working properly with the appletviewer. As soon as one attempt to load the applet to the brouser there is
a security problems for the loading the model from the local file.
How to improve this code (example from http://www.j3d.org/faq/fileformats.html)
for the ObjectFile class and file_name="model.obj"?



try {
URL file_url = new URL(getCodeBase(), file_name);

Loader loader = new XYZLoader();

Scene scene = loader.load(file_url);
} catch(MalformedURLException mue) {
} catch(IOException ioe) {
} catch(IncorrectFormatException ife) {
} catch(ParsingErrorException pee) {
}

   <<Less
About | Sitemap | Contact