Skip to main content

3ds files import into java3d

6 replies [Last post]
tacb0ss
Offline
Joined: 2009-02-07

Hey all, I have a very troubling ... something... i don't even know how to call this.
i am reading the killer game programming book, now, while I am following the book I try my own stuff you know for trial and error, now i took a few of the 3ds file in the source code of the book and tried to allay it in my own 3D little world and it worked well, now here is the twist, as i loaded the file into 3ds max 9 added material changed the colors did all kind of things to the object, and now when i try to load the file, all the objects whom i have edited, turned out white, with the same 3D little world code as earlier.

now i assume that it has to do with the fact that the old files where made with older version of the program and the 3dsloader is out of date,

now could any one tell me if i'm right or wrong with my assumptions, and if there is any where to get an up to date Loader, because by what i saw it will really take me weeks to write a good loader that will cover most of 3ds max properties...

great thanks to all...

just so you know i'm sitting 12 hours nearly straight just trying to make this thing work in the past day and a half.

any help would be appreciated

Message was edited by: tacb0ss

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
stone09
Offline
Joined: 2009-04-21

Hi all, anyone can help as i'm also facing the same problem.
I've try to load .3ds file, and which can be compiled alright. However the screen does not show the objects.

thanks.

tmilard
Offline
Joined: 2004-03-25

If I remember well, a year ago I had such a problem : Import process run corrects but .... I don't see the 3D objetc.
From my experience (I don't remember the tecnical details)
A) Problem with light :
If you ain't got light ... 3DS objetc ain't visible. Looks idiotic allright but I did had this issue....

B) From Liliput and to Brobdingnag .... that is the question :
- Often it was du to the fact that the "size" parameter (the other parameters are x,y,z) ... was much much lmuch too small for the 3ds object to be even visible as a ant.

I fact [u]depending on the Object you import[/u] you have to put a different size parameter.
- For example
a) a butterfly3d.3ds might be of size 1 on your java3d scene with ... Let's say you SizeParam=10
b) wereas a chair3d.3ds will be also the size 1 on the same java3d scene..... but with sizeParam=100000
This is tricky I know.

stone09
Offline
Joined: 2009-04-21

Hi tmilard, thanks. cox i just started to learn java3d so im still very new to it. can u share a simple code on how to change the sizeParam of a .3ds object or how to set the light to make the object visible?

thanks.

zesharp
Offline
Joined: 2006-12-21

Hi
try to export 3DS file OBJ format.

tacb0ss
Offline
Joined: 2009-02-07

any idea on which loader is best suited for loading OBJ objects??

jakem
Offline
Joined: 2009-04-10

tacb0ss, I just made it to that chapter and am having problems loading a model into simpleUniverse. The loader in the book was not available and outdated if you could find it so i went and got Loader3ds on sourceforge its got the most function of any ive seen so far. Problem is its not loading a model(.3ds file) into my universe. It finds it and loads it into its own Scene and BranchGroup but does not display it. Can you post your code that loads your models.
Heres mine. Theres no code tags in here? Its not gonna look pretty.

private void loaderModel()
{
Scene loadedScene;
BranchGroup loadedBG;

try{
Loader3DS loader = new Loader3DS();
loader.setFlags(Loader3DS.LOAD_ALL);
loadedScene = loader.load("models/dolphins.3ds");
loadedBG = loadedScene.getSceneGroup();

sceneBG.addChild(loadedBG);

}
catch (Exception e)
{
loadedScene = null;
System.err.println(e);
}
if( loadedScene == null )
System.exit(1);
}