.x model Animation problem
.x model Animation problem
Hi,
I have a model with a simple animation.
I've exported it to .x format and I'll try to load in Irrlicht....
...but my program crash at loading.
I've tried to export the model in both ASCII, BINARY and COMPRESSED mode.
Mview from Microsoft will load and display without problems.
If I export the model without the animation (only geometry),
Irrlicht will load it.
How can I do to view animation?
Thanks
I have a model with a simple animation.
I've exported it to .x format and I'll try to load in Irrlicht....
...but my program crash at loading.
I've tried to export the model in both ASCII, BINARY and COMPRESSED mode.
Mview from Microsoft will load and display without problems.
If I export the model without the animation (only geometry),
Irrlicht will load it.
How can I do to view animation?
Thanks
similar problem...
yeh i had a ms3d file which i exported from milkshape to ascii .x format, and its not being displayed correctly, the bones are all goofed. it's a cat, and it's leg get stretched out in front of it and inverted a wierd way.
niko:
i already sent you an email at your code3d address (cuz sf rejects all .zip files) with a program which demonstrates this attached, i will try and see if i can help fix it, but to be honest i dont entirely understand the code.
also the ms3d animations still aren't quite right, as was discussed in the forum some time ago ms3d files become "stretched" vertically when they are animated, and there is some wierdness with how the frames are handled as well....
the demo program demonstrates this as well
if anybody else feels they can help too lemme know your email and i can send it to you too, it's a quick mod of the helloworld tutorial.
it would be good to figure this out cuz right now neither of the skeletal animation formats seem to work right...
-Ted
EDIT: there are several ways to export .x model from milkshape, some of them produce a model which irrlicht can display proprly, but it won't animate it, the one i included in the .zip file displays perfectly in the x viewer that comes with the directx sdk, havent tried the other's yet tho
niko:
i already sent you an email at your code3d address (cuz sf rejects all .zip files) with a program which demonstrates this attached, i will try and see if i can help fix it, but to be honest i dont entirely understand the code.
also the ms3d animations still aren't quite right, as was discussed in the forum some time ago ms3d files become "stretched" vertically when they are animated, and there is some wierdness with how the frames are handled as well....
the demo program demonstrates this as well
if anybody else feels they can help too lemme know your email and i can send it to you too, it's a quick mod of the helloworld tutorial.
it would be good to figure this out cuz right now neither of the skeletal animation formats seem to work right...
-Ted
EDIT: there are several ways to export .x model from milkshape, some of them produce a model which irrlicht can display proprly, but it won't animate it, the one i included in the .zip file displays perfectly in the x viewer that comes with the directx sdk, havent tried the other's yet tho
My irrlicht-based projects have gone underground for now, but if you want, check out my webcomic instead! http://brokenboomerang.net
I've tryed with an animated model exported without the skinning information, but with animation.
The frame of the animation seems to be in the file.
Irrlicht show me only the model with no animation.
For NIKO---->I'm Alessandro from Italy, I've send the model with stupid animation for testing purpose some weeks ago. It worked for you in the engine?
The frame of the animation seems to be in the file.
Irrlicht show me only the model with no animation.
For NIKO---->I'm Alessandro from Italy, I've send the model with stupid animation for testing purpose some weeks ago. It worked for you in the engine?
but using milkshape for x export...(for that you'd better just use milkshape format, no?)
Well, Milkshape does not have weights. Only 1.0 weight, asign full to one bone, or to another. That's all.(besides, animation tools are also better in cfx) . Like halflife 1 style of animation. The joint mesh blends must be dealed with very thought full mesh editing and extra bones. And usually it either so gets well. Don't take me wrong, MS3d is very good for other matters.
That's why -having purchased Milkhsape also- I purchased Character fx. But hopefully , Blender will have it soon(I am loosing my hopes on AOI have a dx8 exporter, at least soon..)...3d Canvas(34 or 70$) does it already, but like Anim8or, no vertex mapping.That is, only envelopes.(and I dislike its modelling compared to Wings, Metasequoia or Milkshape) While is yet better than pure rigid link, needs yet a lot of work to make something look really well bending. And is quite more expensive than CFX.
Sadly I see no other better way for now than spending those cfx 15$...
Well, if you have max 4, 5 or 6 (lucky bastard ) , then use the free Panda x exporter, and should be much more happy than me with Character Fx
I have anyway hopes put on AOI and Blender. Ben,(there's already one for statics) or if not Bob Holocomb, will surely come with that Blender3d exporter for directx8.
Well, Milkshape does not have weights. Only 1.0 weight, asign full to one bone, or to another. That's all.(besides, animation tools are also better in cfx) . Like halflife 1 style of animation. The joint mesh blends must be dealed with very thought full mesh editing and extra bones. And usually it either so gets well. Don't take me wrong, MS3d is very good for other matters.
That's why -having purchased Milkhsape also- I purchased Character fx. But hopefully , Blender will have it soon(I am loosing my hopes on AOI have a dx8 exporter, at least soon..)...3d Canvas(34 or 70$) does it already, but like Anim8or, no vertex mapping.That is, only envelopes.(and I dislike its modelling compared to Wings, Metasequoia or Milkshape) While is yet better than pure rigid link, needs yet a lot of work to make something look really well bending. And is quite more expensive than CFX.
Sadly I see no other better way for now than spending those cfx 15$...
Well, if you have max 4, 5 or 6 (lucky bastard ) , then use the free Panda x exporter, and should be much more happy than me with Character Fx
I have anyway hopes put on AOI and Blender. Ben,(there's already one for statics) or if not Bob Holocomb, will surely come with that Blender3d exporter for directx8.
Panda Exporter, you mean.
Sorry, I did not tell...Biped is not supported only standard bones. Though skin modifier (easier to learn, imho) and physique is supported.
Not having Biped supported is a big disadvantage, but those having Max6 (probably the way to go with this exporter) actually have an advanced bones system, way better than nº 4 max version. And skin is way better too. Which is with what I would go for the skin modifier...
Hmm...this of the lack of biped support I din't know about this exporter...I have Ultimate Unwrap purchased. Another way to use MAX and directx (and I am amazed I haven't said yet, while all my post refer to same stuff) is Ultimate Unwrap MAX plugin (listed like Extras plugin or something in ultimate Unwrap download section. Only available save if purchased, not with demo, though. ) This plugin must be copied in Max 5 or 5.1 (at where I worked, didn't have time to test with Max 6) plugins folder, it DOES works with character studio Biped and also bones. Also skin and physique, I think it was. Exporting, as if wanna do the other way back (ultimate--->max) it converts all to standard max bones and skin modifier.
So you end you character animation, even with biped (I don't remember if you had to hide biped, I think so, before export) and simply, save as *.u3d file (appears if you copied the plugin in max plugins folder and started then Max) .It is reported by Max 5 users to work perfectly.
And then, what I could test carefully, was directx animation export, with bones and weights, of directx 8 format from Ultimate unwrap. SO, all what comes animated into Ultimate (as you would have done with your max character) can get exported as directx8 animation. Indeed, I tested importing a dx8 animation of my own made in Character Fx. It imported good to Ultimate, exported also well as directx 8 animations, as very clearly seen in Deep Exploration Demo (the good old 3d exploration) .
Ultimate unwrap cost 35$ dollars, if I remember well. Bought it a while ago..
I really hope soon to be able to recommend free tools like Blender or AOI for this instead of recommending the pay of 15 or 35 $...
It doesn't sound ok in an open source project page..
Anyway, the setiing of panda exporter..I don't know, havent used...but have used other exporter setting dialogs...surely mark export bones and animations, skinned&bonned templates...unluckily there's not a screenshot of the settings that appear in "x settings" at Panda web site...
if so, make a list here of those settings, we (me only as an artist) may tell you a bit about it.
Sorry, I did not tell...Biped is not supported only standard bones. Though skin modifier (easier to learn, imho) and physique is supported.
Not having Biped supported is a big disadvantage, but those having Max6 (probably the way to go with this exporter) actually have an advanced bones system, way better than nº 4 max version. And skin is way better too. Which is with what I would go for the skin modifier...
Hmm...this of the lack of biped support I din't know about this exporter...I have Ultimate Unwrap purchased. Another way to use MAX and directx (and I am amazed I haven't said yet, while all my post refer to same stuff) is Ultimate Unwrap MAX plugin (listed like Extras plugin or something in ultimate Unwrap download section. Only available save if purchased, not with demo, though. ) This plugin must be copied in Max 5 or 5.1 (at where I worked, didn't have time to test with Max 6) plugins folder, it DOES works with character studio Biped and also bones. Also skin and physique, I think it was. Exporting, as if wanna do the other way back (ultimate--->max) it converts all to standard max bones and skin modifier.
So you end you character animation, even with biped (I don't remember if you had to hide biped, I think so, before export) and simply, save as *.u3d file (appears if you copied the plugin in max plugins folder and started then Max) .It is reported by Max 5 users to work perfectly.
And then, what I could test carefully, was directx animation export, with bones and weights, of directx 8 format from Ultimate unwrap. SO, all what comes animated into Ultimate (as you would have done with your max character) can get exported as directx8 animation. Indeed, I tested importing a dx8 animation of my own made in Character Fx. It imported good to Ultimate, exported also well as directx 8 animations, as very clearly seen in Deep Exploration Demo (the good old 3d exploration) .
Ultimate unwrap cost 35$ dollars, if I remember well. Bought it a while ago..
I really hope soon to be able to recommend free tools like Blender or AOI for this instead of recommending the pay of 15 or 35 $...
It doesn't sound ok in an open source project page..
Anyway, the setiing of panda exporter..I don't know, havent used...but have used other exporter setting dialogs...surely mark export bones and animations, skinned&bonned templates...unluckily there's not a screenshot of the settings that appear in "x settings" at Panda web site...
if so, make a list here of those settings, we (me only as an artist) may tell you a bit about it.
option in pandora are (checkbox):
For Objet:
-mesh definition
-materials
-Optimize
-bones
-Geometry
-dummy
-Mesh normals
-flip normal
-mapping coordinate
-vertex color
-use local object space
For Animation:
-Matrix Key
-Position, Scale & Rotate Key
-Include Animation options
- type: closed or open
-Pos Quality : Spline pos or linear pos
-Timeline : 3ds max ticks or key frame
for texture
-texture conversion : none or convert to or copy texture map
-Scale texture
-use full path name
for X file setting
-Text or binairy or binary with compression
-No frame or top frame only or sub frame hierarchy
-left handed axis
So what option does Irrlicht support?
which option for static and which option for animated mesh?
tx
For Objet:
-mesh definition
-materials
-Optimize
-bones
-Geometry
-dummy
-Mesh normals
-flip normal
-mapping coordinate
-vertex color
-use local object space
For Animation:
-Matrix Key
-Position, Scale & Rotate Key
-Include Animation options
- type: closed or open
-Pos Quality : Spline pos or linear pos
-Timeline : 3ds max ticks or key frame
for texture
-texture conversion : none or convert to or copy texture map
-Scale texture
-use full path name
for X file setting
-Text or binairy or binary with compression
-No frame or top frame only or sub frame hierarchy
-left handed axis
So what option does Irrlicht support?
which option for static and which option for animated mesh?
tx
-----------------------------
Sans danger, pas de gloire...
http;//bappy.free.fr
-----------------------------
Sans danger, pas de gloire...
http;//bappy.free.fr
-----------------------------
well i would just use the milkshape models....
but they have problems of a similar nature also. they come out all stretched, and with like thousands more frames than they ought to. basically they just look wierd and don't have correct animations.
skeletal animation is apparently very complex and hard to get to work right!
let's all try and help niko to figure out what is going wrong with both of them
-Ted
skeletal animation is apparently very complex and hard to get to work right!
let's all try and help niko to figure out what is going wrong with both of them
-Ted
My irrlicht-based projects have gone underground for now, but if you want, check out my webcomic instead! http://brokenboomerang.net
screen shots would come handy
I can't code or talk about it, but I have already helped and crossed lots of emails with two other engines, directx ones, besides other similar stuff.
That means almost nothing, but I may throw a clue if is something I have seen before.
Post screens in different angles for me to see how it gets deformed. Mostly to see if it's joints positions/rotations, or weights.
Post both better, as it can be that
I have sent a -bad- dx model ,animated, quite long ago to niko to help loading dx files, and don't know if I remember he said me it was succesful..I may be messing my brain with other coder...
This same model was loaded ok in the other engines. Served to them to check that other dx file than the sample, worked. But for example, mirroring the bones in Character Fx, wrecks the weights in whatever the engine.
usually if the x file loads well in ms meshview but bad in engine, in engine problem...
Even Niko added spline interpolation -also supported by character Fx- which makes the timing way smoother controled by the artist.
Ok the much more frames...is produced by time scale.In the great dx export dialog CFX has, you can set whatever the time scale. Also I think you can in Ultimate Unwrap, I may check later.
Deep Exploration indeed loaded the time scale badly.
But the two guys I mentioned, loaded perfectly finally my ugly animated model, and must say: with same timing. Both where dx9 engines, but seems for dx8 skinned mesh thing, is the same. In summer though has been some update, and important one , told me a coder. May worth Niko check it. Is called "summer ....whatever" it involves some slight changes.
If it's, like it is, text based, ascii dx...I suppose by code you can control stuff like scale time and that...maybe that comes already wrecked by your exporter, I don't know.
All what I have fully tested is that CFX exported works well -unless you mirror bones inside cfx-
let's see the list, I'll comment whatever I can to see if I throw some clue.
I havent tested this exporter, so I am talking of my general short experience with others.
For Objet:
-mesh definition (dunno..??) (what the doc says about this one? It could be subdivide...for games? nah... maybe smoothing shading..I dunno.)
-materials (yep, sounds it'd be better checked.. )
-Optimize (nope..it may reduce tris or something. May come handy)
-bones (yep, check it. Otherwise it may not export animation, I suppose)
-Geometry (again, I suppose unmarking it is only when you don't want to export objects and geometry.. )
-dummy (the dummy stuff usually you don't want to export. Most likely will appear as weird unwanted object (max helpers, biped objects...))
-Mesh normals (yep, smoothing info. If all works well, smooth shadingsm direction of normals, shoul be seen as is in max...)
-flip normal (nope. Unmark it. Unless you experience the engine flips the normals, so you need to export them flipped .Not likely. If mark i t, surely you'll see the model black, no shading.)
-mapping coordinate (yep, mark it or uv coords wont be there, and thetexture will apply weirdly, if applies)
-vertex color (unmark it. For reduce problem error. It usually should not harm....indeed, u should check marking also. It could have a base color and engine gets anoied if not there...is vertex colors. Different to texture. You can color a mesh , no need to uvmapping and texturing. no way though for realtime texturing, as depends on mesh polycount for definition...used for lighting faked effects, colors, shaders, etc. No need fro them now. )
-use local object space (not sure about it, but use to cause problems. I think is if is refered to global coordinates, or to the object origin...Maybe leave it marked...dunno...)
For Animation:
-Matrix Key (now comes the nightmare. I mark this in cfs. you never know.. I think I was told depends if matrix is used by engine. I did, and yet loaded well in an engine that do not use it, so maybe leave it marked.Anyway, this all is trial an error, like always. )
-Position, Scale & Rotate Key (yeep...seems like yep. This ones I suppose are the ones you make when you pose the model!)
-Include Animation options (yep, as first, marke them)
- type: closed or open (no idea. maybe means loop? )
-Pos Quality : Spline pos or linear pos (spline is WAY better than linear. Though, needda check that with irlitch. Supposedly I read the other day Niko posted it's been added. )
-Timeline : 3ds max ticks or key frame (argh, no idea. I suppose , keyframe...)
for texture
-texture conversion : none or convert to or copy texture map (hmmm..maybe no...)
-Scale texture (nope...)
-use full path name (i always prefer relative and put the texture in same folder than the max and x file...)
for X file setting
-Text or binairy or binary with compression (text. is irlitch ascii x . Compression I don't know if it'd go in irlitch...)
-No frame or top frame only or sub frame hierarchy (I think I did put always that had a top frame, but those two engines did eat the file anyway or the other...)
-left handed axis (marked, if I remember well. or was right handed...argh.)
BTW, post both of you the screens (several angles, please, 2 or so) of the x files loaded meshes animated, with problems. I may see something familiar to me and help a bit more
Niko will also benefit from those shots
I can't code or talk about it, but I have already helped and crossed lots of emails with two other engines, directx ones, besides other similar stuff.
That means almost nothing, but I may throw a clue if is something I have seen before.
Post screens in different angles for me to see how it gets deformed. Mostly to see if it's joints positions/rotations, or weights.
Post both better, as it can be that
I have sent a -bad- dx model ,animated, quite long ago to niko to help loading dx files, and don't know if I remember he said me it was succesful..I may be messing my brain with other coder...
This same model was loaded ok in the other engines. Served to them to check that other dx file than the sample, worked. But for example, mirroring the bones in Character Fx, wrecks the weights in whatever the engine.
usually if the x file loads well in ms meshview but bad in engine, in engine problem...
Skeletal, if add fully and well the weights thing (thi smust be a matter of fine retouches, don't worry) is the most powerful way to add character animationwell i would just use the milkshape models....
but they have problems of a similar nature also. they come out all stretched, and with like thousands more frames than they ought to. basically they just look wierd and don't have correct animations.
skeletal animation is apparently very complex and hard to get to work right!
let's all try and help niko to figure out what is going wrong with both of them
-Ted
Even Niko added spline interpolation -also supported by character Fx- which makes the timing way smoother controled by the artist.
Ok the much more frames...is produced by time scale.In the great dx export dialog CFX has, you can set whatever the time scale. Also I think you can in Ultimate Unwrap, I may check later.
Deep Exploration indeed loaded the time scale badly.
But the two guys I mentioned, loaded perfectly finally my ugly animated model, and must say: with same timing. Both where dx9 engines, but seems for dx8 skinned mesh thing, is the same. In summer though has been some update, and important one , told me a coder. May worth Niko check it. Is called "summer ....whatever" it involves some slight changes.
If it's, like it is, text based, ascii dx...I suppose by code you can control stuff like scale time and that...maybe that comes already wrecked by your exporter, I don't know.
All what I have fully tested is that CFX exported works well -unless you mirror bones inside cfx-
let's see the list, I'll comment whatever I can to see if I throw some clue.
I havent tested this exporter, so I am talking of my general short experience with others.
For Objet:
-mesh definition (dunno..??) (what the doc says about this one? It could be subdivide...for games? nah... maybe smoothing shading..I dunno.)
-materials (yep, sounds it'd be better checked.. )
-Optimize (nope..it may reduce tris or something. May come handy)
-bones (yep, check it. Otherwise it may not export animation, I suppose)
-Geometry (again, I suppose unmarking it is only when you don't want to export objects and geometry.. )
-dummy (the dummy stuff usually you don't want to export. Most likely will appear as weird unwanted object (max helpers, biped objects...))
-Mesh normals (yep, smoothing info. If all works well, smooth shadingsm direction of normals, shoul be seen as is in max...)
-flip normal (nope. Unmark it. Unless you experience the engine flips the normals, so you need to export them flipped .Not likely. If mark i t, surely you'll see the model black, no shading.)
-mapping coordinate (yep, mark it or uv coords wont be there, and thetexture will apply weirdly, if applies)
-vertex color (unmark it. For reduce problem error. It usually should not harm....indeed, u should check marking also. It could have a base color and engine gets anoied if not there...is vertex colors. Different to texture. You can color a mesh , no need to uvmapping and texturing. no way though for realtime texturing, as depends on mesh polycount for definition...used for lighting faked effects, colors, shaders, etc. No need fro them now. )
-use local object space (not sure about it, but use to cause problems. I think is if is refered to global coordinates, or to the object origin...Maybe leave it marked...dunno...)
For Animation:
-Matrix Key (now comes the nightmare. I mark this in cfs. you never know.. I think I was told depends if matrix is used by engine. I did, and yet loaded well in an engine that do not use it, so maybe leave it marked.Anyway, this all is trial an error, like always. )
-Position, Scale & Rotate Key (yeep...seems like yep. This ones I suppose are the ones you make when you pose the model!)
-Include Animation options (yep, as first, marke them)
- type: closed or open (no idea. maybe means loop? )
-Pos Quality : Spline pos or linear pos (spline is WAY better than linear. Though, needda check that with irlitch. Supposedly I read the other day Niko posted it's been added. )
-Timeline : 3ds max ticks or key frame (argh, no idea. I suppose , keyframe...)
for texture
-texture conversion : none or convert to or copy texture map (hmmm..maybe no...)
-Scale texture (nope...)
-use full path name (i always prefer relative and put the texture in same folder than the max and x file...)
for X file setting
-Text or binairy or binary with compression (text. is irlitch ascii x . Compression I don't know if it'd go in irlitch...)
-No frame or top frame only or sub frame hierarchy (I think I did put always that had a top frame, but those two engines did eat the file anyway or the other...)
-left handed axis (marked, if I remember well. or was right handed...argh.)
BTW, post both of you the screens (several angles, please, 2 or so) of the x files loaded meshes animated, with problems. I may see something familiar to me and help a bit more
Niko will also benefit from those shots