Problems with .3ds

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
XSportSeeker
Posts: 10
Joined: Wed Apr 28, 2004 7:31 am

Problems with .3ds

Post by XSportSeeker »

I've been trying to use a .3ds map replacing the .bsp (Q3) map on the second example "Quake3Map".
The function getMesh from ISceneManager is supposed to support this format, isn't it?
Problem is, for some reason, the compilation crashes. If you put a Q3 map, it runs ok. If you put some invalid file (I've tried running .max and .wrl files) it just gives an error message saying it won't support.
Any ideas? I tryed using addOctTreeSceneNode and addAnimatedMeshSceneNode... no matter how much I wait, the rendering seems to crash.
Running WinXP, tried DevCpp and VisualC++, and OpenGl. DirectX9 doesn't work don't know why.
If it's some bug on Irrlicht, anyone knows of any conversor from .3ds files to Q3 map?
etcaptor
Posts: 871
Joined: Fri Apr 09, 2004 10:32 pm
Location: Valhalla
Contact:

Post by etcaptor »

Irrlicht support 3ds meshes. Not *.max, but *.3ds files.
If you want exporting q3 bsp files from max, you must at beginning to find max2q3 /max to quake 3 map file/ exporter plugin and then to compile your map with bsp compiler.
Another possibility is exporting from max your scene like *.x animated mesh.
XSportSeeker
Posts: 10
Joined: Wed Apr 28, 2004 7:31 am

Post by XSportSeeker »

Exactly! I tried a .3ds file, but the render crashes. I used .max just as an example of what happens when you try to use a non-supported file with the getMesh function.
But I'll try to convert the file to .bsp or a Q3-compatible map then... any clue where I can find this plug-in?
I'll be searching in google now... :D
Thanks for the tip!
bal
Posts: 829
Joined: Fri Jun 18, 2004 5:19 pm
Location: Geluwe, Belgium

Post by bal »

Could you say where exactly your program crashes (mesh loading, rendering ...)?
General Tools List
General FAQ
System: AMD Barton 2600+, 512MB, 9600XT 256MB, WinXP + FC3
XSportSeeker
Posts: 10
Joined: Wed Apr 28, 2004 7:31 am

Post by XSportSeeker »

It crashes when trying to load the mesh.
Here exactly:

Code: Select all

scene::IAnimatedMesh* mesh = smgr->getMesh("teste.3ds");
etcaptor
Posts: 871
Joined: Fri Apr 09, 2004 10:32 pm
Location: Valhalla
Contact:

Post by etcaptor »

Do you sure, that 3ds mesh is in your current directory? I you are not, you must describe directory like "../../media/teste.3ds" or your right path.
In other case you can try with another 3ds file for testing.
XSportSeeker
Posts: 10
Joined: Wed Apr 28, 2004 7:31 am

Post by XSportSeeker »

Yeah, pretty shure of it. I think if the function doesn't find the file it generates some kinda error and shuts down the program... but in my case, the compilation is crashing... it just keeps in a loading state for hours.
I tried 2 different .3ds files up 'till now... but they were made by the same person. Still, I can open the files on 3DStudio normally.
I'll run some more tests... try to find some .3ds map other than mine... and I also found some converters from .3ds to .bsp file... so I'll test those too.
Thanks for the help so far, I'll keep reporting what happened here.. :D
etcaptor
Posts: 871
Joined: Fri Apr 09, 2004 10:32 pm
Location: Valhalla
Contact:

Post by etcaptor »

XSportSeeker wrote:... but in my case, the compilation is crashing...
Just try to rebuild the project if I understood you correctly.
XSportSeeker
Posts: 10
Joined: Wed Apr 28, 2004 7:31 am

Post by XSportSeeker »

No use... tried building from different locations, with different project files and rebuilded it several times...
Maybe I'm pointing to some out-of-the-map space.... but I'm not shure if this would make the code crash, since it is a walk-free example... no collision detection stuff involved, I mean.
bal
Posts: 829
Joined: Fri Jun 18, 2004 5:19 pm
Location: Geluwe, Belgium

Post by bal »

If you use Visual Studio, make sure your paths are right. Because the "project dir" is your .\ dir (where you can put files like you did "teste.3ds), and not your Release/Debug dir.
General Tools List
General FAQ
System: AMD Barton 2600+, 512MB, 9600XT 256MB, WinXP + FC3
delerium
Posts: 2
Joined: Sun Sep 26, 2004 11:17 pm
Location: Hungary

Post by delerium »

I have the same problem. I cannot load my .3ds file, because the application crashes. The room.3ds from the 0.7 version of IRRLICHT is ok, so far. (The textures are missing, but that is an other story. Somewhere I read that the textures should be next to the .3ds file, and they will be loaded automatically. Hmmm.)
So, I think maybe the 3dsMax 6 is the cause of the problem. Is it possible, that the .3ds format is somehow different in 3dsMax 6? Although, I assume, that it hadn’t changed since 1998.
delerium
Posts: 2
Joined: Sun Sep 26, 2004 11:17 pm
Location: Hungary

Post by delerium »

So, the problem is solved. I have tried everything. The error factor was the dimensions of the material. It seems that the material should be like 128x128, or 256x256, (powers of 8 ) but not weird as 378x256, or others like this.

I am a bit sad about all this. I was hoping that exporting my .max files to .3ds will be a piece of cake, but now I see, that much attention is required to do that.

And the .3ds loader class should be more informative. I haven’t seen an error log entry.
XSportSeeker
Posts: 10
Joined: Wed Apr 28, 2004 7:31 am

Post by XSportSeeker »

Interesting... my map have some weird dimentions also... will check!
Thanks for the help delerium, I was pretty much lost on this...
Post Reply