Particle Path script - problems under max9

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 02 February 2007   #1
Unhappy Particle Path script - problems under max9

Hi,
I recently downloaded a script from www.animagic.net called particle path.
It is supposed to create a spline from a particle system but it doesnt seem to work here?
Im using max9 (64bit) could that be the problem?

I load the script, select the particle system from the UI, click 'create paths' but nothing happens?

plz help, coz this is a really neat script!

Thanks,
CHRiTTeR
 
Old 02 February 2007   #2
Could you post it? I'm burried in scripts and don't want do DL another.
 
Old 02 February 2007   #3
Ok, i've got a reply from the guy who made thise (Stefan Didak) and he told me the script was made for max3 and he hasnt touched max anymore since version 4, so my guess is its a compatibility problem?

Quote:
Originally Posted by supremepizza
Could you post it? I'm burried in scripts and don't want do DL another.


Here you go. This is the .mcr version, theres an .ms file to... do you want me to post that one to?

Code:
category:"Animagic" toolTip:"Particle Path" ( ------------------------------------------------------------------------------- -- -- PARTICLE_PATH.MS -- Particle(s) to Path(s) MAXScript 1.0 -- -- Copyright © 1999 Animagic Development -- http://www.3dluvr.com/animagic -- By Stefan Didak (sdidak@csi.com) -- ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- -- -- GLOBAL VARIABLES -- ------------------------------------------------------------------------------- p_pos = #() -- particle position array p_shape = #() -- particle path/shape array ------------------------------------------------------------------------------- -- -- USER INTERFACE -- ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- -- flt_particles (pick filter) fn flt_particles obj = ( if SuperClassOf obj == GeometryClass then ( if ClassOf obj == Blizzard then return true if ClassOf obj == PArray then return true if ClassOf obj == Snow then return true if ClassOf obj == Spray then return true if ClassOf obj == SuperSpray then return true if ClassOf obj == PCloud then return true ) return false ) ------------------------------------------------------------------------------- -- RO_partpath (rollout) rollout RO_partpath "Particle Path" ( group "Particle System" ( pickbutton b_pick_node "none selected" toolTip:"Node Picker" filter:flt_particles width:130 height:20 ) group "Time Range" ( spinner f_start "Frame Start :" fieldwidth:50 type:#integer range:[0,10000,0] spinner f_end "Frame End :" fieldwidth:50 type:#integer range:[0,10000,100] spinner f_step "Frame Step :" fieldwidth:50 type:#integer range:[1,10000,2] ) group "Path Parameters" ( spinner s_minknots "Min. Knots :" fieldwidth:50 type:#integer range:[2,50,2] ) group "Path Knot Type" ( radiobuttons r_ktype labels:#("Smooth", "Corner") ) group "Path Node Parameters" ( label l_path "Path Name Prefix" edittext e_path fieldWidth:130 text:"PartPath_" align:#center checkbox c_multi "Create multiple paths" checked:true ) label l_bar "Progress Indicator" progressbar p_bar width:144 height:14 align:#center button b_createall "Create Paths" width:144 height:20 -- Pick Node --------------------------------------------------------------- on b_pick_node picked obj do ( pnode = obj; -- set emitter node b_pick_node.text = pnode.name -- set emitter name ) -- Create Path ------------------------------------------------------------- on b_createall pressed do ( if pnode == undefined then return -- validate selection -- Gather particle data ------------------------------------------------- p_pos = #() -- clear particle array pcount = particleCount pnode -- get the particle count f_backup = sliderTime -- get current time fcount = 0 -- total frames captured p_bar.value = 0.0 -- reset progress bar p_pct = 100.0/((f_end.value - f_start.value)/f_step.value) -- percentage increase for f = f_start.value to f_end.value by f_step.value do -- for the set time range ( sliderTime = f -- set the current frame fcount = fcount + 1 -- total frames increase for p = 1 to pcount do ( append p_pos (particlePos pnode p) ) -- add all particle to array p_bar.value = p_bar.value + p_pct -- increase progress ) sliderTime = f_backup -- set back to initial time -- Start path creation -------------------------------------------------- p_bar.value = 0.0 -- reset progress bar p_pct = 100.0/pcount -- percentage increase t_splines = 0 -- total splines if c_multi.checked != true then -- create a single shape ( p_shape[1] = splineshape() -- create shape p_shape[1].name = uniqueName e_path.text -- set shape name ) for p = 1 to pcount do -- for all particles ( p_bar.value = p_pct * p -- increase progress -- Make sure every spline has at least 2 knots ----------------------- kcount = 0 -- set knot count for f = 0 to fcount do -- for all frames captured if p_pos[p+(f*pcount)] != undefined then kcount = kcount + 1 -- validate particle position -- Create the shape and add knots ------------------------------------ if kcount >= s_minknots.value then -- enough required knots? ( t_splines = t_splines + 1 -- increase total splines if c_multi.checked != true then addnewspline p_shape[1] -- creating a single spline else -- creating multiple splines ( p_shape[t_splines] = splineshape() -- start a spline shape addnewspline p_shape[t_splines] -- add a spline ) for f = 0 to fcount do -- for all frames captured ( if p_pos[p+(f*pcount)] != undefined then -- validate particle position ( -- Add knot points based on type ---------------------------- if c_multi.checked != true then -- creating a single spline ( if r_ktype.state == 1 then addknot p_shape[1] t_splines #smooth #curve p_pos[p+(f*pcount)] else addknot p_shape[1] t_splines #corner #curve p_pos[p+(f*pcount)] ) else ( if r_ktype.state == 1 then addknot p_shape[t_splines] 1 #smooth #curve p_pos[p+(f*pcount)] else addknot p_shape[t_splines] 1 #corner #curve p_pos[p+(f*pcount)] ) ) ) if c_multi.checked != true then Updateshape p_shape[1] -- update the shape else -- multiple splines ( Updateshape p_shape[t_splines] -- update the shape(s) p_shape[t_splines].name = uniqueName e_path.text -- set shape name ) ) ) p_bar.value = 0.0 -- reset progress bar p_shape = #() -- clear particle path/shape array p_pos = #() -- clear particle array ) ) ------------------------------------------------------------------------------- -- ro_about (rollout) rollout ro_about "About Particle Path" ( label copyright_info_a "Version 1.0" align:#center height:12 label copyright_info_b "by Stefan Didak" align:#center height:12 label copyright_info_c "sdidak@csi.com" align:#center height:12 label copyright_info_d "www.3dluvr.com/animagic" align:#center height:12 ) ------------------------------------------------------------------------------- -- -- MAIN SETUP -- ------------------------------------------------------------------------------- -- First we start to setup the main floating dialog FL_partpath = newRolloutFloater "Particle Path" 180 545 0 95 -- Next we add the various rollout panels which need to go in there addrollout RO_partpath FL_partpath addrollout RO_about FL_partpath )
 
Old 02 February 2007   #4
Oh yeah, and if anyone knows a particle flow version, that would be really great!
 
Old 03 March 2007   #5
You have the speed by icon operator in PFlow, you don't need scripts for that
 
Old 03 March 2007   #6
Quote:
Originally Posted by Glacierise
You have the speed by icon operator in PFlow, you don't need scripts for that


Thats not wath the script is supposed to do. It creates a spline according to the particle's path.
It doesnt make particle follow a path
 
Old 03 March 2007   #7
psychoSilence got a script to do this.
I cannot find it atm in the forum.
But I am sure it is somewhere.

Georg
__________________
Georg Duemlein
 
Old 03 March 2007   #8
It's an unfinished script. Or a beta. What were the details about it when you got it? I got the GUI working now but I won't post anything till it works, if it works.

Edit: I haven't tried it but it should work now if the code is good. Sorry I don't have time to test it I have to head to work.


Code:
global p_pos = #() -- particle position array global p_shape = #() -- particle path/shape array fn flt_particles obj = ( if SuperClassOf obj == GeometryClass then ( if ClassOf obj == Blizzard then return true if ClassOf obj == PArray then return true if ClassOf obj == Snow then return true if ClassOf obj == Spray then return true if ClassOf obj == SuperSpray then return true if ClassOf obj == PCloud then return true ) return false ) rollout RO_partpath "Particle Path" ( group "Particle System" ( pickbutton b_pick_node "none selected" toolTip:"Node Picker" filter:flt_particles width:130 height:20 ) group "Time Range" ( spinner f_start "Frame Start :" fieldwidth:50 type:#integer range:[0,10000,0] spinner f_end "Frame End :" fieldwidth:50 type:#integer range:[0,10000,100] spinner f_step "Frame Step :" fieldwidth:50 type:#integer range:[1,10000,2] ) group "Path Parameters" ( spinner s_minknots "Min. Knots :" fieldwidth:50 type:#integer range:[2,50,2] ) group "Path Knot Type" ( radiobuttons r_ktype labels:#("Smooth", "Corner") ) group "Path Node Parameters" ( label l_path "Path Name Prefix" edittext e_path fieldWidth:130 text:"PartPath_" align:#center checkbox c_multi "Create multiple paths" checked:true ) label l_bar "Progress Indicator" progressbar p_bar width:144 height:14 align:#center button b_createall "Create Paths" width:144 height:20 -- Pick Node --------------------------------------------------------------- on b_pick_node picked obj do ( pnode = obj; -- set emitter node b_pick_node.text = pnode.name -- set emitter name ) -- Create Path ------------------------------------------------------------- on b_createall pressed do ( if pnode == undefined then return -- validate selection -- Gather particle data ------------------------------------------------- p_pos = #() -- clear particle array pcount = particleCount pnode -- get the particle count f_backup = sliderTime -- get current time fcount = 0 -- total frames captured p_bar.value = 0.0 -- reset progress bar p_pct = 100.0/((f_end.value - f_start.value)/f_step.value) -- percentage increase for f = f_start.value to f_end.value by f_step.value do -- for the set time range ( sliderTime = f -- set the current frame fcount = fcount + 1 -- total frames increase for p = 1 to pcount do ( append p_pos (particlePos pnode p) ) -- add all particle to array p_bar.value = p_bar.value + p_pct -- increase progress ) sliderTime = f_backup -- set back to initial time -- Start path creation -------------------------------------------------- p_bar.value = 0.0 -- reset progress bar p_pct = 100.0/pcount -- percentage increase t_splines = 0 -- total splines if c_multi.checked != true then -- create a single shape ( p_shape[1] = splineshape() -- create shape p_shape[1].name = uniqueName e_path.text -- set shape name ) for p = 1 to pcount do -- for all particles ( p_bar.value = p_pct * p -- increase progress -- Make sure every spline has at least 2 knots ----------------------- kcount = 0 -- set knot count for f = 0 to fcount do -- for all frames captured if p_pos[p+(f*pcount)] != undefined then kcount = kcount + 1 -- validate particle position -- Create the shape and add knots ------------------------------------ if kcount >= s_minknots.value then -- enough required knots? ( t_splines = t_splines + 1 -- increase total splines if c_multi.checked != true then addnewspline p_shape[1] -- creating a single spline else -- creating multiple splines ( p_shape[t_splines] = splineshape() -- start a spline shape addnewspline p_shape[t_splines] -- add a spline ) for f = 0 to fcount do -- for all frames captured ( if p_pos[p+(f*pcount)] != undefined then -- validate particle position ( -- Add knot points based on type ---------------------------- if c_multi.checked != true then -- creating a single spline ( if r_ktype.state == 1 then addknot p_shape[1] t_splines #smooth #curve p_pos[p+(f*pcount)] else addknot p_shape[1] t_splines #corner #curve p_pos[p+(f*pcount)] ) else ( if r_ktype.state == 1 then addknot p_shape[t_splines] 1 #smooth #curve p_pos[p+(f*pcount)] else addknot p_shape[t_splines] 1 #corner #curve p_pos[p+(f*pcount)] ) ) ) if c_multi.checked != true then Updateshape p_shape[1] -- update the shape else -- multiple splines ( Updateshape p_shape[t_splines] -- update the shape(s) p_shape[t_splines].name = uniqueName e_path.text -- set shape name ) ) ) p_bar.value = 0.0 -- reset progress bar p_shape = #() -- clear particle path/shape array p_pos = #() -- clear particle array ) ) rollout ro_about "About Particle Path" ( label copyright_info_a "Version 1.0" align:#center height:12 label copyright_info_b "by Stefan Didak" align:#center height:12 label copyright_info_c "sdidak@csi.com" align:#center height:12 label copyright_info_d "www.3dluvr.com/animagic" align:#center height:12 ) FL_partpath = newRolloutFloater "Particle Path" 180 545 0 95 addrollout RO_partpath FL_partpath addrollout RO_about FL_partpath

Last edited by supremepizza : 03 March 2007 at 09:01 PM.
 
Old 03 March 2007   #9
Look at PFSpliner by CharleyC:
http://www.orbaz.com/forum/viewtopic.php?t=311&

and here is tutorial by PsychoSilence:
http://www.orbaz.com/tutorials_Part...Translation.htm
__________________
 
Old 03 March 2007   #10
Quote:
Originally Posted by DeKo-LT
Look at PFSpliner by CharleyC:
http://www.orbaz.com/forum/viewtopic.php?t=311&

and here is tutorial by PsychoSilence:
http://www.orbaz.com/tutorials_Part...Translation.htm


I think this is supposed to act like spliner. Only problem I found was some undefined globals. Which IMHO are too generally named and could probably be eliminated if nested correctly. Has anyone tried it lately?
 
Old 03 March 2007   #11
here´s the proper english version of the tutorial:

http://www.cgarena.com/freestuff/tu...ines/index.html
 
Old 03 March 2007   #12
Thanks guys, i'll be checking it out! Much appriciated! (y)
 
Old 03 March 2007   #13
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright ©2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 07:06 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.