CGTalk > Software > Autodesk 3ds max > Particle Flow
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
 
Thread Tools Search this Thread Display Modes
Old 02-26-2007, 11:23 PM   #1
CHRiTTeR
On the run!
 
CHRiTTeR's Avatar
Chris
Graphic designer extraordinaire
Belgium
 
Join Date: Feb 2002
Posts: 4,387
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-28-2007, 05:29 AM   #2
supremepizza
3Dude/Goin with the PFlow
 
supremepizza's Avatar
portfolio
William (Bill) Rickert
Web Master
Freelance
Granite City, USA
 
Join Date: Jun 2006
Posts: 345
Could you post it? I'm burried in scripts and don't want do DL another.
 
Old 02-28-2007, 08:37 AM   #3
CHRiTTeR
On the run!
 
CHRiTTeR's Avatar
Chris
Graphic designer extraordinaire
Belgium
 
Join Date: Feb 2002
Posts: 4,387
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-28-2007, 08:39 AM   #4
CHRiTTeR
On the run!
 
CHRiTTeR's Avatar
Chris
Graphic designer extraordinaire
Belgium
 
Join Date: Feb 2002
Posts: 4,387
Oh yeah, and if anyone knows a particle flow version, that would be really great!
 
Old 03-01-2007, 07:49 AM   #5
Glacierise
precise defab worker
 
Glacierise's Avatar
portfolio
Hristo Velev
MD/FX artist
Bottleship VFX
Bulgaria
 
Join Date: Aug 2006
Posts: 4,231
You have the speed by icon operator in PFlow, you don't need scripts for that
 
Old 03-01-2007, 08:01 AM   #6
CHRiTTeR
On the run!
 
CHRiTTeR's Avatar
Chris
Graphic designer extraordinaire
Belgium
 
Join Date: Feb 2002
Posts: 4,387
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-01-2007, 08:56 AM   #7
rdg
random data generator
 
rdg's Avatar
portfolio
Georg Duemlein
New Zealand
 
Join Date: Feb 2004
Posts: 779
Send a message via AIM to rdg
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-01-2007, 08:45 PM   #8
supremepizza
3Dude/Goin with the PFlow
 
supremepizza's Avatar
portfolio
William (Bill) Rickert
Web Master
Freelance
Granite City, USA
 
Join Date: Jun 2006
Posts: 345
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-01-2007 at 09:01 PM.
 
Old 03-01-2007, 09:38 PM   #9
DeKo-LT
Expert
 
DeKo-LT's Avatar
portfolio
DeKo
FREElance
Vilnius, Lithuania
 
Join Date: Mar 2004
Posts: 342
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-02-2007, 03:19 PM   #10
supremepizza
3Dude/Goin with the PFlow
 
supremepizza's Avatar
portfolio
William (Bill) Rickert
Web Master
Freelance
Granite City, USA
 
Join Date: Jun 2006
Posts: 345
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-03-2007, 06:29 PM   #11
PsychoSilence
3Delicious
 
PsychoSilence's Avatar
portfolio
Anselm von Seherr - Thoß
VFX Technical Director
Incendii VFX
New Orleans, USA
 
Join Date: Aug 2003
Posts: 2,480
Send a message via ICQ to PsychoSilence
here´s the proper english version of the tutorial:

http://www.cgarena.com/freestuff/tu...ines/index.html
 
Old 03-05-2007, 04:20 PM   #12
CHRiTTeR
On the run!
 
CHRiTTeR's Avatar
Chris
Graphic designer extraordinaire
Belgium
 
Join Date: Feb 2002
Posts: 4,387
Thanks guys, i'll be checking it out! Much appriciated! (y)
 
Old 03-05-2007, 04:20 PM   #13
CGTalk Moderation
Expert
CGTalk Forum Leader
 
Join Date: Sep 2003
Posts: 1,066,478
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.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 06:22 PM.


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