.x animation feet artifacts

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
ison
Posts: 42
Joined: Sun Mar 24, 2013 9:09 pm

.x animation feet artifacts

Post by ison »

Hello.

I exported this model using Blender to .x file:
blend: https://dl.dropboxusercontent.com/u/123 ... mbie.blend
x: https://dl.dropboxusercontent.com/u/123 ... c/zombie.x

With the following export options:
Image

But I'm getting this result (walk1 animation):
Image

Why do I get these feet artifacts? How to fix this?
CuteAlien
Admin
Posts: 9670
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: .x animation feet artifacts

Post by CuteAlien »

I see the bug, but don't seem to have an .X exporter in Blender. Where did you get yours from?

edit: If you still have a dxviewer from old Microsoft sdk's you can also try how it looks in there.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
mongoose7
Posts: 1227
Joined: Wed Apr 06, 2011 12:13 pm

Re: .x animation feet artifacts

Post by mongoose7 »

Is this the animation or the initial pose? It looks as if you have *fixed* your model with a keyframe. You should only export bone rotations but I don't know enough about Blender to be specific. There aren't many posts on Blender export, so google this site for errors in export from Blender.
ison
Posts: 42
Joined: Sun Mar 24, 2013 9:09 pm

Re: .x animation feet artifacts

Post by ison »

I see the bug, but don't seem to have an .X exporter in Blender. Where did you get yours from?
Blender does have a .x exporter but it's not enabled by default. You have to enable it in File->User Preferences->Addons->Search for "directx"
edit: If you still have a dxviewer from old Microsoft sdk's you can also try how it looks in there.
I remember I used to use it to fix some texturing problems (import->export), but I don't have dxviewer anymore. Anyway, it would be nice to figure out why exporting directly from Blender doesn't work. Especially that it seems that only 2 bones act weird - it seems that both feet have some position offset (they are still animated but at incorrect position).
Is this the animation or the initial pose? It looks as if you have *fixed* your model with a keyframe.
It's an animation playing (walk1), not an initial pose. Animation almost works - the only problem is these feet which are at incorrect position. I tried all options combinations while exporting from Blender and the only one that worked (zombie didn't look like a condensed zombie ball) is the one shown in the first post.
mongoose7
Posts: 1227
Joined: Wed Apr 06, 2011 12:13 pm

Re: .x animation feet artifacts

Post by mongoose7 »

Well, I think you translated the foot at some stage.
ison
Posts: 42
Joined: Sun Mar 24, 2013 9:09 pm

Re: .x animation feet artifacts

Post by ison »

But how? In Blender everything looks fine. In Irrlicht I used setPosition() on whole node, and new position is set correctly, except feet have some offset relative to the body position.
CuteAlien
Admin
Posts: 9670
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: .x animation feet artifacts

Post by CuteAlien »

I found an old mview.exe in the dx8 sdk. It shows a similar problem with the feet (looking a little different but also obviously wrong). So it seems the problem is already on export.

Thanks to you I found out how to enable .X export in Blender, but no luck with animation export so far. Without animation I get a correct model, with animation I get currently nothing (meaning no model shows up in Irrlicht althought it seems to load something).

Just from the options I would say you have to apply modifiers also (if your model has some) as those are not exported otherwise.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
ison
Posts: 42
Joined: Sun Mar 24, 2013 9:09 pm

Re: .x animation feet artifacts

Post by ison »

Thanks CuteAlien.

I opened it in mview.exe and it indeed had the same artifacts as in Irrlicht, so from now on I guess I'll have to ask on Blender forum.
Without animation I get a correct model, with animation I get currently nothing (meaning no model shows up in Irrlicht althought it seems to load something).
Did you use the same export settings as shown in the first post? This was the only way to export working animation for me.
Just from the options I would say you have to apply modifiers also (if your model has some) as those are not exported otherwise.
I tried using 'Apply modifiers' option from export options but it didn't change anything.
CuteAlien
Admin
Posts: 9670
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: .x animation feet artifacts

Post by CuteAlien »

Yeah, I tried your settings, but maybe I missed something else (like selecting something first or so). Pretty sure I did something wrong.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
Foaly
Posts: 142
Joined: Tue Apr 15, 2014 8:45 am
Location: Germany

Re: .x animation feet artifacts

Post by Foaly »

I think I know what's wrong.
You tried to export a armature with constraints, but they are not supported by the exporter.
But for exporting, you can bake the constraints:

Select the armature object.
Press Space-Button (search), type in 'Bake', and click on 'Bake Action'.
In the dialog, you uncheck 'Only Selected' and 'Clear Parents', and check 'Visual Keying' and 'Clear Constraints'.
For bake data you select 'Pose' instead of 'Object'.
Then click 'OK'.

After that, you have a armature without constraints, which should export right. You should keep a copy of the original, so you can edit it easier.
ison
Posts: 42
Joined: Sun Mar 24, 2013 9:09 pm

Re: .x animation feet artifacts

Post by ison »

@Foaly
Wow! It worked!
Thank you very much, you're awesome :)
Post Reply