Jump to content

Squishy collision


Nerox

Recommended Posts

Hi,

I'm trying to get a series of balls, ballons or gelly cells tightened within a fixed area. Some of them might have a keyframed changing size, which affects the other ones by deforming and pushing them away.

I've found the 'squishy' DOP node, which works so far fine for a singel object. But I would like to have them deforming and pushing each other around. I think it might be possible using the squishy approch, but I'm not sure how to set this up.

In the help there's a setup where a RBD object affects a squishy object, I'm trying to get just that but without the RBD and just 2 or more squishy objects.

I've attached a hip with just 2 balls, a groundplane and the squishy node affecting the balls indipendently.

Squishy_Test.hip

Edited by Nerox
Link to comment
Share on other sites

The help file say's: 'Collision relationships can also be created using a Merge DOP or turning on the Make Objects Mutual Affectors toggle on solver nodes.'

But sadly enough the objects still don't collide with each other, do I have to setup a seperate collide relationship and how does this work?

I've attached the altered scene file.

Squishy_Test.hip

Edited by Nerox
Link to comment
Share on other sites

as far as i remember its not possible to collide soft objects since they work via the pop solver(each point is attached to a particle internally.. so houdini sees a soft object like a cloud of partcles and not as a solid) and there is no particle/particle collision yet.

i dont exactly know if it was possible to have houdini think of the object as a rbd and a softobject at the same time and having collision detections via the rbd solver.

Link to comment
Share on other sites

have you tried using a particle fluid solver instead? Maybe play with the viscosity and internal pressure of the fluid to make it react like a dough or something. I think there's a tutorial on fluids (SESI website) that has an example where particle fluids where used to create a dough that's been cut with an RBD knife.

Cheers

Link to comment
Share on other sites

have you tried using a particle fluid solver instead? Maybe play with the viscosity and internal pressure of the fluid to make it react like a dough or something. I think there's a tutorial on fluids (SESI website) that has an example where particle fluids where used to create a dough that's been cut with an RBD knife.

Cheers

@ ihab I'll have a look it, it possibly could fit in my new setup.

I've had a little change of plan, i've switched to a more 2d approach. I've created a setup which rely's on a grid on which disks are copied. Sliders changes the point colors on the grid, the color information get's smoothed by a smooth SOP. The disks get there scale from the point color information.

You're exualy you're scaling the 'heroe' disk down, but by making it active (toggle) the scale is reversed.

One issue remains, the disks don't move away for the heroe disk. I think it might be an option to make the normals orient to the closest brightest point, which give the logical opposite direction for the other disks to move in (a way from the heroe).

Just one minor issue is that I just can't get these damn normals to point in the proper direction, a little tip would make me a more than a happy man.

After a 16,5 hour shift, I'll get my ass home.

Squishy_Test_03_Od.hip

Edited by Nerox
Link to comment
Share on other sites

I figured out to get the effect I wanted I just needed 2d disks moving in a proper way.

It's based on a grid which has points with changing color value's over time influenced by a sphere. In a typical example there could be more than 1 'hero' point, any point on the grid can become a 'hero' point, driven by multiple influence objects. The normals should point away from the brightestpoint / hero object.

I've found the appropriate solution for this, it's actually quit simple. It's nothing more than clever use of the transferAttribute Sop.

In this setup I've used a sphere as a so called influence object, this object controls which disk are scaled or moved.

Basically the disk thats most close to the sphere is scaled up where the other ones are scaled down. Because the point color is transfered to the grid and the point color values are smoothed there's a falloff in scale.

The normals of the sphere (which just point strait out) are also transfered, the y normal axis is set to 0. This way the normals on the grid point away from the hero disk, which gives the other disks a direction to move in.

Since normals exists in a vector -1 to 1 space (Or something similar), this value can be used as a offset in the x and z axis. Multiplied by the size of the disk it gives a appropriate movement of the disks. The formula I've created results in small disks moving faster than large disks.

Of cource something similar could be done with some clever scripting in 2d compositing applications, but the cool thing about this method is that is totally procedural. Which allows one to add 2, 3 or even more influence objects. The grid object can be any deforming or not object, and the method is with some small modifications also scalable to a third dimension.

It's not finished jet, I've solved the biggest issues and I just wanted to share this with the community.

I currently work for a small studio in the VTR room, I'm in a position where I need to convince my bosses Houdini is a real addition to our Maya based 3d department. And, not futile, they need to free me from my VTR job ;-). Hope this will help a bit.

Squishy_Test_07_sidefx.hipnc

Edited by Nerox
Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...