View Full Version : Who To Integrate A Object Fragmented In Pf ??
Hi,
I´m looking for a way to integrate a object fragmented with Fracture Voronoi script with PF, I know that online are a lot of tut for desintegrate objects with particles but not integrate them.
Like the old Sandblaster, I want to have a tepot in the right and desintegrate and "integrate" in the left.
¿ Is this posible in Particle flow ? ¿ It is necesary any script ?
Thanks in advance
|
|
Piflik
08-30-2009, 01:43 AM
You'll definately need some scripts.
I'd do the following: Take your fractured Object and copy it to the target location. Use a Birth Script to create your particles on the Target and store the position data in the Particles' Vector Channel. Pipe your Particles into a new event and use a Script Operator to position them on your Source Object and give them their Shape. Then use a Find Target Test and there use the Particles Vector Channel as Target (A McKay had a tutorial on that, but it seems impossible to download from his site for some time now...have a look here (http://forums.cgsociety.org/showpost.php?p=6052930&postcount=6) for an example + additional info).
One important thing: The Source and Target objects have to be named accordingly. The Target Fragments must have the same numbering as the Source, else the Fragments will fly to the wrong position and won't fit. Easiest way to do that would be to save your scene, select all Fragments, use the Rename Objects Tool to give the Fragments a Prefix (eg Target_), move them to the Target position and then merge the Fragments from the recently saved file.
I can try to write the Scripts, but I don't have Max open to test them and it is about 3:40 AM here, so I don't take any responsibility for their correctness...;)
Birth Script:
on ChannelsUsed pCont do
(
pCont.useAge = true
pCont.useTM = true
pCont.useVector = true
)
on Init pCont do
(
global TFragsArray = $Target_Fragment* as array
)
on Proceed pCont do
(
t = pCont.getTimeStart() as float
if t < 0 do
(
NumTFrags = TFragsArray.count
for i = 1 to NumTFrags do
(
pCont.AddParticle()
pCont.particleIndex = pCont.NumParticles()
pCont.particleAge = 0
pCont.particleTM = TFragsArray[i].transform
pCont.particleVector = TFragsArray[i].pos
)
)
)
on Release pCont do
(
)
Script Operator:
on ChannelsUsed pCont do
(
pCont.useTM = true
pCont.useShape = true
)
on Init pCont do
(
global FragsArray = $Fragment* as array
)
on Proceed pCont do
(
NumFrags = FragsArray.count
for i = 1 to NumFrags do
(
pCont.particleIndex = i
pCont.particleTM = FragsArray[i].transform
pCont.particleShape = FragsArray[i].mesh
)
)
on Release pCont do
(
)
The Source Fragments should be called 'Fragment01', 'Fragment02'..., the Target Fragments 'Target_Fragment01'...
Also, the Vector, being a Point3 Value, cannot store the position and orientation. So if you add a Spin Operator, the Particles will find the right location, but their orientation will be wrong...You'd have to use 'Go to Rotation' for that. Have a look here (http://www.orbaz.com/forum/viewtopic.php?t=2283&sid=11fe3999a80c22afdbbb9d04a38b09f1) on some input...
Hi Piflik
Thanks very much for your answer, I will checked out and post results for all with the same problem than me.
kinds regards
I make what Piflik say and work fine, but now is another the problem
The particles Integrate by his name number and not by the order that they arrive to the target.
I need that the particles for example fragment40 when arrive to his target take the propierties of Target_Fragment40 and so on.
Now what this solution does is that when a particle arrive then make a counter from "1 to count" and start from the fragment name Fragment01 and not by the fragment that arrive perhaps Fragment32.
sorry my poor english, ANY HELP ???
amckay
09-01-2009, 01:30 AM
....Target (A McKay had a tutorial on that, but it seems impossible to download from his site for some time now....
Yeah my website gets absolutely HAMMERED - I am switching this weekend to a new server, I know its a couple of years overdue, but there will be new tutorials and other material up once its launched. The website is lighting fast, I have had the server for the past few months, just no time spare to make the switch over. So next week sometime all the tutorials plus new ones will be downloadable. I will also be putting up some maya and houdini ones soon as well
WWWWOOOWWWW A McKay in person, you know that I´m listening all this weekend your voice in your videoconference jeje. Thats the beaty of internet, some time ego I download all your videotutorial from your site just in case, and now I haved jeje
I wil definitely check out for the new stuff.
Only say that your tut save my life in a couple of times, thanks.
Piflik: BTW I make it out with your help, only say thant at the filnal effect I use a Find Target with Vector Track and all OK Except the Rotation ??
How I can store the rotation information I have reviewed the links you gave me but I did not understand or do not worked for me
any suggestions ???
CGTalk Moderation
09-01-2009, 11:26 PM
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.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.