dislocate chunked object - bobo script

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 10 October 2008   #1
dislocate chunked object - bobo script

Hi, did anybody tried to control chunked object that generates bobo script?
what I have in mind to create a really complicated shape(car for example) chunk it then dislocate all its parts in space - spin it, rotate it and at some point put all chunks together so that they would form car as it is and then again dislocate, spin and rotate.

I tried allmost every operator to dislocate and then put it back together but once it dislocates it doesn't go back. I also tried to animate original shape. But chunks doen't realy follow that animation. That was quite dissappointing if you imagine what cool effect can be done if the original shape would have Morpher animation on it.

On my scene i put 3 boxes and spline on which bobo chunks move using speed by Icon and path constraint.

So how to dislocate chunks and put them back together?


My regards to great scripting minds as bobo - i wish i knew how to script
Attached Images
File Type: jpg screen01_pflow.jpg (89.1 KB, 68 views)
__________________
I'm into deep
HOH: B-MOVIE challenge

 
Old 10 October 2008   #2
Do you mean something like this? www.wickedstuff.nl/dump/chunks.mov
(Oh, and.. play it backwards )

I used 2 scripts to achieve this:
1- A script to fragment the object -> download
2- A (birth)script that uses your fragments -> tutorial

Make sure that you center the pivot of each mesh and apply a Reset XForm on each mesh.


Here is my flow:
 
Old 10 October 2008   #3
Originally Posted by digi_est: Hi, did anybody tried to control chunked object that generates bobo script?
what I have in mind to create a really complicated shape(car for example) chunk it then dislocate all its parts in space - spin it, rotate it and at some point put all chunks together so that they would form car as it is and then again dislocate, spin and rotate.

I tried allmost every operator to dislocate and then put it back together but once it dislocates it doesn't go back. I also tried to animate original shape. But chunks doen't realy follow that animation. That was quite dissappointing if you imagine what cool effect can be done if the original shape would have Morpher animation on it.

On my scene i put 3 boxes and spline on which bobo chunks move using speed by Icon and path constraint.

So how to dislocate chunks and put them back together?


My regards to great scripting minds as bobo - i wish i knew how to script


this modification to the birth script works for me after the reset xform ...

( I can send you a scene if you wants to see it working)


on ChannelsUsed pCont do
(
pCont.useAge = true
pCont.useTM = true
pCont.useShape = true
)
on Init pCont do
(
global ChunksArray = $ventana* as array
)
on Proceed pCont do
(
t = pCont.getTimeStart() as float
if t == 0 do
(
NumChunks = ChunksArray.count
for i = 1 to NumChunks do
(
global x1 =ChunksArray[i].Position.x
global y1=ChunksArray[i].Position.y
global z1=ChunksArray[i].Position.z
global caca = ChunksArray[i]
pCont.AddParticle()
pCont.particleIndex = pCont.NumParticles()
pCont.particleAge = 0
pCont.particlePosition = ChunksArray[i].Position

caca.Position.x=0
caca.Position.y=0
caca.Position.z=0
pCont.particleTM = (matrix3[1,0,0][0,1,0][0,0,1][ChunksArray[i].Position.x,ChunksArray[i].Position.y,ChunksArray[i].Position.z])
pCont.particleShape =caca.mesh


caca.Position.x=x1
caca.Position.y=y1
caca.Position.z=z1

pCont.particlePosition = caca.Position


)
)
)
on Release pCont do
(
)

Last edited by Camtrack : 10 October 2008 at 03:17 PM.
 
Old 01 January 2009   #4
Hi,

This is my first post here. I'm trying to learn PFlow for a project, currently on page 75 of the massive sticky, so I've lot's of ideas about whats possible but lacking the knowledge to stick it all together.

I'm trying to get a fragmented cube (only 10 chunks) to come apart, fly around a little and then reform.

I've managed to get this script to disperse my object but I am totally clueless as to how to get it to reform. I'm assuming that I need to combine a Find Target with a scripted operator that somehow reads

I wonder if anyone could give me some pointers, or even better post an example file :o)

Best,

Charles
 
Old 01 January 2009   #5
Originally Posted by Photropikl: Hi,

This is my first post here. I'm trying to learn PFlow for a project, currently on page 75 of the massive sticky, so I've lot's of ideas about whats possible but lacking the knowledge to stick it all together.

I'm trying to get a fragmented cube (only 10 chunks) to come apart, fly around a little and then reform.

I've managed to get this script to disperse my object but I am totally clueless as to how to get it to reform. I'm assuming that I need to combine a Find Target with a scripted operator that somehow reads

I wonder if anyone could give me some pointers, or even better post an example file :o)

Best,

Charles


In the birth, store the original positions of the chunks/particles in the particleVector channel (pCont.useVector = true, then in the Proceed handler, pCont.particleVector = pCont.particlePosition).

Later on, when you want to recombine, set the Find Target to use Script Vector channel as the target location. Each particle will contain its "home address", or better, "homing positions", in the particleVector channel and the Find Target will move it to that world coordinate. For this to work, you should have NO mesh selected in the Find Target (otherwise, the vector channel will be interpreted as local coordinates in the mesh's space).

(shameless plug) Go buy my DVDs for more ideas
__________________
Bobo
 
Old 01 January 2009   #6
Brilliant, and how perfectly simple.
Thank you so much.
 
Old 01 January 2009   #7
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



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 04:58 AM.


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