		MultiDeflect Particle Deflector
		-------------------------------

This is some quick and dirty documentation for MultiDeflect.
MultiDeflect is currently at v0.90, so there may still be problems 
with it.


What is it?
-----------
MultiDeflect is a universal particle deflector for 3DS MAX.
MAX currently ships with a planar deflector, but with MultiDeflect, 
any mesh object can be used as a particle deflector.

MultiDeflect is a Space Warp plugin. It has been tested with the 
Spray, Snow, and Sand Blaster particle systems.


Cost
----
Nothing.  However, bug reports and suggestions would be most welcome.

Also let me know if you find this of any use, totally useless, junk, etc.
My email address is listed below.


Installing MultiDeflect
-----------------------
Unzip the mdef090.zip file to a directory.

Copy the mdeflect.dlm file into your 3dsmax\plugins directory. It should
now appear under Space Warps as 'MultiDeflect'.

Load the defldemo.max file and move the Time Slider around to ensure
that MultiDeflect is working properly.


Creating a Particle Deflector with MultiDeflect
-----------------------------------------------
First create the particle emitter and an object you wish to use
as the deflector.  For example, if you want the particles to bounce
off of a sphere, create a sphere (say 'Sphere01') and a particle
emitter (say 'Emitter01').  If you direct the particles at the sphere,
you will notice that they pass through the sphere.

Now you need to turn Sphere01 into a particle deflector. This is
done as follows:

	1) Go to the Space Warps menu and select 'MultiDeflect'.

	2) Click in a MAX Viewport to create the Space Warp.
	   It will appear as a small 10x10 box called 'MultiDeflect01'.

	3) Click on the 'Pick Object' button and select the Sphere01
           object. This turns Sphere01 into a particle deflector.

	4) Finally, bind Emitter01 to the space warp icon
	   (MultiDeflect01). This associates the particles with the
	   deflector.

That's it! Now drag the Time Slider and the particles should bounce
off of the sphere rather than passing through it.


MultiDeflect Parameters
-----------------------
The Deflector Parameters can be accessed by selecting the MultiDeflect
Space Warp icon (the 10x10 square) and going into the Modify Menu. The
options are as follows:

Bounce:     This setting affects the velocity of the deflected particle.
	    For example, if Bounce=0.5, then a particle will be deflected
	    with half its original speed. Bounce can be used to simulate
	    inelastic collisions, for example. The default value is 1.0.

Absorption: This is a value between 0 and 1 which represents the percentage
	    of particles that are 'absorbed' (ie. not deflected) by the 
	    deflector. For example, Absorption=0.5 means than half of the
	    particles will be absorbed. The default value is 0.0.
	
Dispersion: This setting affects the amount that particles are randomly 
	    dispersed when they hit the deflector. This can be used to
	    simulate a random surface roughness.  The default value is 0.0.

Icon Size:  The Width & Height parameters merely affect the size of the
	    space warp icon. The default size is 10x10.

Pick Object: The Pick Object button can be used to change the mesh
	     being used as the deflector. Click on 'Pick Object' and
	     then select an object in the scene to turn that object 
	     into a deflector.
	     

Internal Deflections
--------------------
If a particle emitter is placed inside of a deflector object (for example,
if Emitter01 was placed inside Sphere01), it will NOT deflect off the inner
walls by default.

To accomplish internal deflections, apply the 'Normals' modifier to Sphere01 
and select 'Flip Normals'.  Flipping the normals of the deflector object
will cause deflections off of the inner wall rather than the outer wall
of the object.


Calculation Speed
-----------------
The time taken to calculate the collisions is proportional to the number
of faces on the Deflector object.  Obviously the Deflector mesh should be
as simple as possible. If you have a complex mesh, it is best to approximate
the collisions by creating a simpler version of that mesh and using the
simpler mesh as the deflector object.


Using MultiDeflect with Other Particle Systems
----------------------------------------------
MultiDeflect should work with most particle systems.  It has been tested 
with Spray and Snow, as well as with Sand Blaster.  Further testing with 
AllParticles is needed; there may be a problem with some of its particle 
types.


Known Problems
--------------
	- If the deflector object's dimensions are negative (as can 
	  happen with some primitives) the particles may not be deflected
	  properly.  
	  Solution: Make the dimensions positive.


Credits
-------

Coding:  Sherwyn Ramkissoon  (sherwyn@eecg.toronto.edu)

Testing: The helpful folks on the #3dsmax IRC channel.
