DirectX file export from 3ds Max troubles

Post your questions, suggestions and experiences regarding to Image manipulation, 3d modeling and level editing for the Irrlicht engine here.
Post Reply
Zeroth
Posts: 17
Joined: Wed Jul 02, 2008 11:21 pm

DirectX file export from 3ds Max troubles

Post by Zeroth »

Hi,

I've been experimenting with adding interchangeable meshes (such as armour or weapons) to an existing character model. The way I've approached this thus far is to model the additional mesh within the same scene as the character model and constrain it to the appropriate joint so that it works with existing animations. I then export it, using the Panda DirectX exporter plugin, and load the mesh (now in my program) into an additional animated mesh scene node, meaning that I have to perform the same transformations that are performed on the character (when it moves) on the new mesh too. However, I've been scratching my head over the result for a couple of days now:

Test shoulder pads in 3ds Max
Image

Test shoulder pads in-game
Image

As you can see, for some reason, the right shoulder pad is in the correct position - and incidentally works perfectly with all the character's animations, whereas the left shoulder pad is in the wrong position.

If anybody can explain why this possibly might be happening, I would very much appreciate it. I would also very much appreciate it if anybody could suggest a better way of handling this entire process, preferably within a single scene node but still allow me to switch meshes on the fly. Thanks in advance.
VPB_Enge
Posts: 17
Joined: Wed Jan 02, 2008 11:35 pm

Post by VPB_Enge »

I'm having the same extremely anoying problems.
I'm trying basicly the same.

My system loads a .x file into a IAnimatedMeshSceneNode , using 3DsMax point helpers to define connection positions.
When I have the 'connector skeleton ' loaded, I'm hooking up IMeshSceneNodes to the connector positions. Works like a charm.

BUT.

The directx importer seems to be missing some functions:

In case of a IMeshSceneNode:
The model needs to be one mesh. Seperate objects will not be displayed.
You have to attach all objects in 3dsmax to one object and convert it to an editable mesh.

Plus: If you create one Sphere for example, and load it into a IMeshSceneNode, it works great.
But, if you scale the sphere in 3dsmax, the irrlicht importer seems to miss the transformation matrix and displays the sphere 'normally'.
If you convert the sphere to an editable mesh, then scale, it works.

The directx viewer provided with the DX SDK does what irrlicht does not...
I've tried several ways to get around the problem but it is simply anoying to keep the limitations in mind, all the time, when creating a model in smax, to find out later it still displays weird results when you're done.

Looks like we need a importer update for irrlicht. Or has anybody some solution ?

I'm still on irrlicht 1.4 ( Still have my original MS vC++ 6.0, wont compile 1.4.1 )

Besides this problem, I'm having so much fun with this engine. Thumbs up for the makers. Incredible that this superb engine has been created by guys who actually share their hard work.
Zeroth
Posts: 17
Joined: Wed Jul 02, 2008 11:21 pm

Post by Zeroth »

As a test, I made an entirely new mesh for the left shoulder pad. It works.

So, does anyone know if there's any hidden attributes carried over when you clone a mesh that could be causing the displacement?

EDIT: I think I might have found the problem.

Right shoulder pad:
Image

Left shoulder pad:
Image

The only trouble is, I don't know how to change the center point, seeing as selecting 'Create Center Point' doesn't seem to do anything at all.
VPB_Enge
Posts: 17
Joined: Wed Jan 02, 2008 11:35 pm

Post by VPB_Enge »

<deleted my ow blabla>

Checking the sourcecode for the importer to see what couses my problem :idea:
VPB_Enge
Posts: 17
Joined: Wed Jan 02, 2008 11:35 pm

Post by VPB_Enge »

Finally I tried another model format, downloaded the plugins for B3d fromhttp://www.onigirl.com/pipeline/ and all the weird problems are solved. And it supports bones and helpers as well. No more .x files for me ! Give it a shot, it might suit your needs as well.
Zeroth
Posts: 17
Joined: Wed Jul 02, 2008 11:21 pm

Post by Zeroth »

I'd try that, but I just get an error from 3ds Max (2009) after installing the plugin:

'DLL <C:\Program Files\Autodesk\3ds Max 2009\PlugIns\b3dexp.dle> failed to initialize. Error code 127 - The specified procedure could not be found.'

Compatibility issue with 2009? :(
VPB_Enge
Posts: 17
Joined: Wed Jan 02, 2008 11:35 pm

Post by VPB_Enge »

Did you try to install the patch ? The download is on the same page. That patch fixed the same problem for me.
Zeroth
Posts: 17
Joined: Wed Jul 02, 2008 11:21 pm

Post by Zeroth »

I patched it with the version 9 patch and then I get 'DLL <C:\Program Files\Autodesk\3ds Max 2009\PlugIns\b3dexp.dle> is not made for this version of the program.'

Is there a 2009 patch that I'm missing here?

EDIT: I installed 3ds Max 2008 so that I could at least try exporting to B3D. First I exported the character mesh itself, and that works absolutely fine. Then I tried to export the shoulders and the skeleton on their own, and even though the animations work in the B3D mesh viewer, they don't work in the Irrlicht engine.
Zeroth
Posts: 17
Joined: Wed Jul 02, 2008 11:21 pm

Post by Zeroth »

Problem solved.

mr.Zog to thank for: http://irrlicht.sourceforge.net/phpBB2/ ... b60b533bca

Goodbye .X
VPB_Enge
Posts: 17
Joined: Wed Jan 02, 2008 11:35 pm

Post by VPB_Enge »

Good. I see this guy also found out that .x is not so hot.... I'm so satisfied with b3d. No more crappy unexplainable stuff happening in my scenes.
Post Reply