r3dwolf

Unity Material conversion

Recommended Posts

14 hours ago, aFalcon said:

Hey @MackeyK24 possibly create new thread specific to "nitty gritty of animation code"? Ping me there, happy to try to help with that question ... separate of pbr or unity textures? : )

 

 

Yo @aFalcon .. What I really need to for some to help me create Animation Blending (not blending between two animations like enableBlending and blendingSpeed)

But actual WEIGHTED animation blending..

Lets say a have a walk forward animation... Somewhere in the code there has got to be a spot where the animation GETS the transformation matrix for each bone and uses that to POSE the bone for that frame.

I need to find that EXACT point in the code... then I can say for example look in the left strafe animation for same TIME FRAME as walk forward animation and grab that matrix... if I take WALK matrix for that bone at a given frame and LERP each float (16 matrix poistions) from the strafe animation with the walk animation using a value of 0.5... the resulting matrix should contain a WEIGHTED BLEND of the animation... I would then USE that new weighted blend matrix as the pose for the bone for that frame... That that is way simplified.... but if can get at least that far... I can tie all the Unity Blend Tree stuff into the toolkit and we could have blended animation including layers... Like top half of the body swinging a sword while running.... could be awesome if I could get some help :)

I been trying to get @Deltakosh to help wit that :)

 

Share this post


Link to post
Share on other sites

Still not sure to get what you need to achieve but some info

This is the very code which applies interpolated value to targets:

https://github.com/BabylonJS/Babylon.js/blob/master/src/Animations/babylon.runtimeAnimation.ts#L183

Please note that when a skeleton is animated the markAsDirty is called:

https://github.com/BabylonJS/Babylon.js/blob/master/src/Bones/babylon.skeleton.ts#L211

Same for bone: https://github.com/BabylonJS/Babylon.js/blob/master/src/Bones/babylon.bone.ts#L184

Share this post


Link to post
Share on other sites
7 hours ago, Deltakosh said:

Still not sure to get what you need to achieve but some info

This is the very code which applies interpolated value to targets:

https://github.com/BabylonJS/Babylon.js/blob/master/src/Animations/babylon.runtimeAnimation.ts#L183

Please note that when a skeleton is animated the markAsDirty is called:

https://github.com/BabylonJS/Babylon.js/blob/master/src/Bones/babylon.skeleton.ts#L211

Same for bone: https://github.com/BabylonJS/Babylon.js/blob/master/src/Bones/babylon.bone.ts#L184

Shit .... This is going to be harder than I thought :(

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.