B3D Animation

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
kaliber
Posts: 117
Joined: Sat Jan 17, 2009 12:51 pm

B3D Animation

Post by kaliber »

I have a problem with my B3D model.

inside my B3D i have 2 Objects, and the structure is :

Scene Root
|--Character
|-----bip01
|--------.....
|--Weapon

My problem is the "Character" is Animated fine, But the "Weapon" is not animated.
the "weapon" animation is baked into keyframes.

i already test it on other engine. help please

sorry for my bad english.
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: B3D Animation

Post by CuteAlien »

Can you post the model somewhere?
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
kaliber
Posts: 117
Joined: Sat Jan 17, 2009 12:51 pm

Re: B3D Animation

Post by kaliber »

i will post it tomorow.

can you tell me the error possibility?
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: B3D Animation

Post by CuteAlien »

No idea what could go wrong without debugging it.
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
kaliber
Posts: 117
Joined: Sat Jan 17, 2009 12:51 pm

Re: B3D Animation

Post by kaliber »

here is my project with source :

http://dl.dropbox.com/u/69618949/B3DTest.zip
kaliber
Posts: 117
Joined: Sat Jan 17, 2009 12:51 pm

Re: B3D Animation

Post by kaliber »

there is my .max file inside, so you can compare the difference between them.
kaliber
Posts: 117
Joined: Sat Jan 17, 2009 12:51 pm

Re: B3D Animation

Post by kaliber »

it's seem irrlicht B3D loader only support skeletal animation.
CMIIW.
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: B3D Animation

Post by CuteAlien »

That could be. I haven't found time yet to look at it myself, but definitely makes sense.
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
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: B3D Animation

Post by CuteAlien »

I just spend some time on this, as far as I can see the b3d-format itself does not support other animations than bone animations. You wrote you already tested in another engine, so I thought you meant it worked there ... but seeing the format this would surprise me. Did you mean you tested in another engine and it also did fail 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
kaliber
Posts: 117
Joined: Sat Jan 17, 2009 12:51 pm

Re: B3D Animation

Post by kaliber »

im testing it using Blitz3d engine.

in Blitz3D engine if i load the B3D normally, it will have the same result with irrlicht.
so in Blitz3D you have to check each of the object (children) from root to the last children. if the chidren have animation then you have to animate the chidren.

maybe you want to see the code in blitz3D :
http://www.onigirl.com/pipeline/B3dExtensions.zip

i think the animations is in the subAnims.bb

Code: Select all

 
;------------------------------------------------------------------------------------------------
Function EXT_EnumSubAnims(root,nextSubAnim.EXT_SubAnim,count=0)
;
; Recurse through hierarchy to build linked list of sub anims
;------------------------------------------------------------------------------------------------
 
        Local anim.EXT_SubAnim
        
        For i= 1 To CountChildren(root)
                
                child = GetChild(root,i)
                
                ; does this node have animation?
                If (AnimLength(child)>=0)
                        DebugLog(EntityName(child)+": "+AnimLength(child))
                        count                           = count+1       
                        anim                            = New EXT_SubAnim
                        anim\entity                     = child
                        anim\nextSubAnim        = nextSubAnim
                        nextSubAnim                     = anim
                EndIf
                
                count = EXT_EnumSubAnims(child,nextSubAnim,count)
        
        Next
        
        Return count
        
End Function
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: B3D Animation

Post by CuteAlien »

What I meant is that b3d does not support other animation formats except bones. I did see that the file contained a second animation, I'm just not sure what it should act on. Maybe it should create a default-bone then affecting the whole mesh.
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
kaliber
Posts: 117
Joined: Sat Jan 17, 2009 12:51 pm

Re: B3D Animation

Post by kaliber »

i found that irrlicht store the animation keys in the joints, but irrlicht dont play it.

can you show me how to make it animate?
kaliber
Posts: 117
Joined: Sat Jan 17, 2009 12:51 pm

Re: B3D Animation

Post by kaliber »

I fixed it by attaching the mesh to the Joint.
but only if the node have mesh and have no bone weight.

maybe it violate B3D format rule. :D
thanks for the hint.
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: B3D Animation

Post by CuteAlien »

Sorry, didn't find more time for this yet, but good to see you found a workaround.
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
Post Reply