Exporting from Blender 2.41 with the Direct8.0X Mod

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
Jim9137

Exporting from Blender 2.41 with the Direct8.0X Mod

Post by Jim9137 »

Well, hey you and all. I've been trying to export a mesh for my pure testing pleasure and things, with the animation, but I've encounter a set of problems.
I did the modelling in the newest Blender, which I recall being 2.41, and tried to export the said model using the irrlicht's supplied exporter.

However, I encountered two problems.

a) mod_meshtools gives me error. I modified to remove the mod_ part, but
b) It now gives me error about returning empty strings.

I figure this is a version specific problem, considering that I used the same exporter with 2.37 and it worked just fine. The problem is, that I couldn't load the mesh I made in 2.41 properly for some reason, and I figure that's why it doesn't load up in irrlicht properly either.

I'm asking for help here, pretty please. :(
Nextor
Posts: 35
Joined: Wed Feb 16, 2005 9:06 am
Location: Madrid, SPAIN

Post by Nextor »

Hi Jim. I'm using Blender and Irrlicht as well and even though I had some problems at first I finally was able to get my animated Blender models to Irrlicht. I'm using the "DirectX Exporter Mod 1.3.2" exporter, downloadable from here:

http://development.mindfloaters.de/Downloads.12.0.html

It works correctly but there are a few rules to follow. I wrote a lot of this stuff on these posts:

http://irrlicht.sourceforge.net/phpBB2/ ... ght=#61609

http://irrlicht.sourceforge.net/phpBB2/ ... ght=#63034

I hope you find them useful, and if you have some problems we can meet here.

Good luck! :)
Get away from her, you B*TCH !!! - Ellen Ripley
Guest

Post by Guest »

Hey, and thanks for the reply! I updated the DirectX8Mod exporter to 1.3.2 from 1.3.1, and in anticipation, tried it out. However, it gave me the same error. I'm not exactly sure what I'm doing wrong, but could it be it's the fact I'm using NLA Strips?

It gives me the error
"Traceback (most recent call last):
File "<string>", line 1526, in ?
SystemError: error return without exception set"

I tried renaming the bones and objects to remove 001 endings, but it still gives me that error. I'm not really much of an animator, for your information, so I might just be doing something silly.
Nextor
Posts: 35
Joined: Wed Feb 16, 2005 9:06 am
Location: Madrid, SPAIN

Post by Nextor »

You can safely use NLA strips. From the type of error message I'm almost sure that it's a matter of names.

Check also the name of the files for textures, etc... avoid spaces in them. A way to check the names of everything in Blender is: switch a window to "File Browser". Clic on ".." several times to get to the "root" of the system and enter every item (Action, Ipo...) to see the names used. In my case, I was able to get the script working even with some names with ".001" and so, but I've read somewhere that can lead to an error in the script. If you find, i.e, some action with "001" go to the Action Editor window, search that Action and change its name from here.

I hope you can solve the problem.

BTW, have you installed Python? That's mandatory for some scripts to work correctly! If you're using Blender 2.4x you should use Python 2.4x (I'm using Python 2.3.5 for Blender 2.37)
Get away from her, you B*TCH !!! - Ellen Ripley
Guest

Post by Guest »

I tried again, and still nothing. I've even removed the animation, so it's just having issues with exporting the mesh itself. No 001's in the whole scene, so I'm genuinely baffled now.

Still the same error, just the mesh, camera and lamp, along with ObjIpo's, World and things that shouldn't affect the exporting business at all. What kind of mesh it should be, should I convert it into tris first or leave it as quads?
Nextor
Posts: 35
Joined: Wed Feb 16, 2005 9:06 am
Location: Madrid, SPAIN

Post by Nextor »

Quads shouldn't be a problem either. I can check your .blend file if you want:

Put your .blend in http://rapidshare.de and send me its link in a private message.

or

Send me a private message with your email address and I'll send you mine. Send me your .blend file.

I'll check it along this weekend. OK?
Get away from her, you B*TCH !!! - Ellen Ripley
Nextor
Posts: 35
Joined: Wed Feb 16, 2005 9:06 am
Location: Madrid, SPAIN

Post by Nextor »

Yes, Jim, it seems to be a Blender/Python vs. Script version problem. I've tried your .blend file on Blender 2.37 and on Blender 2.41 and works in the former but doesn't in the latter.

I'm afraid that, until Ben Omari updates the script, we have to stick to 2.37 version. I'm not an expert in Python but maybe I could find something checking the code of the script (although I've been working with Blender 2.37 and it's enough for my animations so far).
Get away from her, you B*TCH !!! - Ellen Ripley
Jim9137
Posts: 4
Joined: Fri Feb 17, 2006 5:19 pm

Post by Jim9137 »

Well, I just returned to blending so I figured I'd take 2.41 as well, now that I'm messing with Irrlicht. I have the most awful luck with these things, but thanks for all the help, it's truly appreciated. :)

I could technically start using 2.37, but I'm fearing there would be issues if I decided to change back to 2.41 for the armature benefits and the like. I suppose there is no other way at this moment though. :/
Guest

Post by Guest »

I've posted about this problem here

To be able to use the script just add a # (commentary) in front of these 2 lines :

Code: Select all

if obj.getData().getMode() & NMesh.Modes['SUBSURF']:
	subsurf = True
But be careful : when you use the script, there mustn't be any object having a subsurf modifier not applied !

PS : I've also found a DirectX 9 exporter here :)
Funto
Posts: 17
Joined: Tue Feb 21, 2006 2:29 am

Post by Funto »

(I was guest)
Jim9137
Posts: 4
Joined: Fri Feb 17, 2006 5:19 pm

Post by Jim9137 »

Thanks, that worked like a charm! Thanks fir Nextor for all his help as well. :)

I do have one more question though, how well do the blender specific materials export over to irrlicht?
Funto
Posts: 17
Joined: Tue Feb 21, 2006 2:29 am

Post by Funto »

I think materials should be exported correctly, but I didn't verify...

I'll try to write my own exporter for the X file format, if I manage to make it work I'll tell you ^^
Quall
Posts: 154
Joined: Mon Mar 07, 2005 10:16 pm

Post by Quall »

Hi, I have a small problem as well. I am pretty new to blender, so I could just not have the right settings.

Anyways, it seems that UV maps don't get exported. In Blender, I create a UV in the UV editor and texture the object. It looks fine in the editor. I then export the object with the modded version of the tool. The mesh itself exports fine, but I have problems when I display it in irrlicht.

When I set a texture to the object, it is as if the texture is not in the directory. The object is just "white". Is there something I had to do to export UV's?
Nextor
Posts: 35
Joined: Wed Feb 16, 2005 9:06 am
Location: Madrid, SPAIN

Post by Nextor »

Quall, are you sure that you've disabled lighting? Otherwise, if there are no dinamic lights, models are rendered white:

Code: Select all

yourNode->setMaterialFlag(video::EMF_LIGHTING, false);
About the script, there's another bug which affects vertexes with multiple weights applied. I've written the correction here:

http://www.elysiun.com/forum/viewtopic. ... highlight=

BTW, thanks for the help, Funto :D
Get away from her, you B*TCH !!! - Ellen Ripley
Post Reply