Jump to content

Bubble particles from mesh

Recommended Posts

Hi! I'm fairly new to Houdini and working on some personal explorations— I'm trying to grow some jiggly, organic bubbles from the mesh of some hard surface geometry that detach themselves and float away. I've got a basic setup (file attached) and would love input on two specific things (and also if there's a better general approach to what I'm doing). 

1 As the particles grow away from the surface of the main geometry, I''m trying to figure out how to create an attribute that would map that distance.. so that I can eventually use it to drive a shader/material (I'd like to go from the shader of the main geo to a bubble-like shader). I quickly mocked up what I think this map would look like (just a gradient distance from the main geo). 


2 I'd really love to add dynamic forces to the particles emerging and detaching from the surface. They'd slowly push through the main mesh, struggling their way out, before getting a strong push in velocity once they snap free. Where would I even start? :) I'm currently using an SDF Union to create the meta-ball like attachment, but I feel like perhaps this may be the wrong setup for what I eventually want. This approach is also smoothing out my main "hard surface" geo which I don't want, but I figured there's a way to reproject the original surface.... 

Thanks for taking the time!


Link to comment
Share on other sites

  • 2 weeks later...

Alright, jumped back onto this horse after some time. I know I'm taking on more than I can chew at the moment as a Houdini noob, but I'm intent on tackling this. I realized that I could almost accomplish issue #1 (distance falloff) using a simple attribute transfer and Cd. Image attached. However, if you'll view the image, I'm realizing that the "distance threshold" only defines a narrow band in either direction. I'd like my particles to remain blue after they cross the defined boundary.. instead, they fade back to red (image reads Left to Right; particles go from inside base geo to outside).

I'm also of the mind that this can be accomplished by sampling the sdf gradient (based on some Entagma tutorials I've watched), but at the moment it's quite beyond me. 



Link to comment
Share on other sites

If I understand you correctly, you just want to map the distance from the surface, right? This can be accomplished easily with VEX, even outside the pop net.

I'd try a wrangle on all the particles, using the minpos function. It'll give you the closest position to the input geometry. Won't be perfect in all scenarios, but in the same way you can mix it with the particle age for more control etc. 
I attached a quick demonstrating driving the pscale and the color from the distance. Using a ramp gives you even more control.

Regarding Q2 you can probably use similar functions to add more or less velocities. I.e. you can multiply a force by the distance. 


Link to comment
Share on other sites

Fantastic, minpos seems to be exactly what I was looking for. I've reworked my network a little to simplify things. Next, I'm going to start looking into forces.

I'm trying to get the particles to be attracted to the surface position where they were birthed until they 'escape' (using a custom force attrib multiplied by their pscale?). 



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.

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...