Hi
Interesting to see your post on this as I have been studying the Blender .X file exporters in the last few days.
I am trying to get an aeroplane mode out of Blender into a flight sim game, but the stumbling block I keep hitting is how to cope with anims.
The two . X file exporters that I have been comparing seem to have different issues to resolve. (I think both of these are in the default Blender 2.45 install, cant recall for certain now)
I am using 3D Exploration App. to view the exported models, this is quite old now but is a really nice 3d Viewer Application (available as Shareware)
Here’s what I have figured out so far
I tested some simple objects with and without Anims
Exporter 1
The model looks OK’ish, texture and geometry look basically correct in 3DE
Noted the following problems
- Smoothing groups are lost, all faces appear solid
- Vertex count is increased 4 fold or so.
- Animation is not viewable in 3DE App. The file with anim in appears as 0 frames total in 3DE
Issue 1)
I dont currently understand how .X files specify smoothing groups, tying to find info on this.
Issue 2)
The script exports vertices from the face list hence duplicates verts. I would need to re-write this to export from the vertex list to fix this problem. (Exporter 2 works this way I think)
Issue 3)
I think I have figured out why 3DE cannot understand the anims. My hunch is that it is the fact that the exporter uses anim key type 4 (16 element combined matrix). To fix this I think it needs a rewrite to use separate key types (Scale, Translate, rotate).
Exporter 2 (DP version)
The model looks a bit screwy on intial viewing in 3DE
Noted the following problems
- In 3DE if I flip all face normals, the geometry now appears OK.
- UV material map doesnt display
- Smoothing groups are lost, all faces appear smooth. This is puzzling as it is the exact opposite problem of Exporter 1 ?
- Animation is not viewable in 3DE App. The file with anim in appears as 0 frames total in 3DE
Issue 1)
The face normals appearing the wrong way around, might be easily fixed with a script mod ?
Issue 2)
Dont know why the material is missing, havent investigated that problem yet
Issue 3)
Not figured out how the smoothing groups are specified yet.
Issue 4)
Anims missing is same problem as decribed above, need to not use key type 4
If anyone can explain how the .X file format is meant to handle smoothing groups that would be appreciated as I cant find anything so far on the web ?
Regards Geoff