Skip to main content

JAVA 3D max files and VrmlLoader

5 replies [Last post]
Anonymous

Hi everyone,
i need to work in my java app with max files,
i searched the net and i think the best solution is save max files like wrlm
and work with Vrml.
But can anybody suggest me the best VrmlLoader?
Or is there any other/better solution, how could i work with max files in
Java?
thankx for every reply

--
View this message in context: http://www.nabble.com/JAVA-3D-max-files-and-VrmlLoader-tf4288708.html#a1...
Sent from the java.net - java3d interest mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
For additional commands, e-mail: interest-help@java3d.dev.java.net

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
starman2049
Offline
Joined: 2007-06-27

I export .obj/.mtl from 3DSMax and it works ok with the default loader class that comes with Java3D. It does not export animations/behaviors, and it has a problem with 32 bit translucent textures, and some other funny behavior, but basically works ok and you don't need to include any other jars. Note, I am using 3DSMax 9 which was released after Autodesk purchased Alias/Maya (the .obj format makers) so things might be better in 9 than in previous versions in terms of export options and compatibility.

interactivemesh
Offline
Joined: 2006-06-07
mlouka
Offline
Joined: 2004-06-27

We (IFE Halden VR Centre) have an improved version of the j3d-vrml97 loader. Since nobody appears to be maintaining the version on the java.net web pages and the project owner does not respond to e-mail or requests for developer roles in the project, our copy can be found here:

http://create.ife.no/vr/tools/j3d-vrml97/

So as not to break existing applications using the older version of the loader if this copy of the library is used, some of the new features that we've added have to be enabled by setting properties.

Michael.

interactivemesh
Offline
Joined: 2006-06-07

Hi,

thanks a lot for improving the J3D-Vrml97 loader. After searching your source code and doing a few tests I would like to post two comments:

1. Wouldn't it be a good idea to add flags in 'org.jdesktop.j3d.loaders.vrml97.VrmlLoader' like
- public static final int MIPMAP = 1024
- public static final int MODULATE = 2048
- public static final int RELATIVEBASE = 4096.

instead of using your system properties
- "org.jdesktop.j3d.loaders.vrml97.mipmap"
- "org.jdesktop.j3d.loaders.vrml97.modulate"
- "org.jdesktop.j3d.loaders.vrml97.inline.relativebase"

('com.sun.j3d.loaders.objectfile.ObjectFile' adds flags also. Starting with '1024' allows additonal flags for the interface 'com.sun.j3d.loaders.Loader' for future releases.)

2. Is the use of 'java.security.AccessController.doPrivileged()' in 'org.jdesktop.j3d.loaders.vrml97.impl.Loader' really necessary? This seems to limit the loader for local applications only. Please have a look at thread 'VrmlLoader in Applet'
http://forums.java.net/jive/thread.jspa?threadID=28411&tstart=120. What´s your solution for making this loader available for Applets and Java Web Start applications?

August

mlouka
Offline
Joined: 2004-06-27

Regarding the use of properties and 'java.security.AccessController.doPrivileged()' in the extended j3d-vrml97 loader: The reason for this is simply consistency with the original codebase that was written by Sun engineers about ten years ago -- all the other properties in the loader code were handled that way so we just appended ours in the same manner as the others. We only use the library in standalone applications so reworking the loader initialisation code hasn't been a priority for us and in making changes we've (so far) tried to keep things relatively "atomic" so that we can easily merge our changes into the official codebase on java.net if someone gives us permission to do so. Up to now we have therefore avoided making any changes that would break compatibility with older applications that use the library, to avoid the official maintainer rejecting our changes if/when submitted. Unfortunately, the official maintainer of j3d-vrml97 has not responded to email or requests for developer status for the project -- hence our "unofficial" version.

I'm not sure if there is anything the Java 3D staff at Sun can do about that -- to enable us to be able update that codebase (e.g. transfer the project to us if the official project owner has no intention of maintaining the project)? The code is BSD licensed so I guess we could just create a new java.net project and fork the code, but it would be best if the "official" j3d-vrml97 project could be updated, both to incorporate our improvements but also to update the loader API use to reflect best-practices for use with Java 3D 1.5 rather than 1.0.

Michael.