dangerweenie Posted December 2, 2011 Share Posted December 2, 2011 Hey guys, I'm trying to achieve the following effect: 1. Break a model up using the 'shatter' SOP. 2. Move the resulting pieces to a network of particles. I'm getting quite close but can't seem to figure out how to get it to work. I know how to instance a single piece of geometry onto several particles, and there's even a help file example scene detailing how to do it with a random bank of objects ... but I want to have the shattered object basically just "float" around the scene, as I will have to do this to about a dozen or more objects, and might have to change the size of the pieces, so this would have to be a bit dynamic or adjustable. Any help is greatly appreciated. Thanks, m Quote Link to comment Share on other sites More sharing options...
gaurav Posted December 2, 2011 Share Posted December 2, 2011 (edited) For a simple case where your floating number of points = number of pieces in your shattered obj. piece0 goes to -> pt 0, piece1 -> pt1.. piece N-1>ptN-1,pieceN>ptN. Put down a copy sop, enable stamp inputs with a stamp variable called "cnum" = $PT. Feed the shattered obj to input 1 and template points (likely to be coming out of pop sim) to input2. Now we stamp each piece group to points using delete sop on shattered obj. Choose delete nonseletcted with following expression in group field. `arg(primgroupmask("../shatteredobj","piece*"), stamp("../copy1","cnum",0) )` adjust the pivot of each group using transform sop $CEX,$CEY$CEZ, before it goes in to the copy sop. You can further control the orientation using ( upvector , velocity), scale using(pscale) via point sop on template points. Cheers!! Edited December 2, 2011 by vectorblur Quote Link to comment Share on other sites More sharing options...
dangerweenie Posted December 2, 2011 Author Share Posted December 2, 2011 Hey Vector, Thanks for your help! I tried following your advice, but I'm getting a node error on the copy SOP. Do you think you coud take a look at the attached file and let me know what I am doing wrong? Thanks! m For a simple case where your floating number of points = number of pieces in your shattered obj. piece0 goes to -> pt 0, piece1 -> pt1.. piece N-1>ptN-1,pieceN>ptN. Put down a copy sop, enable stamp inputs with a stamp variable called "cnum" = $PT. Feed the shattered obj to input 1 and template points (likely to be coming out of pop sim) to input2. Now we stamp each piece group to points using delete sop on shattered obj. Choose delete nonseletcted with following expression in group field. `arg(primgroupmask("../shatteredobj","piece*"), stamp("../copy1","cnum",0) )` adjust the pivot of each group using transform sop $CEX,$CEY$CEZ, before it goes in to the copy sop. You can further control the orientation using ( upvector , velocity), scale using(pscale) via point sop on template points. Cheers!! copyforeachquestion.hip Quote Link to comment Share on other sites More sharing options...
gaurav Posted December 3, 2011 Share Posted December 3, 2011 Hmm.. your file sop is missing tambor.obj. So everything else down the chain errors out, Should have been frozen instead. Anyways attaching hip which illustrate the basic idea. Hope it is useful for you. Cheers!! copyBreak.hipnc 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.