You might have seen this effect more frequently during the last months: Those growing organic blobs that cover a surface in intricate Patterns (sometimes resembling the texture found in a Keith Haring painting). These patterns are the result of a process called Reaction Diffusion.
Reaction diffusion simulates the behaviour of two substances (chemicals) which interact with each other. On the one hand the substances are transformed into each other (this is the reaction), yielding higher concentrations of the given chemicals at a spot, on the other hand they also dissolve (this is the diffusion), spreading themselves out over an area. By giving each chemical an individual color and simulation both the concentration and the diffusion over and over again, with the right parameters beautiful patterns emerge.
Until now most implementations of reaction diffusion we’ve seen were done on a 2D plane (like the example in Pt. I in Photoshop), but we were looking for a way of running the simulation in true 3D space as well. Enter voxels and volumes. With a volume being the natural extension of a 2D image into 3D space, implementing the Reaction Diffusion algorithm in true 3D is doable. And that’s what we’re gonna do in this three part tutorial.
Download Project File (.hipnc)
Thank you so much for making all these amazing tutorials that address the kind of questions a lot of people working in this field have. You explain wonderfully and the topics are all very interesting. Good balance of theory and practice….
Pingback: Reaction Diffusion, Houdini Tutorial - Inside 3d News | Breaking Models Blog
Really excited to watch these, I’ve been really interested in these effects for a while now. Thanks again guys, this site is pretty amazing, learning a lot!
Thanks guys, really glad you enjoy this – it’s a pleasure for us as well! Cheers, Moritz
Thank you so much for taking the time to make these tutorials! I’m really glad you guys explain the theory behind all of these techniques as I’m learning a lot!
THNAK YOU SO MANY . I LOVE YOUR TUTS.
Thank you for this great tutorial!
Tried it and it worked really well.
I have a follow up question:
As I am fairly new to houdini ( I was/am a heavy C4D User) I don’t quite get how to best set up a mantra renderer with caches for dynamic stuff like this.
I used a file cache node to save the bgeo.sc to disk and it is working fine but the mantra I set up renders black on every frame.
Do I have to set up something at the OUT level?
we did a short segment on rendering in Mantra here: https://vimeo.com/169437356
If you’ve got proper geometry (preferrably with normals 🙂 ) that should do it.
If that doesn’t solve it for you just shoot a link to your setup and we’ll have a look at it.
Thanks for your quick reply.
I watched it and it is pretty helpful but I am still stuck at the rendering.
it renders this:
The Cache node help says:
Switches between passing through the input geometry and loading the geometry from disk.
If you start a render, it will always use the input geometry, ignoring this parameter.
so how do I tell the renderer to use the cached files?
Could you upload your scene file somewhere?
It seems I messed up the conversion process.
I am now going from the volume (fog) to a vdb SDF and finally to to polygons.
Is there a quicker way to get polygons out of the fog volume or is this the way?
Thanks for your time! I really appreciate it!
Not sure if it’s quicker or better but with the convertvolume-SOP you’ll be able to directly convert a standard volume to polygons.
Also try converting the VDB back to Polygons before rendering – your screenshot looks as if you’re trying to render out the volume directly.
Pingback: Houdini training day 7 | nicola gastaldi motion graphics designer
Great tutorial guys, I’ve been fascinated with reaction-diffusion phenomena for years and am really enjoying Houdini’s flexibility in implementing this.
I was able to get a setup working with VDBs, happy to share the .hip file if anyone’s interested! I haven’t benchmarked it yet but it does feel somewhat faster.
that’s awesome news! Of course we’d love to see your solution.
Ok, I cleaned this up a bit, take a look and let me know what you think. Could use improvement I’m sure, but the VDB expansion/pruning seems to be working pretty well.
Immediate spontaneous reaction: This is amazing – Thank you very much! Great technique (it never occurred to me that I had to use both nodes in the solver)! Thanks a lot again – truely remarkable.
Awesome, love this sharing of knowledge back and forth! Another big reason why I’m enjoying the Houdini experience…
Next up, trying to implement Grey-Scott reaction-diffusion equations with Houdini volumes… not working well so far, I think it has to do with my laplacian implementation, my math skills need some serious work. Got it working well in 2D with point clouds at least…
Thanks again for all the good stuff you guys have been posting, I’m learning a ton!
funny – been working on it as well. Yes, the 3D Laplacian is weird. Also the equation parameters need to be quite different than for 2D solutions. I was kinda successful with a kernel of -26 as center value and 1 as value for each other cell. Had to dial down DA and DB to something low’ish like 0.1 and 0.05 or even 0.01 and 0.005… Gotta tweak a lot. Also my implementation runs kinda slow. 😀
Keeping my fingers crossed!
Looking forward to seeing what you come up with Moritz!
Reaction diffusion is one of the reason I wanted to try out Houdini!
you guys made my day 🙂
Is there a reason why you prefer to use a Volume Vop with a clamp instead of the clamp parameters in the volume Mix ?
Also I dont see much difference with or without the Switch, is it really necessary or is it just to get a cleaner look?
no certain reason why I used the clamp in the Volume VOP instead of using the Volume Mix clamp. Both should work. I suppose you mean the switch to check if my voxel value is below a certain threshold? With certain setups that I built there were artifacts emerging when I omitted this step. Might not be the case in most setups but I ran into it and that fixed it for me 🙂
Thanks for the explantation, I was indeed talking about the switch checking the voxel value, It makes total sens to cut the residual values to get a cleaner mesh at the end.
i cant do this set up due im in houdini 12.5 there is no volume resample there, and volume cant grow /cry :´( do you know a way to resize fluid without that node?
Not really, but maybe someone in the community does… But Houdini apprentice is a free download, so maybe that’d be an alternative 🙂
Hi, Ihr seid super.
Vielen Dank für die guten tiefgründigen Anregungen.
Grüße aus Niedersachsen!
Thank you So much.
Here is my work which I could accomplished with your tutorial and Dave Stwart’s experience in this field.
Modeling in Maya,
FX , Shading and lighting in Houdini.
Very cool Azi!! Glad to hear that my sample scene was helpful as well.
Hi Mortiz, Great Tutorial
Is it possible to make it a houdini Asset to port it into C4d?
sure – that’s possible. In fact we have a tut covering the creation of Houdini Assets coming soon. Until then you might want to stick to Simon Fiedler’s video on this topic: https://vimeo.com/136953197
Thanks Moritz, I´ll ckeck Simon’s video.
I’m looking forward to your video.
It’s simply amazing !
i tried to achieve your 2D result in GIMP but all i got was a line of white dots at the edge of the original black dots. I watched your tutorial again and you talk about and amplitude. Is there something else you use except the blur?
nope – I don’t use anything that’s not in the video. Everything you see here should work (in Photoshop). Not much GIMP-knowledge on my side, sorry 🙁
Hey thanks for tutorial, also I love theory parts of your tutorials.
Best training webpage in the interwebs so far.
Here is my result
Fantastic tutorial, Achieved exactly the effect I was looking for. Unfortunately I am quite new to houdini and I’m having some trouble exporting this animation to c4d+Octane, Anyone mind sharing how to go about it?
the easiest way (imho) would be to use the alembic ROP and write out your animation as an alembic file which you can then import into C4D. However you’re gonna need an indie or full license of Houdini in order to be able to do that. (I think the alembic rop won’t output sequences in the apprentice version.)
Cheers, Mo 🙂
for those interested
Thank you so much!
Without people like you, people like me would some things very, very difficult.