Hierarchy problems with 3ds and blitz

Blitz3D Forums/Blitz3D Programming/Hierarchy problems with 3ds and blitz

Rad Gravity(Posted 2003) [#1]
Hey everyone.
I have built a model in 3ds max that has independant moving parts that form a hierarchy. This makes animating easier without going all the way to inverse kinematics.
Anyway, when I import the model into blitz (its .3ds) even without any animation it is missing a couple of the entities and looks kind of messy for some reason.
I actually got better results with grouped objects in the hierarchy even though 3ds max doesn't export grouping information.
However, with none of the objects grouped the mesh looks bad in blitz.

What gives?

Also, EntityName doesn't seem to return anything except 0. This would be useful for multitexturing the object as I could assign the appropriate texture to the name when iterating through the hierarchy.


Ross C(Posted 2003) [#2]
Hey, are you using LoadAnimMesh followed by the FindChild command? I belive it goes like this, once you use loadanimMesh()

arm=FindChild("name")

Where name is what you called it in Max.


Rob(Posted 2003) [#3]
Look at the tuts in my signature for hints on importing .3ds objects. The problem is bad geometry - this isn't Blitz's fault.

Run a reset x form on the model in Max and you'll see how messed up it really is. This happens whenever you use mirror in 3dsmax. More explained in the tutorial...

Alternatively you can do it the right way and import as b3d - the max exporter is here: www.onigirl.com/pipeline
Note: you still may have to reset x form, then flip etc to fix.

And like Ross says, you need LoadAnimMesh as even if it's not animated, it is necessary to keep the hierarchy intact.


Rad Gravity(Posted 2003) [#4]
Thanks guys. I knew there would be some reason!
I'll do what you both said and see how I get on..


Rad Gravity(Posted 2003) [#5]
Ok, just in case you're interested. I reset the xform and no normals were inverted (but it's a great tip anyway). I checked and rechecked the hierarchy and no problems there, so I tried the b3d exporter and voila! The model is now perfect!

Unfortunately, FindChild doesn't seem to be recursive as it doesn't work on my model which has lot's of sub-parent levels in the hierarchy. I'm going to try and write a recursive FindChild function and see if that works. It would be so useful.

Whoever wrote the b3d exporter deserves a hearty pat on the back from every blitz3d coder!


Ross C(Posted 2003) [#6]
That was Mr Rob Cummings above :)


Rob(Posted 2003) [#7]
Or pudding, since there's two exporters :D