Skip to main content

3DS Loader "destroys" modells.Any ideas ?

6 replies [Last post]
mob148
Offline
Joined: 2006-10-18

Hello together, I've started to explore Java3D some time ago and now I have to use it to create a relatively important element of an application that I write for my diploma thesis in Computing Science.
I got some architectural models of my university that have been created by other students in 3DS Max 8.I have to use them for generating a kind of 'walk-through' of the university.
I exported the files to *.3DS and I use the 3DS loader "Loader3DS" from Microcrowd (see www.j3d.org" under "Loaders") to load them into my Java3D scene.
So far so good, the files are loaded but they are always distorted or destroyed somehow. There are shapes missing and some shapes are placed somewhere else as where they should be.
Has anybody an idea where I should start to look for solutions ? I will try another loader that's for sure but I don't hope this will make too much difference.
By the way: Any comments or ideas on how to realize a generated "walk-through" - no user interaction allowed so far - are also welcome !

Reply viewing options

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

If you go the VRML route, be sure to check out Chisel as it can significantly reduce the file size of VRML data exported from 3DS:

http://www2.hrp.no/vr/tools/chisel/install.htm

Michael.

mob148
Offline
Joined: 2006-10-18

First of all, thanks for all your replies.
I gonna check out the VRML stuff and try to get the models work.
I actually don't want to change the heap size of the JVM for this particular project just because I want to leave as much of the java environment as I can on default values.The main reason is, that I will have to present and install it on other machines at my uni and I don't wanna change to much of their configuration.Nevertheless it is a valuable thing to know, thanks.
I don't want to write an own loader, I think the people who wrote them have already put a lot of time and effort in it, I don't think I will come out with a better one. The next thing is, that I don't have to much time for the whole project including Swing, JDBC and MySQL database and other stuff.

> If you go the VRML route, be sure to check out Chisel
> as it can significantly reduce the file size of VRML
> data exported from 3DS:
>
> http://www2.hrp.no/vr/tools/chisel/install.htm
>
> Michael.

I have a look at Chisel and hope that the models gonna work after that with my application, thanks !

At 'messenger': It is kind of funny that you are from Melbourne, I studied there as an international student from Feb 06 to July 06 at Swinburne University of Technology in Hawthorn, maybe you know the uni.

I am still interested why some models are 'destroyed' and others are not ? I managed to load a very detailed scene without any errors, but when I tried to load a much more simple scene this scene was 'destroyed' again. Both 3DS files where created with the same 3DS Max 8 program on the same machine.This is really kind of strange. I would understand if a more complex model is more likely to be loaded with errors than a simple one, but the other way round ?

Dmitri Darine

java3d-interest@javadesktop.org wrote:
> I got some architectural models of my university that have been created by other students in 3DS Max 8.I have to use them for generating a kind of 'walk-through' of the university.
> I exported the files to *.3DS and I use the 3DS loader "Loader3DS" from Microcrowd (see www.j3d.org" under "Loaders") to load them into my Java3D scene.
> So far so good, the files are loaded but they are always distorted or destroyed somehow. There are shapes missing and some shapes are placed somewhere else as where they should be.
> Has anybody an idea where I should start to look for solutions ? I will try another loader that's for sure but I don't hope this will make too much difference.
>
Try to export them as VRML files and use VRML loader (Xj3D?).

--

Best regards
Dmitri Darine

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

mob148
Offline
Joined: 2006-10-18

> java3d-interest@javadesktop.org wrote:
> Try to export them as VRML files and use VRML loader
> (Xj3D?).
>
> --
>
> Best regards
> Dmitri Darine

Hi Dmitri,
Thank you very much for your suggestion. The problem is that the modells itself are already very big (the biggest *.max-file is about 80MB big).
If I export them as VRML the file size of the VRML file will be about as big as the original *.max file if not even bigger. I exported the files to *.3DS and VRML and compared the file sizes. The VRML files are up to 3 times bigger than the 3DS files, I am not sure if such big files can be handled by Java3D.
I got an heap error of Java when I tried to load a rather big *.obj file some time ago.
I tried the 3DS loader from 'Starfire Research' in their package 'com.mnstarfire.loaders3d.Loader3DS' with the same results.
I also traversed the scene group of the object and I changed the PolygonAttributes.setCullFace of each shape to 'CULL_NONE', just to see if some shapes 'disappear' because the 'wrong faces' are culled so that they are 'invisible' for the viewer.
I had no success with that like I already thought because the models can be viewed from both inside and outside in 3DS max.
It is really important for me to use the given models, because I don't have the time to model the buildings in 3DS max AND program my application.My fellow student mates have already modelled them very detailed which took them almost 3 months or more.

I only have 4 months to write the program AND my thesis. I really appreciate every answer or suggestion, THANKS !

messengers
Offline
Joined: 2004-04-18

>The problem is that the modells itself are already very big (the biggest *.max-file is about 80MB big).

Try 3DWin5 from
http://www.tb-software.com/download.html
You will be able to inspect the structure of the object or scene, and perhaps roll your own loader based upon your observations. At the very least you will be able to split the object into surfaces, and perhaps save them as separate .obj files?

>I got an heap error of Java when I tried to load a rather big *.obj file some time ago.

Can you be more specific?

regards

conzar
Offline
Joined: 2003-07-15

I also suggest using the vrml loader. I haven't ever used X3D's but I have used the one specified in the link below.

https://j3d-vrml97.dev.java.net/

When you export to VRML be carefull of which version you export to. I think there are 2 or 3 versions available (at least in AC3D this is the case). Meaning, try all the VRML formates before giving up.

Also, you can set the heap size of your JVM - this should rectify your problem with running out of memory.

http://www.caucho.com/resin-3.0/performance/jvm-tuning.xtp