Magnet PXP 0.5 Beta written by Peter Watje

Description

Magnet PXP is free form deformation tool.  It allows to take vertices and turn them into magnets.  By 
doing this when you move, rotate, or scale the magnet vertices you are also affecting the surrounding 
vertices based on how far away they are from the magnets.  The effect is similiar to pulling taffy or silly 
puddy,  This routine is useful in reshaping existing meshes or creating new organic shapes from primitive 
shapes.

Note, this currently is beta demo.  Most features have been implemented but still need to be optimized.  
Also you cannot save changes out to 3d Studio.   If you find any bugs or wish to see any new features 
please contact me at:

internet          peterw@blarg.net
compuserve   755453,225




Features List

 Interactive enviroment
 Wire and flat shade viewport
 Move, rotate, and scale vertex and groups of vertices inside the IPAS routine
 Move vertex along their normals
 Adjustable magnetism radius and falloff rate
 Ability to select and deselect vertex in the IPAS routine
 Able to create a vertex exclusion list
 Undo function

 

Basic usage

Basic routine is to select an axis to move along.   Chose an individual vertex or use a selection set and 
move, rotate, or scale the vertex/vertices.


Mouse usage

All mouse movements consist of either single clicks or click and drags.  On drags with single effects are 
from left to right being positive, and on dual function from bottom to top is positive.  Control key 
constrains the control so that the X,Y are equal.  Alt key deselects or removes exluded verts.


Tutorial

1.  Create a 20x20 grid with lengths of 100 units by 100 unit and no height by using the GRID.PXP.  Load 
up the magnet PXP.  Click on the PICK OBJECT button and select the grid that you just created and hit 
OK.  Click on the T button or hit the "T" key to view the grid from the top view.   Turn on the selection 
button by clicking on the SELECT button.  Now move the mouse over the viewport and select the middle 
vertex of the grid by clicking and dragging the marquee around the center vertex.  The selected vertex 
should turn green with the vertices surrounding it should be shaded various shades of blue and purple.  If 
you selected more vertices than you wanted you can deselect them by holding down the ALT key and 
marqueing them which will deselect them.  By selecting vertices you are turning them into magnets .  The 
vertices that surround the magnetized vertices are shaded based on how much the magnet will affect them 
(this based on two factors the falloff rate and the effect distance).  Now we are going to increase the effect 
distance.  Click and hold down onthe EFFECT DIST. scroller button, sliding the mouse to the right 
increases the effect distance sliding it to the left decreases the effect distance --NOTE add a edit box to the 
effect dist --.  Set the effect distance to about 50 units and notice how now most of the vertices are shaded 
out from the center magnet vertex.  Any vertices that are shaded will be affected when a magnet is moved.  
Set your veiwport to the right by clicking on the R button of by hitting the "R" key.

Now we are going to move the magnetized vertex.  Lock the axis to Z axis.  This can be done by hitting the 
Z button in the upper left or pressing the TAB key until the Z button is high lighted.  Now click on the 
MOVE button on the right hand side of the dialog box.  Move the mouse over the viewport and click and 
hold down.  Slide the mouse to the right and watch as the magnet vertex is moved in the positive direction 
along the axis.  Notice also how all the surrounding vertices move in relation to the magnet creating a bell 
shaped curve.  Moving the mouse to the left causes the magnet to move in the negative Z direction.   
Release the mouse when you have the desired shape.  You can see a flat shaded view of the new shape by 
pressing the SPACE BAR or clicking on the RENDER button.  You can rotate your view to get a better 
look by clicking on the USER button and then clicking in the viewport and sliding the mouse to left and 
right or up and down to rotate the view.  Now undo your last move by clicking on the UNDO key or 
hitting the BACKSPACE key which will undo your last move, rotate, scale, selection, or exclusion.

Now we will work with the effect falloff.  Click on the CURVE PROFILE button which will bring up 
the curve profile dialog which allows you change the falloff of the magnetism.  The default falloff has the 
shape of a sin curve.   The left side of the graph is the falloff rate which determine how much the magnet 
effects the vertices.  The bottom of the graph is the distance from the magnet going from farthest to closest.  
To adjust the curve you can click and drag the control point much like the curves in the 2d shaper.  Now 
lets create a pointy curve instead of a smooth curve.  On the left red curver handle click and hold down.  
Move the mouse until the handle is pointing directly down and about half way to the bottom.  You should 
now have a curve that bows to the bottom.  Hit OK to accept the curve profile.

Move the magnet along the Z axis now as we did previously.  Notice now how the shape now pulls to a 
point instead of a smooth curve like the last one.  This is because we changed the profile of the curve.  
Notice that as you view the curve from the right the left half of the profile of the shape matches the shape 
of the curve in the curve profile dialog.  No undo this shape reverse the bow of the Curve Profile and see 
what type of shape you get.

Now experiment by expanding the magnet by selecting more vertices. Also experiment by moving along 
different axis or by scaling or rotating the magnet.


2.  Load up tube to demonstrate move along normals, teach about selected faces ref vs all and what a 
normal is.

3. Create a torus show how to scale verts to create a quick space ship.

4. Create another grid to show how to use rotate to create drapes or black hole.

5. Demonstrate exclusion sets and selecting verts backface vs surface.


References

Main Dialog
Misc Controls

Pick Object - brings up an object selection dialog which allows you to bring a new object into the IPAS 
routine.

Axis Lock X,Y,Z,XY,YZ,XZ,XYZ,Normal - locks the axis down which effects the move, rotate, scale, and 
axis button.   The XYZ button only effects the scale operation and the Normal button only effects the 
move operation.  The tab button cycles you through the axises.

Effect Dist - This controll allows you to change the how far away vertices are effected.  You can either 
enter it in the edit field or use the scroll button (click and hold down and slide the mouse to the right to 
increase the value or slide it to the left to decrease value then release the mouse button when done).

Curve Profile - This brings up the curve dialog box which allows you to change the falloff rate.

Reset Normals -  Recalculates the normals of the face for internal operation it also recalculates the distances 
of vertices.  Selecting or deseleccting vertices or changing the effect distance also cause normals and 
distances to be recomputed.

Undo - undos the last move,scale,rotate,select, or exclude function.

Hide Excl. - Hides the current excluded vertex set.

About - Brings up the about box.

Preference - Brings up the preference dialog.

Render - Renders the viewport in flat or gourad shaded mode.  Space bar is the shortcut key.


All viewport, selection, and vertex control buttons deteremine what action is taken when the user clicks 
and drags in the viewport.

Viewport Controls 
Rotate/User View - Rotates the viewport around the X and Y axis.
Pan - Pans the viewport
Zoom - Zooms the view port in and out
F/K/L/R/T/B- Front/Back/Left/Right/Top/Bottom views
Fit


Selection Controls - creates a marque box used to select verts.
Select adds the vertex to the selection set.  To remove the vertices hold down the ALT key.
Exclude adds vertex to the exclusion set.  To remove the vertiecs hold down the ALT key.

Vertex Controls effects the current selected vertices.   If no vertices are selected the users can select 
individual vertices.

Move 
Rotate
Scale
Axis

Curve Profile Dialog

Preference Dialog



OK - Accept current changes and write back to 3d Studio
New -  Create a new object.
Cancel - Disregard current changes and exit back to 3d Studio.











Notes and current bugs

Small objects(less than 2 or 3 units across) don't load right
8,000+ vertex objects load slowly and have slow redraw times.
Need center axis
Axis needs to be fixed for moving
No gourad shading implemented yet
Need to update redraw times
Move normal does not work correctly all the time
Some object don't load right
Docuementation needs to be finished and edited.
Add a update string so that angles and vertex positions are updated and visible when moving rotating and 
scaling verts.
Increase the hot spot for the curve profile handles.


