SequenceNode

I don’t know really whom to direct this question to.

I have a model that I built in Blender that changes its vertices with time. it does not use bones or armatures but the vertices change. I’m looking for a way to export the model/animation.

One way that may be a possibility would be to create a SequenceNode egg file. In looking at the egg file that egg-texture-cards produces for a 2D egg, I still can’t figure out how to do this.

Could export each frame of the model with Chicken and then incorporate the data somehow into a single egg file using the SequenceNode functionality to flip through all the separate models?

Is this entirely impractical?

That would certainly work; we’ve used that trick for numerous other animation effects. Whether it’s practical or not depends largely on the size of your model and the number of frames you need, as you are basically creating a new copy of the model for each frame of animation.

To create a SequenceNode in an egg file, you just need to insert the “Switch { 1 }” and " fps { 24 }" lines in the parent group. (You can choose whatever fps you like, of course). In the egg interface, this means eggGroup.setSwitchFlag(1) and eggGroup.setSwitchFps(24).

David

Thanks for writing- I have a question about how to implement it.

When Chicken exports the egg file, it will have a list a verteces and then it will reference them to form the polygons. If I create say 5 models I wish to flip though them- how do I combine them into one egg?

If I simply copy/paste them in they will have different references for vertex 1, 2, 3, etc. since they were exported separately- all using the same name for distinct points. Is there an executable to help with this?

You mention that you’ve used this trick before- are there any example eggs in the tutorials I could look at?

You can do this:

<Group> {
  <Switch> { 1 }
  <Scalar> fps { 24 }
  <Instance> frame_0 {
    <File> { "frame_0.egg" }
  }
  <Instance> frame_1 {
    <File> { "frame_1.egg" }
  }
  ...
}

Or, you could create your model in Blender so that each frame is within its own group, all of which are under common node, then use Chicken to write out that model. It will correctly write out vertices for each group. You can then hand-edit the egg file to add the required and tags.

Of course, another answer would be to extend Chicken so that it does all of this for you.

David