Is keyframed shape animation supported for V2 meshes?

Discussion area about developing with Ogre-Next (2.1, 2.2 and beyond)


knn217
Halfling
Posts: 78
Joined: Wed Jan 25, 2023 9:04 am
x 5

Is keyframed shape animation supported for V2 meshes?

Post by knn217 »

Hello, I follow "blender2ogre"'s guide here: https://github.com/corum/blender2ogre/b ... mations.md to try and export some cloth animation. The guide only had instruction for V1 meshes but when I exported V2 mesh, the shape animation seems to be supported too since it showed up in the exporter's log.

So how do I enable the shape animation? I've been looking at the morph animation sample but it seems to be different from what I need here

User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5429
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1337

Re: Is keyframed shape animation supported for V2 meshes?

Post by dark_sylinc »

Hi!

The Morph sample should be what you need. Is there anything specifically that you think is not fit for your use case?

knn217
Halfling
Posts: 78
Joined: Wed Jan 25, 2023 9:04 am
x 5

Re: Is keyframed shape animation supported for V2 meshes?

Post by knn217 »

dark_sylinc wrote: โ†‘Fri Dec 01, 2023 4:25 pm

The Morph sample should be what you need. Is there anything specifically that you think is not fit for your use case?

Thanks for the reply! I don't know if I've missed anything but the Morph sample is morphing meshes by changing the weight to their poses right?

In my case, I'm trying to import a mesh and load the shape animation I created when I exported that mesh, like in the link to blender2ogre that I provided.

I was expecting to be able to get some animation object from the scenenode of that mesh and then add frametime to it. I can't find the animation data in my object but the exporter did say that shape animation was exported, so the animation data probably is in there, I just don't know how to extract it. Here's the blender2ogre.log file:

Code: Select all

...
2023-11-27 10:48:56 [DEBUG] * Mesh has NO custom normals
2023-11-27 10:48:56 [ INFO] - Done at 0.37 seconds
2023-11-27 10:48:56 [ INFO] * Writing submeshes
2023-11-27 10:48:56 [ INFO] - Done at 0.37 seconds
2023-11-27 10:48:56 [ INFO] * Writing shape keys
2023-11-27 10:48:57 [ INFO] - Done at 0.76 seconds
2023-11-27 10:48:57 [ INFO] * Writing shape animations
2023-11-27 10:48:57 [ INFO] - Done at 0.81 seconds
...

The Morph sample seems to be creating an animation on the fly by changing the pose's weight to a sin function, not getting an existing shape animation and run it . Are these methods actually the same and I can achieve what I wanted with setPoseWeight? or is there another function for my use case?

User avatar
sercero
Bronze Sponsor
Bronze Sponsor
Posts: 479
Joined: Sun Jan 18, 2015 4:20 pm
Location: Buenos Aires, Argentina
x 167

Re: Is keyframed shape animation supported for V2 meshes?

Post by sercero »

Can you try exporting the mesh with OGREv1 and opening it in OgreMeshy to see if there is an issue with blender2ogre?

That is unless you want to share the model and I'll try that myself ๐Ÿ‘