Anim8or Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

An update to Anim8or, v1.00b, is available with a few bug fixes. Get your copy HERE. See the "ReadMe" file for details.

Author Topic: Procedural animation  (Read 2628 times)

dwsel

  • Sr. Member
  • ****
  • Posts: 271
    • View Profile
    • Dwsel art
Procedural animation
« on: November 12, 2011, 04:13:46 pm »

Just a quick sketch that really took longer to render than to setup. It's animation morphing based on expression sine function of time + offset. There are a lot unexplored possibilities in animations based on ASL expressions!
« Last Edit: November 12, 2011, 04:24:19 pm by dwsel »
Logged

CoriDavis

  • Sr. Member
  • ****
  • Posts: 524
  • Scámarca Productions
    • View Profile
    • Youtube- AranScathProductions
Re: Procedural animation
« Reply #1 on: November 12, 2011, 04:17:33 pm »

Ooooh *is hypnotized* I wish I could figure out scripting. I could do a lot with it
Logged

dwsel

  • Sr. Member
  • ****
  • Posts: 271
    • View Profile
    • Dwsel art
Re: Procedural animation
« Reply #2 on: November 12, 2011, 04:23:01 pm »

Ooooh *is hypnotized* I wish I could figure out scripting. I could do a lot with it

Haha, I caught myself wasting my time by staring at it for a while as well ;P
Logged

Gyperboloid

  • Full Member
  • ***
  • Posts: 233
  • It's better not to do anything, than to do nothing
    • View Profile
Re: Procedural animation
« Reply #3 on: November 12, 2011, 09:15:30 pm »

Cool ! How did you insert the cubes, copies or ( more sure about ) 1 by 1 ? And how did you set them on a circle ?
And I think two of them ( see screenshot ) have the same phase ( move up/down together ). And I think that's because the settings you added are for one less cube. So if you remove one of them ( from the circle ), maybe then it would match.

And yeah, scripting is power ! Still can't find time to start learning it.   :'(
« Last Edit: November 12, 2011, 09:17:55 pm by Gyperboloid »
Logged

dwsel

  • Sr. Member
  • ****
  • Posts: 271
    • View Profile
    • Dwsel art
Re: Procedural animation
« Reply #4 on: November 12, 2011, 11:30:30 pm »


Cool ! How did you insert the cubes, copies or ( more sure about ) 1 by 1 ? And how did you set them on a circle ?

I made single cube, shifted it in point edit mode on x axis off the center, copy paste it and rotated it from menu by 15*, then selected both and copy paste and rotate by 30*, and so on. Then I made that many morph targets as many elements I had, in each morph target I had single element stretched (I pushed vertices in Notepad). I imported object to scene mode and assigned to each morph target an expression.
...but there is a quicker/simplier way...
Make one object (shifted from its pivot point) with one morph. Import n-times to your scene and rotate each copy by 360/n. Assign expression to each target morph.


And I think two of them ( see screenshot ) have the same phase ( move up/down together ). And I think that's because the settings you added are for one less cube. So if you remove one of them ( from the circle ), maybe then it would match.

You have good eye. I did not noticed it earlier, but I think I know where it comes from - I simply must not have taken into account PI while calculating offset, and there are 3.14159 of repetition instead of 3 repetitions ;)



And yeah, scripting is power ! Still can't find time to start learning it.   :'
(

I feel the same pain. I should learn more how to script graphics, and I hope one I'll make more animations of this kind.
Logged

Raxx

  • Administrator
  • Hero Member
  • *****
  • Posts: 1446
    • View Profile
Re: Procedural animation
« Reply #5 on: November 15, 2011, 02:40:50 am »

Very nice! Simple, but I don't think it's been done in Anim8or. Gives me an idea for the theme of the next Anim8or challenge...
Logged

ENSONIQ5

  • Sr. Member
  • ****
  • Posts: 925
    • View Profile
    • Mission Backup Earth
Re: Procedural animation
« Reply #6 on: November 15, 2011, 07:10:32 am »

Nice work dwsel, but I warn you, scripting is addictive!  The link below is to a steam engine I built a while back in Anim8or where all the motion (other than the camera) is scripted.  Each script derives its 'speed' factor from the size of a sphere that is not visible, so by just changing the size of the sphere you can change the speed of the engine.  In this video the sphere is keyframed to slowly expand, hence the engine accelerates.



And that is the real power of controller scripts for animation.  Things like rotations can be difficult to keyframe smoothly, and once keyframed their speed is fixed.  With controller scripts you are using mathematical formulae to define a change to an object (size, position, orientation, morphs, etc.) so they are precise, and easily adjusted.
Logged

dwsel

  • Sr. Member
  • ****
  • Posts: 271
    • View Profile
    • Dwsel art
Re: Procedural animation
« Reply #7 on: November 16, 2011, 09:47:12 pm »

Very nice! Simple, but I don't think it's been done in Anim8or. Gives me an idea for the theme of the next Anim8or challenge...

Hehe, I'm already curious ;)


Nice work dwsel, but I warn you, scripting is addictive!  The link below is to a steam engine I built a while back in Anim8or where all the motion (other than the camera) is scripted.  Each script derives its 'speed' factor from the size of a sphere that is not visible, so by just changing the size of the sphere you can change the speed of the engine.  In this video the sphere is keyframed to slowly expand, hence the engine accelerates.



How long did it take for you to make this fully animated engine? It looks really complex. And well.. this is perfect example of what should be scripts used for.

I was thinking about using animation scripts for something more organic, like for example a structure moving and morphing in the rhythm triggered by background music, or behave like an oscilloscope or spectrum analyzer (for given previously analyzed and prepared tabbed data).
Logged

ENSONIQ5

  • Sr. Member
  • ****
  • Posts: 925
    • View Profile
    • Mission Backup Earth
Re: Procedural animation
« Reply #8 on: November 17, 2011, 02:37:56 am »

The modelling obviously took a while, I don't recall how long, but the scripting was actually quite quick, maybe a couple of hours.  There are only four basic scripts used:

1) Rotation.  This affects the propeller, crankshaft, and planetary gearbox elements.
2) Rotational oscillation.  This is a modified rotation script that rotates an object less than 360 degrees in one axis, then the same amount in the other direction around the same axis.  An example might be a pendulum on a clock.  In this model, the valve rockers are animated with this script.
3) Positional oscillation.  This script is similar to the rotational oscillation but is applied to an object's position rather than orientation, so lateral motion is achieved.  This is applied to the valve pushrods.
4) Morph oscillation.  Similar to the rotational and positional oscillation, this script oscillates a morphing object, in this case the valve spring compression (I imagine this is what you used in your video, assuming the motion is achieved by morphs).

The scripts are then applied to each element, with adjustments made to the 'phase' of the sine/cosine operations behind the movement to ensure each element is correctly synchonised.  Some elements use multiple scripts, for example the piston connecting rods move with both lateral and rotational oscillations (astute readers will notice that conrod motion is not strictly sinusoidal due to the shifting angle of the conrod... I have cheated a bit and stuck to pure sine to keep it simple, since the fault is not visible in the animation).

I am happy to post the scripts themselves (in a new thread so as not to hijack yours) with some explanation of how they work, if anybody is interested.

EDIT: Love your ideas of morphing organic structures to music, that just sounds awesome!
« Last Edit: November 17, 2011, 08:59:18 am by ENSONIQ5 »
Logged