jasknight Posted April 24, 2008 Share Posted April 24, 2008 Hi Hopefully someone would be able to help me. I have attached a scene where an object gets dented by the objects around it (floor and wall). However I would like to base the amount of denting that occurs on the object relative to the force it hits the ground, or the distance from the object that it is getting dented by. ie. the higher up it gets dropped, the more the denting. I don't know how to get the velocity data from DOP's or use an expression to cause this to happen. It doesnt need to be calculated everytime it hits the floor, only the first one. The denting in the attached .hip file occurs in the softpeak1 node in the sopnet, there is an expression there, but it is random. Any help would be appreciated. cheers Jason football_deflate_rebound_v002.hip Quote Link to comment Share on other sites More sharing options...
SpencerL Posted April 24, 2008 Share Posted April 24, 2008 I would check out the dopfield expression. This allows you to grab a field from a DOP simulation and apply it in a different context, such as SOPs. You can grab the "impulse" field of an Impact in order to get how much force the impact is. There is a "Denting with POPs" example file in the Help which demonstrates this, I think. Quote Link to comment Share on other sites More sharing options...
stevenong Posted April 24, 2008 Share Posted April 24, 2008 To add on to Spencer's suggestion, you can also use the dopfield expression to group the points which has an impact then use the group with the Peak SOP. Cheers! steven PS I deleted the other post in the Effects forum. No need to double post in the future as almost everyone reads every post. Quote Link to comment Share on other sites More sharing options...
pclaes Posted April 25, 2008 Share Posted April 25, 2008 To add on to Spencer's suggestion, you can also use the dopfield expression to group the points which has an impact then use the group with the Peak SOP. To add to your post I find it better to control my "peak" with a "softer" group. A group is yes or no, in most cases this works better for me: Point color is added (could be any attribute really, but point color gives feedback in the viewport) and set to black for all points, the points in the groups are set to white. Then add a smooth sop and smooth the colors, increase the cutoff frequency and turn down the iterations to 3 or so. Add a facet to add normals to the model. Add a point sop with the following expression in the position channels: $TX + $NX*$CR $TY + $NY*$CR $TZ + $NZ*$CR This will give you an offset by normal which is similar to what the peak sop does. Only the amount is controlled through the color values (this could really be any attribute - and can be multipliead further with other attributes to filter the displacement more $BBY or $MAPV or even fit01(rand($PT+10.01),0.5,1) are some of the variables and expressions I tend to use as multipliers. You could als add a control attribute to that point sop, eg: a float attribute called "displace". With this displace attribute you can increase or decrease the resulting offset. $TX + $NX*$CR*ch("displace") $TY + $NY*$CR*ch("displace") $TZ + $NZ*$CR*ch("displace") good luck! Quote Link to comment Share on other sites More sharing options...
michal Posted April 25, 2008 Share Posted April 25, 2008 Hi jasknight, I just tried this simulation based on velocity on Y direction and it works. I used the expression this way: dopfield("../..", "ball", "Position", "Options", 0, "vely"). Of cause you can use some expression to mix velx, vely & velz. The way I dent the ball is the same as the help document, using metaball + magnet. Hope it helps. cheers deform_with_velocity.hipnc Quote Link to comment Share on other sites More sharing options...
jasknight Posted April 25, 2008 Author Share Posted April 25, 2008 Hi jasknight, I just tried this simulation based on velocity on Y direction and it works. I used the expression this way: dopfield("../..", "ball", "Position", "Options", 0, "vely"). Of cause you can use some expression to mix velx, vely & velz. The way I dent the ball is the same as the help document, using metaball + magnet.Hope it helps. cheers Excellent. Thanks for the help. Exactly what I needed. cheers Jason 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.