Saturday, March 31, 2018

Basic 3D Animation with SceneMax language

Animating a 3D model is fairly easy with SceneMax. The language comes with a few built-in models so we can use them for this tutorial.
Let's dive in directly to the actual animation code:

Sinbad is a model ;
this tells the computer to look for a resource called Sinbad which is a 3D model 

David is a Sinbad ;
this line declares a variable named David a new instance of Sinbad.
let's run these two lines of code and see what happens.


Now, let's rotate our model
David.rotate(y+360) in 2 seconds ;
this will rotate our model a full 360 degrees revolution around Y axis



And finally let's do some bones (or skeleton) animation. Sinbad model comes with a few built-in skeleton animations. let's try some of them
David.Dance then SliceVertical ;
we told the computer to first run the Dance animation and then the SliceVertical animation

Pretty impressive for a 4 lines of code program...

No comments:

Post a Comment