benikabocha / saba

OpenGL Viewer (OBJ PMD PMX)
MIT License
445 stars 61 forks source link

how to render animation? #32

Open lucasjinreal opened 2 years ago

lucasjinreal commented 2 years ago

thanks for this wonderful lib. How to make Saba able to render animation driven by vmd animation keyframes?

benikabocha commented 2 years ago

See below for a simple rendering sample.

VMD Animation Update: MMDModel::UpdateAllAnimation()

lucasjinreal commented 2 years ago

@benikabocha thanks, it's promising. So that I can reveal almost the same function as original MMD.

I have one more question, I using Saba_viewer to view a pmx model file. I can saw that it can view a very tiny animation on static model (like tiny waving on hair), how does this implemented? Saba_view only render the static model imo?

benikabocha commented 2 years ago

saba_viewer can uses to:

How to play animations:

  1. Drag and drop .pmx files into saba_viewer.
  2. Drag and drop .vmd files into saba_viewer.
  3. Click on "Animation" in the "Controls" window.
  4. Click the "Play" button.

The hair animation is a physical animation. The physical animation is always playing in saba_viewer.

lucasjinreal commented 2 years ago

@benikabocha thanks. what is physical animation? how does that information stored beside the pmx model itself?

benikabocha commented 2 years ago

MMD physics animation is the result of a physics simulation set to a node. A node can have several rigid bodies.

PMD File format:

PMX File format: