Using 3ds Files in B3d

Blitz3D Forums/Blitz3D Beginners Area/Using 3ds Files in B3d

DanP(Posted 2007) [#1]
I'm a noob to B3d and so far...I just don't get it.

I have loaded a human figure designed in Poser and exported to a 3ds file format:

body=LoadAnimMesh("poser_figure.3ds")

I can see it in my B3d program, and I can move it around. So far, so good.

What I don't get is how to break it into its Child components, using GetChild, etc. Here is what I want to do first, to get myself up to speed:

I want to find something simple, like say the Right Thigh, and then apply a texture map to it. Can someone walk me through this first step?


Danny(Posted 2007) [#2]
You can use FindChild() to find a specific child (bone) in your animmesh. Like so:

ent = findchild(body, "Thigh_R")

With that entity handle, you can rotate/position/scale the Thigh as you would any other object..


Matty(Posted 2007) [#3]
Hi DanP -

Here is some sample code after exporting the default poser male figure in poser artist as a 3ds file.

You will notice that the limbs are not arranged in a hierarchy, so if you rotate one of them the children to not all move as well. However it should be relatively easy to texture them. Have a play with the code below.

Oh..you may not realise that the EULA for poser content says something about not using them outside of poser or something like that so you may want to think about what you are going to do with the poser figures.

Graphics3D 800,600,0,2

camera=CreateCamera()

mesh=LoadAnimMesh("untitled.3ds")

MoveEntity camera,0,2,-2
AlignToVector camera,0,-1,1,3,1



Repeat

If a<>0 Then TurnEntity a,1,2,3
UpdateWorld
RenderWorld
For t=1 To CountChildren(mesh)
c=GetChild(mesh,t)
If t=4 Then a=c
Text 0,t*20,EntityName(c)
Next

Flip

Until KeyDown(1)