Thursday 19 January 2012

Machine Trigger & Purpose Testing

I've been testing out the box of dog food being poured into a dog bowl. Initially I tried using Maya's classic particles to achieve this effect. I discovered that classic particles can't collide with each other, only with other objects which isn't suitable for this situation. Therefore I decided to try using nParticles which are able to self collide and was more satisfied with the results.

Maya nParticle Dog Food in Bowl Test from Mickey Bowen on Vimeo.



I wrote an expression which controls the maximum number of particles emitted:


////Resets the rate attribute to emit no particles when ever the
////the sim is played back from first frame in the playback range
if(`currentTime -q` == `playbackOptions -q -min`){

emitter1.rate = 0;

}else{


////When frame 55 or higher is reached, emit 20 particles per second
if(frame >= 55){

emitter1.rate = 20;

}

}

////After 20 particles have been emitted, stop emitting.
if(nParticleShape1.count == 20){

emitter1.rate = 0;

}

I found that when making the dog bowl inot a passive collider (for the particles to collide with), the particles would not collide with it. I have determined that the reason for this is because the bowl is a NURBS object. I then created a polygon sphere, deleted the faces making up its top half, reversed the normals so the collision would calculate correctly and put it on a display layer and switched off its visibility. This object was acted as the collider.

I also came up with the idea of having a cart with a sail on it being propelled forward by a desk fan to start off the machine. I tested this out by modelling a simple extruded cube, assigning a Lambert shader to it completely transparent, making it an active rigid body and parenting the cart geometry to it. It's propelled forward by an air field.

I also created a simple nCloth simulation to create the effect of the sail being blown by the fan. I used some component to component constraints to its vertices in order to connect the nCloth object to the mast of the sail.

Maya Fan Blade Rotation Expression and nCloth Test from Mickey Bowen on Vimeo.



To make the wheels rotate as the cart moves, I wrote the following expression:

wheel_front_right.rotateZ = cart.translateX / (2 * 3.1416 * 1) * 360;

To rotate the fan blade, I used the following expression:

fan_blade.rotateX = (time * fan_control.speed) * 10;

////fan_control is a NURBS circle with attribute I created called speed used
////to control the rotation speed of the fan.

The fan is activated using two keyframes animating the speed attribute to a higher value over time.

Thursday 12 January 2012

Machine Purpose Idea & Testing Strategy

I've come up with an idea for the goal of my Rube Goldberg machine. The idea is a box of dog food being poured into a dog bowl. I thought that there could be an object such as a box, a hammer or a ball falling onto a see-saw, which then pushes a pole upwards and tilts the box of dog food (which will tilt using a hinge constraint in Maya) into the dog bowl. I've started implementing my testing strategy for this idea. My testing strategy is to setup the rigid body dynamics after all the parts have been modelled and positioned correctly. This way I can preserve the geometry in its original state which it was in before it rigid bodies are applied to it. I'm also planning on using particles for the pieces of dog food. To achieve the look of dog food, I intend to model a few different shaped pieces and use geometry instancing and have each one being emitted one at a time. I also thought that I could use a per particle expression to give each piece a random size and random rotation as they emerge from the box. I'm currently modelling the necessary parts.


Wednesday 11 January 2012

Rigid Body Dynamics Testing

I have been experimenting with rigid bodies to create potential sub systems of the Rube Goldberg machine. Here is one of them which I playblasted out of Maya. I used a green lambert shader for the active rigid bodies and a red lambert shader for the passive rigid bodies. I did this to make it easier to differentiate between active and passive. More to follow soon.

Maya Rigid Body Dynamics Test from Mickey Bowen on Vimeo.

Ideas - Purpose of the Machine

I have started to research into potential ideas for what the Rube Goldberg machine could actually be used for. Some of the ideas I have considered include:

  • Pouring cereal into a bowl
  • Opening a door
  • Putting a golf ball into a hole/cup
  • Ringing a bell

I have found in my research that as-well as the purpose of the device being very simple, the chain of events can also be quite simple. Some of these these events I have looked at include:

  • Dominoes falling in a row
  • Marbles rolling around down pipes and tracks
  • Cans rolling down slopes
  • Hammers/ pendulums swinging
  • See-saws tipping

Introduction

I have setup this blog to update the progress of my university assignment entitled "Rube Infinity". The goal of this assignment is to create a Rube Goldberg machine, a device which performs a very simple task in an overly complex fashion via a chain reaction of events. This machine will be created using the 3d computer graphics software Autodesk Maya 2012, using a technique called "Rigid Body Dynamics". This technique is used to simulate solid, non-deforming objects moving and colliding with each other driven by the laws of physics, as opposed to animating it manually using keyframes.