Paint on impact

   5654   7   4
User Avatar
Member
230 posts
Joined: Oct. 2009
Offline
lets say an sphere hits a grid, is there any way to paint on grid a area which gonna have as center the impact point and as radius the impulse of the impact? This is in order to scatter points on the grid using the color. Its important the keep the scattered points after the impact and if possible to have this only on the first impact.


If you think that there is another way to achieve the scattering of points without color please let me know.
User Avatar
Member
112 posts
Joined: Feb. 2010
Offline
You can do this easily using new solver sop in H 12.
Impulse of the impact is a very large value so the area defined by this amount as radius will be very big.
Still if you want impulse use dopfield expression to import impulse value in attribute transfer sop's distance threshold para. If you want the impact region for 1st impact only then write some expression in distance threshold para of attrb transfer so that after the impact it will be zero.
Hope this helps.

Attachments:
scatter_pts_on_impact_pos.hipnc (234.3 KB)

User Avatar
Member
224 posts
Joined: Nov. 2008
Offline
You could also use the new ImpactAnalysis solver in H12.
This solver samples the impact data and attaches a geometry subset to every RBD object. It's faster then using a foreach and more accurate, filtering impacts over time using a Time Threshold, Impact Threshold and Distance Threshold.

You can also constrain the impacts to a particular surface.

It also computes the average impact position for all the points in that particular impact on a specific RBD. Extra info includes time between last impact, distance between last valid impact, the normal, the impact time in seconds, velocity, avg impulse and impulse. All very useful when you'd like to create clustered fire or smoke simulations for example.

The shelf tool RBD impacts attaches the solver to your data in the DOP network and automatically outputs the points (in import impacts)…

I've also attached an example file… Cheers Coen

PS: works with both bullet and regular rbd's.

Attachments:
impact_analysis.hip (229.0 KB)

Senior Technical Artist Guerrilla Games
User Avatar
Member
230 posts
Joined: Oct. 2009
Offline
thank you very much for both replies but I am afraid that I have to work on Houdini11. I came with a solution myself, maybe not the most efficient.

I have a sopsolver in dopnet which records the impacts of the sphere by giving you points, then I delete anything else than 0 in the case will multiple impacts in the same frame, as in my case. Then, I emit particles from the first point using impulse activation and the number of particles I want to scatter, in order to avoid have the same amount of particles in every impact, I use the same number in the Max number of Particles parameter on the popnet node. Finally I use pointjitter SOP using the axis of the grid and scale number greater than 0. I know this way may not be that smart, probably with some expression it could be simpler but works.

I missing one step, I would like to use the impulse number or the velocity of the sphere at the impact moment to control the jitter scale. How can I get these values?
User Avatar
Member
230 posts
Joined: Oct. 2009
Offline
I m on the last step and I facing a small problem.

I have attached a hip file which demostrate how to scatter based on impact in DOPs. But the only I missing is the I want to control the scale of the scattering with the impulse value or even the velocity of the moving object in the moment of the impact. In my hip file I have created two attribute, one get the velocity length of x,y,z and the other gets the impulse value of the impact multiplied by 0.0005 to have some reasonable value to work with. The problem is that when I am trying to use these attribute inside the Scale parameter of the Pointjitter SOP return error or 0 but in the details view there is values both of them. (impulse value has only value on the impact frame).
Why this is happening?

Also how can I keep this value after the impact inorder to avoid scale be back to 0 in the case of impulse and in the case of velocity to avoid the change of the value as the object keep moving?

Attachments:
scatter_on_impact.hipnc (1.1 MB)

User Avatar
Member
512 posts
Joined: July 2009
Offline
don't really to have the time to go through your file, but I quickly set up something that does what you want in Houdini 11, hope you find that useful!

best,

Manu

Attachments:
Manus_ParticleCreation_based_on_ImpactData.hipnc (111.6 KB)

http://vimeo.com/user2522760 [vimeo.com]
http://stormbornvfx.com/ [stormbornvfx.com]
Manuel Tausch
User Avatar
Member
66 posts
Joined: July 2005
Offline
Quick question about impactAnalysis: does v vector in impactAnalysis data represents actual “direction of impact”? I've tried to visualise that vector in viewport, but it seems all vectors on all impactPoints always look into the same direction, and it's obviously not the direction of impact.

If not - do you guys know how to get the direction of impact?
wbr, Mudvin
User Avatar
Member
25 posts
Joined: Nov. 2006
Offline
You can also constrain the impacts to a particular surface.

How do you do this? I'm looking for this for a while, can't find any examples…
I would like to constraint the impact points to the RBD object pieces.
  • Quick Links