Page 1 of 1

Blender3D opener

Posted: Thu May 10, 2007 11:14 pm
by Halifax
How do you guys go about learning how to open files and stuff. Like how do you learn how to open a Lightwave file or 3DS Max file because I am looking to make a Blender3D file opener since whenever I use the converters the mesh never turns out right no matter what so I want to open .blend files natively

Also another question. How does "ISoundEngine* engine = createIrrKlangDevice();" that line create a ISoundEngine for "engine" to point at??

Posted: Thu May 10, 2007 11:50 pm
by cylicht
That may be more difficult than you think. The last time I checked, .blend files are just kind of a ram dump from the blender environment --including not only the meshes and textures and such, but also the configuration of the environment like the open blender window panes and menus and menu color themes. That's why you can use a .blend file to save the default settings (ctrl + U).

Unless you are intimately familiar with the Blender source code, writing your own blender importer would be impossible.

It would be much easier to use an exporter to a format that Irrlicht can already import. The .x exporter always worked well for me, but barring that it would still be easier to write a custom blender exporter script in python yourself than it would be to write the code to import a .blend file.

You said the converters never worked for you? Which ones did you use? Are you using the latest versions? Of Blender? Of the exporter scripts? Does the Microsoft .x file viewer render .x exports correctly while Irrlicht does not?

If they both don't work and you are using the latest versions, then it's probably a problem with your model. Make sure you only export one mesh per .x and that the normals are all pointing outside.

I may be able to help you with converter problems, but you must be more specific than "never turns out right".

Posted: Thu May 10, 2007 11:57 pm
by Halifax
Where do you get a .x file viewer from??

Yes I am using 2.43, but that maybe the problem as I have been trying to export a whole scene that includes 6 meshes.

Posted: Fri May 11, 2007 12:53 am
by cylicht
From Microsoft, of course. It's a nifty little sample utility that comes with the DirectX SDK. I believe it's called "Mesh Viewer" or something like that.

Get DirectX SDK here if you haven't already.

Posted: Fri May 11, 2007 10:15 am
by Halifax
Oh ok thank you very much!

Posted: Fri May 11, 2007 10:14 pm
by Halifax
Everytime I try to open a .x or .fx file it crashes O.o

Posted: Fri May 11, 2007 11:07 pm
by cylicht
"it crashes"? "it crashes"!?

Um, two questions.

First, what's 'it'? (Irrlicht? Blender? The exporter script? The other exporter script? The mesh viewer? The operating system? Your car?)

Second, what's 'crashes'? (BSoD? OS locks up? Unexpectedly terminates? Throws an exception? Error message? Strange things start happening? Something explodes? I don't even know what 'it' is yet!)

Posted: Sat May 12, 2007 4:17 pm
by cylicht
I tried out the latest x exporter and it can export multiple meshes.

That said, not everything Blender can do is supported by the x format. And not everything the x format supports is supported by the Irrlicht x importer. See this thread: New X exporter for blender 241!

Posted: Sun May 13, 2007 7:24 am
by Halifax
Oh the X file viewer crashes. It acts like it is doing something and then Windows comes up with that message for "Send an Error Report" and thats all.

Posted: Wed May 16, 2007 9:25 pm
by Grellin
I had the same problem with the mesh viewer. It seems there were a lot of people with that same problem. Here is a post from someone else that had a solution. Good luck.

http://mindinvader.spaces.live.com/blog ... !123.entry