Dynamic arrows sticking into moving geo.

   5283   4   3
User Avatar
Member
4 posts
Joined: 9月 2011
Offline
Hi, folks.

I need to set up a simulation where dynamically-generated arrows fly, then collide with a deforming surface and stay stuck to that surface (shields carried by moving
soldiers). Importantly, the arrows should NOT just align along the prim normal on collision; they should protrude at the angle at which they collided.

This is a topic that's come up before, but I haven't been able to find a satisfactory answer about it. Some suggestions don't quite hit all the elements I need; some are for older versions of Houdini and so might not be as relevant/accurate (I'm on H14).

The approaches I've considered are:
1. Particle-based arrows that stick. It's easy enough to copy arrow geo onto a particle sim, and have the particles stick to the collisions surface. However, then the particles have to start inheriting the orientation of the collision prim as it continues to move. This could be handled two ways:
The collision geo is deforming. In this case I'll somehow have to calculate how the collision prim has transformed from the moment of impact to the current time.
The collision geo is transforming. In this case I'd use rivets to attach non-deforming stand-in geo to the moving collision objects (which don't change shape). Not ideal, but it might make it easier to work with the orientation values?
2. Particle-based arrows that create geo. Having already grown sick of the mathematical jungle of quaternions, matrices, and dihedrals, I wondered if a better approach might be to make each particle spawn some geo in the colliding object's network instead (presumably using a SOP Solver?) , then die. This would hopefully eliminate the need to continuously update orientation.

3. RBD-based arrows with constraints. Moving away from particles altogether, I wondered about using simple Bullet geo for the arrows, and dynamically creating constraints to pin them to the shields when they impact. An advantage of this method would be that it would allow realistic stick-like collisions and bounces for loose arrows–something particles can't really do.

If anyone has any thoughts about which of these methods is most promising, or has any specific advice about how to implement them, I'd be extremely grateful to hear. Thanks in advance!
User Avatar
Member
2624 posts
Joined: 8月 2006
Offline
A very interesting post > although I do not have all the solutions to your multi layered problem I would like to make a few suggestions. My preferred option would be number 1 out of your list.

1) You could set up a particle shooting system that could automatically aim specifically at moving objects by ID / object type ie shield / body.

2)Instead of you doing any complex calculations from when the arrow particle hits , why not use a scatter sop on your deforming target and get the arrow particle on contact to inherit the nearest points attributes like orient ? .

Interested to hear more on your progression with your project

Rob
Gone fishing
User Avatar
Member
4 posts
Joined: 9月 2011
Offline
Thanks, Rob. I appreciate the suggestions.

I'd like to avoid having to have separate emitters or particle objects per type of impact surface–sounds like a labour-intensive setup, and I need to implement this for multiple shots.

The scatter/attrib transfer approach you suggest sounds promising. However I'm still a bit unclear about how I'd continuously update the orientation while preserving the original angle of impact. If one arrow strikes a poly parallel to the normal, while another strikes the same poly at a 45-deg angle, they'd have to update differently… but how to transform that impact vector along with the movement of the collider?

I've actually made good progress with my second approach: I managed to set up a SOP Solver node to copy a point into a geometry container at each moment of impact. Those points persist and, since they're being created in a SOP that is riveted to the shield animation, they update their orientation automatically and correctly. Then I just copy the arrow geo on to them, and kill off the original colliding particles that created them.

Thanks again for weighing in!
User Avatar
Member
58 posts
Joined: 11月 2014
Offline
SteveSayer
Hi, folks.
I was doing this and thinking about the soultion of correcting hit alignment.
here is what i have done, buts it s not doing well in may set up some are getting reverse in directions and they are snapping in an angle , may be using some randamizations of the rotations can help that same angle to reduce, but cant figured out why some points are flipping opposite diections, its happening in the sim itself i tried using normal ground plane as collider, then its not even using hitnoraml.
v@N = v@v+@hitnml; after the pop sim
after digging into the pop solver I am guessing it is the gas integrator node which is causing this collision alignment.
I though about the sop solver or for each point to get the previous frame of the stopped = 1 to get to the alignment,
suggestions are much appreciated in this case to get the right alignment after the hit and stopped or stick.
trying the collison scatter points and attribute transfer might not working as the particles can hit any other direction then the Collison point oriented directions
a flip book of the hitnml use https://youtu.be/xSS5o9XOcS8 [youtu.be]
Edited by Houdini Obsession - 2021年5月8日 18:20:28

Attachments:
hitnml pop collision align.png (124.4 KB)
hitnml pop collision viewport.png (438.1 KB)

Houdini Fx Artist (Build)
User Avatar
Member
58 posts
Joined: 11月 2014
Offline
SOLVED
by using the POPdcollisiondetect with option of sop or context input(while using the dop object option it is same as the pop solver) and (with popsolver node off/uncheck the enable collsion detection ) this is making the orientations steady while using the popsolver node it is changing the orientation to the collision geometry and some times flipping them.
https://youtu.be/1PsSoctOiKU [youtu.be]
https://youtu.be/vAT3lEfpPy4 [youtu.be]
https://youtu.be/tD7-tCnW0Ws [youtu.be]
https://youtu.be/XKQg6NKng6E [youtu.be]
Houdini Fx Artist (Build)
  • Quick Links