Heritage Comics HSQ    |     home
Photoshop Tutorials   |   Poser Tutorials   |   3D Max Tutorials   |   Maya Tutorials   |   Lightwave Tutorials   |   Byrce Tutorials   |   Vedio Tutorials   |   Downloads   |   How to Draw the Heritage Way!
3D Max Tutorials



by Jay Price

This tutorial will go through an expression for the opening/closing of a claw around a ball. Before we start get this ZIPPED ARCHIVE with the needed .MAX files for this exercise.

Open up the Pre-Expression.max file.

The scene has a simple floor with a ball sitting on a stand. "Floating" in the air is the claw which will reach down and grab the ball. It is our job to write an expression for the claw to open when it gets near the ball and close around it.

The claw has been setup with the following:
A Shaft (Cylinder)
A Connector (the box)
Fingers (more boxes with a bend modifier on them)
The 4 Fingers are linked to the Connector and the Connector is linked to the Shaft.
When we are all finished all we have to do is move the Shaft up and down, and it should open/close the claw around the ball. Take a moment to go through the scene. Look at the pivot points for everything. These are key, since an object's position are determined with them. With good positions of pivot points it can make things a whole lot easier.

First lets figure out how we want this thing to open and close. We need to figure out when the claw starts to open then starts to close so it doesn't hit the ball. But to do that we need to decided what objects are going to be references. For example, how far from the ball will the claw begin to open.
Now since the Shaft is the parent for the rest of the claw we its position as a reference to determine the distance to the ball. So all of my measurements are going to be based on the "Z-axis" of these two objects. Most of this expression will be based on the distance between these two objects. If you move the shaft up and down you will notice that at about 14 units away the claw begins to clip with the ball. So we will need the claw open at this point, and we would like the claw to be closed when the Shaft is about 7 units away from the center of the ball.
To make everything "semi" easy lets have the claw start to open at 21 units and be completely open at 14 units and then be completely closed at 7 units. (Note: I used the Measure Helper Object to do most of these measurements. I had one end at the center of the ball and the other at the end of the shaft. These measurements are pretty close -not exact- but close enough to fool the eye at 30 frames a second). Also I need to pick how far the claw will open up. I picked -35 degrees since it gets the job done without looking all stupid. Now that we have a rough idea of what we want to happen lets setup the controllers for the fingers.


Select finger 2 and go to the Motion Panel. Under the "Assign Controller Rollout" select the "Rotation: TCB Rotation" controller and then click the "Assign Controller" button. It should give you a list of different controllers. Pick "Euler XYZ". The reason is... "Expression controllers can work only with the individual XYZ components of Euler rotation. You can't assign an expression to TCB rotation or other kinds of rotation controllers." (Straight from the online help) Now click on the "Y Rotation: Bezier Float" and click "Assign Controller" again. This time select "Float Expression". Right click on "Y Rotation: Expression Float" and choose properties. You should now have a Expression floater that looks like this.


Ok here is a brief run down on what the different options are. When writing your expression you can use two different types of variables. The first type is a scaler. A scaler is just a regular number ie) 10, 40.290, -1, 69 etc. You can also assign some controllers to your scaler like the Bezier Float controller. The second type of variable is the vector or simply [x,y,z]. Like the scalers you can assign your own values or assign them to a controller.

It is normally a good idea to write down all your equations and stuff before you type them into the computer. Even if you have the right ideas in the expression you may have it in the wrong syntax and nothing will work right. So if you have it on paper you can work through the equations to see if they work. If the do work then you know it is your syntax.
Now the first variable I need is the angle of my closed finger. If you remember from before, the claw's closed position is at 0 degrees (world coordinates) and the open position is at -35 degrees. So to make a scaler variable of 0 degrees do the following. Select scaler then type in "Closed" under name and then click create. Click on "assign to constant" and set it for 0.
Now lets make the two vector variables. One is the position of the Ball and the other is the position of the Shaft. So click vector and under name type in BallPos and hit create. Then click "assign to controller" go through the "Track View Pick" until you find the Ball and apply it to the position controller. If you can't find it World>Objects>Ball>Transform>Position. Now do the same thing again but call the new variable ConPos and pick the Shaft position controller. World>Objects>Shaft>Transform>Position.


It is time to write the expression.
There are three sections to the opening and closing of the claw. One is high up when the claw is always closed. The second is when it is approaching the ball which is when it will open up. And the third is when it is closing again. (I didn't worry about what happens when I goes down past the ball. Just don't make the claw go down to far in an animation.) Here is the three sections in equation form. (X - Y) = Delta of X and Y <- Brief Math Catch-up...This is just the distance between the two objects
ConPos.z - BallPos.z > 21   (When the claw is always closed)
ConPos.z - BallPos.z > 14 & ConPos.z-BallPos.z<21 (When the claw will open)
ConPos.z - BallPos.z > 7 & ConPos.z-BallPos.z<14 (When the claw will close again)
(The .z denotes the z-axis)
Here it is in English
When the Claw is 21 units away or more it is closed.
From 21 units away to 14 units away the claw will open.
From 14 units away to 7 units away the claw will close.

Now for the angles at >21 the angle will aways be 0 degrees
from 21 to 14 the angle will be changing from 0 to -35 degrees
from 14 to 7 the angle will be changing from -35 back to 0 degrees

Since we just can't type in "open claw in a smooth linear fashion" we have to write an equation for that too (Hmmmm Fun). There is a variety of ways to do this. I did it based on the distance between the two objects.
Ok when the claw is at 21 units away I want it to be at 0 degrees (closed) and when it is at 14 units I want it to be at -35 degrees (open). So what value would be proportional that would make 0 to 7 be 0 to 35. (Answer is 5) so lets look at the sections again with the claws opening/closing included.
"ConPos.z - BallPos.z > 21" (nothing amazing about this)
"ConPos.z - BallPos.z > 14 & ConPos.z - BallPos.z < 21 , (ConPos.z-BallPos.z-21)*5" (uh-oh this is a little complicated)
Lets break it down...the first part is defining the second section (the & is the syntax for "and") and the second part is the conversion from 0 - 7 to 0 - -35. (ConPos.z - BallPos.z) = the distance inbetween, now you need to subtract 21 because that is the distance from the Shaft to the Ball.
For example: the shaft is 48in up and the ball is 27in up at the start of the "opening section". Now without the "-21" the equation would be "(48-27) * 5= 105 degrees". And you wanted 35 degrees. Now with the "-21" it will give you 0. Using the same example, at the end of the "opening section" the equation will be "(41-27) *5 = 70". And again with the "-21" it will be -35 degrees, which is what we want.
"ConPos.z - BallPos.z >7 & ConPos.z-BallPos.z<14 , (7-(ConPos.z-BallPos.z)*5
this is the same exact thing as the 2nd example but instead of "...-21" it is "7-...." for the same reasons. Work it out. =)

Now we have all the equations down we can FINALLY write the script. Which is basically already written above. To split the expression up in to sections we need to make a case for each section with "if" statements. The "if" function follows this syntax "if(a,b,c)" which means in human terms "If a is true, then b, if a is false then c". It HAS to have all three parts or you will get a parsing error. So here is the expression: (cheer)
if(ConPos.z-BallPos.z>21 , Closed ,
if(ConPos.z-BallPos.z>14 & ConPos.z-BallPos.z<21 , degToRad((ConPos.z-BallPos.z-21)*5),
if(ConPos.z-BallPos.z>7 & ConPos.z-BallPos.z<14 , degToRad((7-(ConPos.z-BallPos.z))*5),
Closed)
)
)
If it is the first section (above 21 units) then the claw is closed, (remember the closed variable you made, here it is in action) but if the claw isn't abovet 21 units then.... if it is above 14 units and below 21 units then open the claw from 0 to -35 degrees if it isn't in this "section" then if the claw is below 14 units and above 7 units then close from -35 to 0 degrees, and if the claw is below 7 units (and clipping with the ball) keep the claw closed anyway.

The only thing I didn't cover is the degToRad() function....since the Euler XYZ controller works in radians and humans work in degrees this is a handy conversion function that has been built in. Now Finger 2 should work properly. All that is left to do is to apply the same expression to the rest of the fingers. First apply expression controllers to the rest of the fingers. Note that two of the fingers rotate around the y-axis and two around the x-axis so apply the expression controller to the proper one. Finger 2 and Finger 3 should use the y-axis and Finger 1 and Finger 4 should use the x-axis.

Now close the window and move the shaft up and down. The claw should open/close around the ball.


'



HowHow to create a walking "Alien"
By Robert Mikelson
 to create a walking "Alien"
By Robert Mikelson

"Creating an Alien"
First create a Clay ellipse.
Then create some splines as eye brows and nose.
Now create 2 spheres (not Clay) and place them like eyes.
Don`t forget also to create neck, shoulders, chast and ribs.
Create also lags and hands.
Now create a Clay Surface.
And push Absorb Free Primitives. Assign some cool material to it.
Push Create Snapshot Mesh and delete CS and all Clay Primitives. It`l create a alien Mesh.

"Bringing Alien to live"
Create a Character Studio`s Biped in front window.
Biped`s lags must be under the beginning of the mash and biped`s had must be on top of the mesh ! ! ! If not, then mash`s vertexes (under or on top of the biped) will move chaotically in 3D space.
Now go to the motion and push Figure Mode button.
Rotate and rescale biped`s parts, until they fit the mash. Biped`s lags must be under the beginning of the mash and biped`s had on top of the mesh ! ! !
Now select Clay Surface Mash 01 (Alien`s skin) and Sphere 01 + Sphere 02 (alien`s eyes). And use Physique modifier on them.
Push select center of mass, it will link biped to mash.
And select biped`s center of mass (light blue).
CH-Studio will draw lines in lags, hands, had and neck.
Select again the biped`s center of mass and go to motion. You can create 3 sorts of footsteps: Walking, Running and Jumping. Create 4 walking footsteps by selecting Walk button and pushing Create Multiple footsteps. Wright 4 in number of footsteps window and push OK. Now select running button, push Create Multiple footsteps, Wright 3 in number of footsteps window and push OK. Create also 6 jumping footsteps. Push Create Keys For Inactive Footsteps to activate footsteps.
Don`t forget to hide Biped before rendering.




- Cave Scene Tutorial Page 1-
Okay, this is the image we're going to re-create. This tutorials show how to create the scene exactly as in the rendered image below.
1. Reset Max
2. Create a tube in the front viewport. Use center as Creation Method, turn on snap and place the center of the tube at 0,0,0. use the following settings:
3. Create a target camera in the top viewport at 0,0,0 pointing to 0,-500,0. I used a 35mm camera:
4. If you render the scene now (320x240), you should have something similar to this image:
Wow, allready looks like a cave.... ;-] Let's continue.
5. Select the tube and go to the modify-panel. Apply a 'UVW Map' modifier to the tube. Use the following settings shown in this figure:
You wont see any difference now, but this is for later when the material is applied.
6. If not allready, select the tube again and go to the modify-panel. Now, apply a 'noise' modifier to the the tube using the following settings:
7. If you render the scene now (320x240), you should have something similar to this image:
Hey, it's starting to look like something here..... but still a lot to do. Click 'next page' to go to the second page of this tutorial.

(c) 1998 All stuff on this page is Copyright Barry G.J. Driessen I claim ownership of everything on this site in as much as I created it.
However, you MAY use images, tutorials, etc. found on this page on the condition that my name accompanies the reproduction of my original image, tutorial, etc.





A Warp in Space
3D Studio Max
(After buying the book "3D Studio Max F/X" by John Bell I found out that this tutorial is pretty closed to his description of Warp Speed. It was not my intention to take his work, and as I got this idea from a friend on net I guess it is originally from Bell (well I am not sure, but ... just to be sure, OK!!??). So please buy Bells book (it is very good!!), or use the tutorial here if you can't afford it!!)
As part of one of my animation the first scene will be focusing on empty space, just stars and maybe a planet or a sun. Suddenly there is a opening in the void, a warp in the fabric of space, a tunnel of light where a ship is passing through. The space warps will look something like this animated gif.
I think I have managed to get a nice space warp effect. If you get a "wobble" in the animation it could be that your browser don't handle big animated gif files properly. Internet Explorer does have this fault. Netscape have no problems at all. Well .. that is after my experience. I use them both!

Objects:
The effect was made with two expanding cones; they are morphing from nearly nothing to 1000 units long. I gave them a spin, one clockwise and the other counter clockwise, 720 degrees in 100 frames. The most important thing is that they are not parallel in there movement. First cone is morphing out in 50 frames and then back again. The other one morphs out from frame 25 to 75 and quickly retreat the last 25 frames. Both cone have there normals flipped and the cap removed so when I give them a materials this is visible on the inside of the cone. The materials is also given a low opacity so the stars shines through. It is also important that the cones have there receive and cast shadow check boxes unchecked. There is also a omni light in front of the tunnel. To place a light in front of the animated tunnel, and not from some Max default source, gives the illusion of the transparency cones and the self illumination of the flare maps a better effect. In the camera view under you can se the two cones as wire frames in frame 60, when one goes spinning out and the other one retreat.

Materials:
The two cones are given texture made with RealLenzFlare, a plug in for max. The texture is animated as two 100 frames *.flc files through RLF in a basic phase expansion and streaks angel rotation.
Material manipulation: In short:
Diffuse = black, Ambient = black, Falloff = out, Type = additive. The *.flc are placed as diffuse map and copied to opacity map, both at 100 %.

These are the two flare materials maps (200x200):

                                                              
The stars in the background is made with the free video post plug_in Stars, a star field generator made by Tom Hudson.

Harald J. Martinsen of TMP. 31.10.97