Page 1 of 2

Blender DirectX Exporter update (Version 1.3.1)

Posted: Sun Apr 24, 2005 4:55 am
by jox
EDIT: Even another update:

Code: Select all

# Version 1.3.1 - May 20th 2005
#   - Added check for SubSurf meshes. SubSurf meshes must be converted to
#     polygon meshes before exporting. I might add support for exporting
#     SubSurf meshes later.

Code: Select all

# Version 1.3 - April 24th 2005
#   - Fixed problem with animations that have a modified pose at frame 1
#     (see Version 1.2.1). Fix provided by Ben Omari, thanks a lot!
#   - Fixed bug where error may occur with meshes that have no texture.
#     Fix also provided by Ben Omari, thanks another lot!
#   - Fixed bug where exception occurs when a mesh has uv coords and
#     contains vertices that does not belong to any face.
#     Thanks Trident from the Irrlicht forums for reporting!
http://development.mindfloaters.de/Downloads.12.0.html

Posted: Mon Apr 25, 2005 1:32 am
by afecelis
Great news Jox! trying it out right now. Thnx for it!

Missing the tropical weather? :wink:

Posted: Mon Apr 25, 2005 4:03 pm
by cmoibenlepro
excellent :)
I never saw those bugs before... and I will never see them after because they are fixed.
Life is beautiful. :P

Posted: Tue Apr 26, 2005 1:32 am
by jox
@afecelis: Thx. Yea I miss it, especially cause it became really good no more than the last couple of weeks...

@cmoibenlepro: nice way of seeing everything positive :)

Posted: Fri May 20, 2005 3:36 pm
by jox

Posted: Fri May 20, 2005 4:12 pm
by afecelis
excellent!

Jox, models exported to .X via your exporter need to be resaved in Mview or can be loaded directly into Irrlicht? (thinking of linux, where you can export from blender but then you dont have mview to resave)

Posted: Fri May 20, 2005 5:45 pm
by jox
@afecelis: Well, one (high priority) goal was to be able to load it directly in irrlicht. If it doesn't work then please tell me! :)

Posted: Sun Jun 05, 2005 9:19 am
by finger007
Hi jox!

I was using your exporter so far and am very happy with it!
Since Blender was updated to 2.37, there seems to be a change of code influencing your exporter - it now gives a failure-message to the console. Something about 'missing mesh-tools'...

Do we users have to change something or can you maybe update your exporter again, please!

Thanks for this great piece of work! Keep it up, please! :D

Posted: Sun Jun 05, 2005 2:20 pm
by ondrew
to make it work in blender 2.37 go to line 221 and simply delete the mod_meshtools dependency so it looks like this

Code: Select all

import time, os, sys
It seems to work fine without it :)

Posted: Mon Jun 06, 2005 8:52 pm
by finger007
Hmm, done.
But with funny results on the models in Irrlicht. Missing objects, flipped parts (like the z-axis wasn't flipped on some of the objects I exported to the same file, I had the button on though), lost textures...
But maybe I did something wrong. Will try on some more simple models tomorrow.
Thanks for your answer though! Much appreciated!!

Posted: Thu Jun 09, 2005 8:01 am
by finger007
ok, did some tries with the following simple model:
Image

the best I ended up with in irrlicht (i'm using 0.10) is this:

Image

So you see, of the 4 columns only one remained and is misplaced (without texture) and the second plane on top wasn't exportert either (believe me, I also watched from downside. i know about normals ;)).

All objects had uv's and textures applied.
The most tests were done with the .x-exportermod 1.3.1 which I manipulated as said above. Blender is used in version 2.37.

Any ideas anyone? This exporter used to be my favourite way to get meshes to Irrlicht. Maybe I simply should switch back to Blender 2.36?

Posted: Thu Jun 09, 2005 8:57 am
by ondrew
Are you sure, it worked before?

If I understand the script correctly, it exports meshes and not objects. So if you use "Duplicate Linked" to create the columns, you have four objects but only one mesh, which is the one column you see in Irrlicht.

Posted: Thu Jun 09, 2005 11:05 am
by finger007
Hi ondrew!

Yes, I'm sure. I used duplicates (Shift-D), not linked ones. So there should be meshes and not just objects.
The console showed the exported meshes correctly - so they are in the .x-file!

Thanks for your comment though! Might as well have been a flaw I did.

Posted: Sun Jun 12, 2005 6:01 pm
by konst
Hello,

Could you please answer for a question about DirectX exporter mod1.3.1 ?

It works great with animations and texture but there is a small problem
with.

When I added multiple bones to the armature they are didn't mentioned
in the "Frame RootFrame {...}" section.

I mean"Bone" and "Bone_001" were added correctly. But "Bone_002" and "Bone_003" are missed because they are in the different chain in the same armature.

When I placed "Bone_002" and "Bone_003" to the RootFrame then .X file seems to be OK.

Could you please fix this problem in you mod1.3.2 release?
I will be very appreciated for your help as well as many, many Blender
users.

Posted: Sun Jun 12, 2005 6:03 pm
by konst
I added few lines to the Blender DirectX exporter and now it can
produce correct .X files for multiple chains of bones in armature.

But there is a problem with transformation matrix (rotation and
position). This is because an animation in the .X files
differs from Blender animations.

Could you please fix or suggest how to calculate the transformation
matrix in the exporter?

This is a listing of code:

Code: Select all

self.openFrameBlock(mat_o, "RootFrame") # opens "Frame {"

				root_bon = amt.getBones()

                                # this FrameBlock should be placed in
cycle 
                                for bone in range(len(root_bon)):
                                  if not root_bon[bone].hasParent():
				    mat_r = self.getCombineMatrix(root_bon[bone])
				    name_r = root_bon[bone].getName()
				    self.openFrameBlock(mat_r, name_r) # opens "Frame {"
				    self.writeListOfChildrens(root_bon[bone])
				    self.closeBlock()
                                # end of cycle 

				self.exportMesh(obj, armatures[i])

				self.closeBlock()
Thank you very much,
Konst