Trouble getting animation to show (not avatar animation)


#1

Hi. I have a shape-key animated object created in blender but can’t get the animation to show in HiFi.

I believe I have the entity properties set up correctly, and the Animation frame is progressing and cycling in the Properties sheet, so HiFi is ‘playing’ the animation. However the object is static in the world view.

My first suspect is that I am doing something wrong with my export from blender.


#2

I am don’t think shapekey animations (specifically animations, not shapes) are supported currently by Entities or the FBXReader:

You should probably create a worklist ticket on this.


#3

Hmmm. Looks like I might have to.

I tried doing it with rigging, but unless I can work out how to get multiple armatures operating in one mesh, I can’t get it working the way I need.


#4

Rigging and skinning is quite simple but can get really complex in blender. If using blender Check this tutorial and see if you can apply the same techniques ilto animate the entity with bones (they can be completely custom) https://youtu.be/B9iL1hmJXrI


#5

Thanks, I think that video covered exactly the two things I was missing!


#6

Okay. Thanks to @Menithal I now have a very sweet wave animation for my lake using bones running in blender. I am still having trouble importing it, though.

If I import sans-animation, it renders correctly, though statically of course.

When I try to import the animated version, I get this:

For some reason the drawing of the mesh is getting mangled and converging on the back of my avatar’s head (and moves with her).

I also made sure there are no non-manifold verts and tried with both double-sided (preferred) and single-sided normals.

I have been trying to use @Adrian 's Animating a simple winged object to get my blender export settings right, but - as happens with me and video tutorials - I am obviously still missing something!

Here is the relevant bits from within my blender project:

No doubt I am missing some vital step or option.


#7

Hey,
it sounds like the animations and the mesh are not agreeing with each other when baking the animations into the model::
instead of directly importing an animated version, have you separate files for animations and meshes?

First Export only the armature and the model without animations. (you can have animations in blender already, but we are not going to bake it)


Then export in a separate file only the animation and the armature.

Upload.

Then in high fidelity, use the edit script and add the model to the scene. Select the model, and check the properties tab in the Tools window.

Then apply the animation to the Animation URL path. and press “animation playing”

Currently note for now, only use 100 frames, that is until we can set the lastFrame value to be a bit higher (it currently isnt adjustable) and maybe slow it down by switching the animation fps to a smaller value. I haven’t had luck yet adding an looping animation with more than 100 frames for entities (you cant oddly configure it in the edit view), or using other animations baked into the animation file.


#8

Thanks again @Menithal. Your pointers got my mesh the right-side up, at least, however I still have the vertex-vomit issue :frowning:

No matter which way I try, bits of the animated mesh just want to converge on a point about 0.5m behind my avatar’s head.

Here is the relevant object hierarchy in its entirety.


The animation works (sic) by pumping rows of vertex groups up and down in a rolling sine-wave motion. It looks great in blender!


#9

I think I’ve seen this issue before with one of my avatars.

Have you checked that all the vertices of the model have weights? I noticed if vertices ( especially the ones that go towards your neck?) have no weights, they will fold towards the neck. Didnt even know this could occur with entities in a scene too though. More we know :wink:


#10

Excellent advice - all the vertices on the bottom of my lake (where there are no waves, of course) were not connected to a bone. I created a static bone to wire them too and the vertex-in-the-neck issue is fixed.

Thanks greatly!

Now just to tinker until I get my waves moving!


I think I’ll call it a night for now.

  • The Animation Frame value in the entity editor is ticking around in an expected manner.
  • The waves are not moving
  • The waves (though static) are present, indicating the first frame of the animation is picking up (unanimated, the lake surface is flat).

#11

Well, it works beautifully… In OpenWonderland!

Can’t get the animation to show in HiFi, though the Animation Frame value in the entity editor is ticking around as if it is running.


I quite like OpenWonderland - their capabilities system is good and I love their security model. Unfortunately they don’t have the funding or developer-base to keep properly up-to-date. And Java, while not in any way bad (the environment’s reputation got a bit unjustly trashed by the appalling web-applet implementation), Java is, in the end, a way of achieving cross-platform binary distribution - something that in the open-source world is a bit of a solution without a problem. A good set of cross-platform C++ libraries like QT achieve the same ends.


#12

This seems to occasionally occur to me too, so it might be a bug as well, but occasionally it does work well (So I have no idea yet what might be causing it):

You can see the results of my experimentation at
the laboratory (Large model’s warning)

Have you tried exporting the animation without including the NLA strips and All Actions? These might also interfere with the animation export.


#13

Ah i see. just did what I think you did and found the issue and was able to repeat the very same issue you were having:
After a few more experimentations
I found is that the current animation bone system does not support Translation of bones, instead supports rotation only.
So its something that has to be done engine side:

So I deviced a
#Temporary work around:
Instead of bouncing up and down,

you have to make a rig that rotates the bones so that the final bone moves relatively up and down. (You will have to add a bone at the very end too, it started rotating oddly in hifi if it wasnt there)

You can make these pretty quick by using IK solvers and saving the deform bones only, but its still quite a pain to do it this way…

But yeah it definetly seems the animation support is missing …

Worklist available here for the animation system improvements.


#14

That is a pretty ingenious work-around, but I think I will wait for engine support.

Pretty important for me as (now I have learned to use bones) I am hoping do do a bunch of multi-part sliding doors that with translational transforms too, eventually.