Jump to content

Unity Material conversion


r3dwolf
 Share

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 :)

 

Link to comment
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

Link to comment
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 :(

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...