PFlow Trajectory displayed with Splines
by Anselm v. Seherr-Thoß aka PsychoSilence, Germany


The script is introduced by the lines:

pf = $
i2 = 1
pTest = false
endOfPFAnimation = 100 –- this line sets the end point of the animation
endFrame = 100 –- last fram of the animation (edit this to your timeline range)
fIncrmnt = 2 –- this line sets the distance between two spline knots. 2 means every second frame a knot is inserted into the spline.


Those lines generate the splines :

for i in 1 to numParts do
(
newShp = splineShape()
addNewSpline newShp
newShp.name = ("ParticleSpline_" + i as string) – here the name of each spline is set. I chose the name ParticleSpline_n (n stands for the number of the spline. The script counts them up) Mind that the name of the particle splines has to be replaced serveral times in the script so the best way is to search&replace it.
       newShp.thickness=0.19 –- the script defines the attributes of the spline
       newShp.displayRenderSettings=true
       newShp.renderable=true
       newShp.displayRenderMesh=true
 newShp.adaptive=true
)


This defines the when and where the script adds knots to the spline:

for t in 0 to (endFrame/fIncrmnt) do
(
sliderTime = (t * fIncrmnt) -- (SliderTime = the timeline, fIncrment = the spacing), in this case 50 knots (100 frames animation with a knot every second frame...)
for i in 1 to numParts do
(
pf.particleIndex = i
pId = pf.particleID
if pId != 0 then
(
ParticleSplineShp = execute ("$ParticleSpline_" + pId as string)
addKnot ParticleSplineShp 1 #smooth #line pf.particlePosition
)--End If
)
)--End For select $'ParticleSpline_*
updateShape $


Now that we hardly know, what the script is able to do?

Select the “PFSource” and Hit MAXScript > Run Script… select the script and click open.Now the script scrubs throug the timeline and leaves splines as particle trails.




That´s my result with a teapot primitive as Position and Lock/Bond object.

Tip:
If you have installed the BlurScriptPack by Neil Blevins use the SplineControl script to set every spline to visible to renderer at once. The script controls the thickness and every relecat parameter as well.

Download the Scriptpack here: http://www.neilblevins.com/blurscripts/bspack_r6_r7_v001.zip

You can find suport here: http://www.neilblevins.com/blurscripts/blurscripts.htm

You can download an assembly file from my website:
http://core2core.de/spielwiese/PFSplines/Pflow-spline.max




About the Author: Behind the synonym PsychoSilence hides the german freelance Particle, Shading and PostProduction artist Anselm von Seherr – Thoß. He took part in the production of serveral music videos and image films as well as tv commercials.

The 24 years old hobby DJ is located at Hannover/Germany. When he´s not burried under production pressure he likes visiting metalcore concerts or hardcore raves.


Related Links

Anselm von Seherr website - www.3delicious.de

All Files used in this tutorial - Download Here




Page 1 | Page 2 | Page 3 | Page 4

 
 
Copyright © 2005-2006. All Rights Reserved