# Particle Flow / aligning cubes on surface

 05 May 2008 redesigner New Member Tobias Hofer student, freelancer FH Mainz Germany Particle Flow / aligning cubes on surface Hey folks, i want to transform one object (editable poly) into another using 25x25x25cm-cubes as particles. The cubes should dock onto the surface of the target object, and cover it's 3-dimensional surface completely and not overlap one another. I could solve this problem using particle flow with the particles docking onto the vertices (find target & position object operator) of the target object, but then I need to retopologize my target objects and that would take too much time. Is there an alternative way of performing this function in order that the cubes automatically align themselves to the surface area of the object? Thank you in advance Tobi share quote
 05 May 2008 Bobo Krakatoa Guy   Borislav Petrov Product Specialist Thinkbox Software Vancouver, Canada Originally Posted by redesigner: Hey folks, i want to transform one object (editable poly) into another using 25x25x25cm-cubes as particles. The cubes should dock onto the surface of the target object, and cover it's 3-dimensional surface completely and not overlap one another. I could solve this problem using particle flow with the particles docking onto the vertices (find target & position object operator) of the target object, but then I need to retopologize my target objects and that would take too much time. Is there an alternative way of performing this function in order that the cubes automatically align themselves to the surface area of the object? Thank you in advance Tobi The standard way of doing this is reading the target positions and storing them into the Script Vector Channel via a Script Operator or a Box #3 DataOp. Then, set the Find Target to "By Script Vector" and the particles will fly to those positions. If the stored values are in World Space, you don't even have to specify a Mesh in the Find Target test. If the Target object is moving though, you can pass the values to the Script Vector Channel in object space and select the object in the Find Target test. If you would move the target mesh node, the particles will still dock correctly because they would use the object space coordinates, no matter where in the world that object is. __________________ Bobo share quote
 05 May 2008 PsychoSilence 3Delicious   portfolio Anselm von Seherr - Thoß VFX Technical Director Incendii VFX New Orleans, USA i was always wondering how it works correctly with moving target objects...and scripts are really the bottle neck of a particle system :( __________________ 3Delicious | Incendii Visual Effects LLC | Vimeo VideoBlog | Volatile Training share quote
 05 May 2008 redesigner New Member Tobias Hofer student, freelancer FH Mainz Germany grid spacing Originally Posted by Bobo: The standard way of doing this is reading the target positions and storing them into the Script Vector Channel via a Script Operator or a Box #3 DataOp. Then, set the Find Target to "By Script Vector" and the particles will fly to those positions. If the stored values are in World Space, you don't even have to specify a Mesh in the Find Target test. If the Target object is moving though, you can pass the values to the Script Vector Channel in object space and select the object in the Find Target test. If you would move the target mesh node, the particles will still dock correctly because they would use the object space coordinates, no matter where in the world that object is. Bobo, thanks for your answer! That's the way I already tried, but I need the particles to arrange in a 3d-grid with 25x25x25 spacing. I have attached some pictures to show the problem: I have found a workaround now, I have positioned boxes (25x25x25) manually as objects around the surface of my target object. Then I have set the size of the boxes to zero in xyz and collapsed them as a mesh. After converting this to an editable poly, I have welded the vertices (eight vertices per box became one), so I can use this vertices as docking points for particle flow. But: the problem now is, that my source object consists of 1560 vertices, and my target object has 2345 vertices. How can I tell particle flow, to cover every vertex on the object and not twice (what I get with some particles right now) and to change the amount of particles from 1560 to 2345 over time? Last edited by redesigner : 05 May 2008 at 09:57 AM. share quote
 05 May 2008 mhinks Veteran portfolio Mark Hinks 3D Designer United Kingdom I need to do a similar task with Pflow. I need to have a 60 particles to appear and fly off and fix on to specific vertex points on an object. The problem I have is currently I cant get only one particle to go to one vertex, and also I have no idea what to write in the script operator to do the method you discribe. Any chance you can help me out? share quote
 05 May 2008 redesigner New Member Tobias Hofer student, freelancer FH Mainz Germany Originally Posted by mhinks: I need to do a similar task with Pflow. I need to have a 60 particles to appear and fly off and fix on to specific vertex points on an object. The problem I have is currently I cant get only one particle to go to one vertex, and also I have no idea what to write in the script operator to do the method you discribe. Any chance you can help me out? Hi mhinks! There is a good video-tutorial by Allan Mckay on his website: http://www.allanmckay.com/tut/tut_ObjAB.avi share quote
 05 May 2008 mhinks Veteran portfolio Mark Hinks 3D Designer United Kingdom That video was v good but....! I've used the below code. `````` on ChannelsUsed pCont do ( pCont.useVector = true pCont.usePosition = true --pCont.useRotation = true ) on Init pCont do ( ) on Proceed pCont do ( count = pCont.NumParticles() for i in 1 to count do ( pCont.particleIndex = i pCont.particleVector = pCont.ParticlePosition; ) ) `````` This works, but the z heights not not correctly getting sorted, and the are going to the correct places, but all slighty offset. Very strange. Does anyone notice something wrong? share quote
 05 May 2008 CGTalk Moderation Expert 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. share quote

 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 vBulletinCopyright ©2000 - 2006, Jelsoft Enterprises Ltd.