CS4803b

Assignment 2

 

Positioning particles on a surface

        Positioning particles on a model turned out to be the easiest part of the assignment.  Being so, I decided to implement it last.  As a result, it somehow seems like it doesn't belong in this animation. fall 

        I really wanted to animation water, so I began with a sphere.  One could visualize it as a  large water baloon.  It seemed like the most natural object for the subject.  To make a splash of water, I drop the sphere, and break it open on a ground plane.  After all this was thought up, I realized it wasn't particularly exciting, but I wanted to do water like stuff. 

        The sphere only has 42 vertices, but to make water look convincing, I wanted to use a lot of particles.  Karl Sims used 60,000 in Particle Dreams.  As a result, I had to figure out what to do with all the other particles.  I decided that all the other particles would just hide out(with transparency equal to 1.0).  As each particle representing a vertex of the sphere collided with the ground, that particle would turn into water and bouce off of the ground with 120 other particles.  I repeated this for each vertex, and the effect was that the particle would break up into many many pieces.  I ended up using 10,000, when I finally got the renderer working. 
     

 Applying a force field

 
    There are two main force fields in this animation.  One is gravity and the other is a random force.  The dropping of the sphere at the beginning of the animation is just gravity.  After the particles crash, they bounce back with reduced velocity.  They also vary in the x and y direction based on some random number.Splash 
    The river before the water fall is started at random velocities, but those velocities are only in the positive X direction.  This creates the illusion of water.  There is no movment in the Y or Z directions, but the particles are placed on random spaces along the Y axis to give the river some width. 

    Once the particles fall off the edge of the water fall, they are subject gravity.  To make the effect of the water look more convincing, I change the color of the falling water to something lighter than the original color.

    After dropping the "water balloon" I wanted to drain the water, as if it were spiraling into a sink.  I had some problems trying to think of the equations.  Finally I looked the equations up in a physics book.  By the time I figured out how to do the math, I didn't want to take the extra time to fix it.  In fact, I would have had time, but I struggled so long with the rendering that it will have to find it's way into another animation. 
 

 
 

Bouncing particles off of a plane

 
     This section posed to be the hardest of the three, but since the particles only bounce off of a horizontal plane, it turned out to be really easy. 
waterfallTo create the effect of water splashing, the color of the particle is changed to white, at the moment of impact.  It is then slowly interpolated back to the blue color of the water in the pool of water.

    The other collision of particles took place when the sphere crashes into the ground.  At the point of impact, as described above, the paricles spliter off into 120 pieces, change color to blue, and spread out.

 
 
 What I learned
 
   Inventor leaves you feeling like a director of a movie or photo shoot.  The first thing I saw when I ran particles was a ball.  I tried the rotation control and I got a faded ball, then a wall.  A normal question at this point might be, "Why does a rotation transform my primitive from a sphere to a plane?"  The discovery phase was slow, but eventually I realized that the camera starts at 0,0,0.  Soon after that I the navigation began to make sense.  It's not the most intuitive.  One has to think like a camera. 

    Once I figured out the controls, it became apparent to me that the real fun stuff was in the code.  It was very well documented.  With the exception that the colors had to be floats between 0 and 1, rather than an integer from 0 to 255 as the comments suggested. 

    Many of the calls were named such that one could guess their meaning.  Insight and the Inventor Mentor proved also to be highly valuable.  I experimented with specular highlights, cubes, but in the end used diffuse color and spheres.  Spheres looked more convincing in terms of water anyway. 

     I spent almost all of my time in Inventor using bounding box mode.  It was a must, even on the O2s, when I used anything more than 500 particles. 
 
    Another thing that was useful was my physics book.  I ended up no using any of the angular accelration stuff that I looked up, but if and when I do another passive simulation, I will pull out the physics book before I start trying to figure it out on my own. 
 
    I did the sounds slightly differently on this project.   I had some nature CDs with ocean waves.    I took a single crashing wave and dumped it to WAV format using some five different audio programs I found on the web.  I used five different programs because I had all kinds of compatibility problems.   When I finally did get the WAV file, I noticed the ocean wave's sound wave had a bell shape; it gradually came in and gradually faded away.   I squashed the first half of the wave sound in the beginning, causing the first second or so to play back in one tenth the amount of time.  This resulted in a quick, sharp sound.    I used the natural fading of the wave, and the result was a very believable splash.   The water fall sounds come from two other nature CDs.    One CD contained the sounds of Niagra Falls, and the other contained various streams, creeks, and rivers from a forest.    I crafted a sound file to gradually build from a stream to a loud waterfall.    Unfortunately it's hard to tell, because the animation is so short.  

 
 
 












1