Paint on impact
5654 7 4- csp
- 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.
If you think that there is another way to achieve the scattering of points without color please let me know.
- sadhu
- 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.
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.
- cklosters
- 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.
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.
Senior Technical Artist Guerrilla Games
- csp
- 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?
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?
- csp
- 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?
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?
- asnowcappedromance
- Member
- 512 posts
- Joined: July 2009
- Offline
- Mudvin
- 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?
If not - do you guys know how to get the direction of impact?
wbr, Mudvin
- scorpes
- Member
- 25 posts
- Joined: Nov. 2006
- Offline
-
- Quick Links