Condensation using geometry nodes

I'm working on some condensation using geometry nodes but also trying to use a bump map for the smallest points of condensation. Generally, it looks really good; however, when looking very close, you can see the bump map through the larger droplets created by the geometry node. Is there any way to convert the geometry data into something I can use to mask off the bump map so it doesn't come through from behind the drops? If it was real condensation, the larger droplets wouldn't have small droplets behind. Again, the smallest droplets are coming from an image, not geometry, so there's no actual object collision happening. Any ideas?

UPDATE: I used the fantastic idea from Hulifier to use Dynamic Paint, but it resulted in a slight offset. It also didn't quite capture all the droplets from my geo node.

For the below image, I left the bump off and the new mask as a black color overlay so the offset can be seen better. Here is the result.

enter image description here

Update 2: Using a vector math node from the comments and editing the dynamic painting get's this very close to perfect. Some settings will need to be messed with for individual setup differences.


1 Answer 1


With Dynamic Paint, you can use your Geometry Node's geometry as a brush and your mesh as canvas to bake a texture, then you use that texture to mask the bump and roughness in the condensation material.

I don't know if you can do that with the Geometry nodes and the mesh in the same object, you may need another object to put your nodes.

Without DP texture masking:

no dynamic paint masking

Resulting texture from Dynamic Paint:

dynamic paint result

Mask applied, without and with the water drop:

Result, no condensation below water drop

If your render is an animation where the water drops will move, you will need to bake all frames within the desired interval, you will also need to enable dissolve and set it's time value to 1 so areas where the drops are no longer present don't remain painted.

Dynamic paint Dissolve option

I used the paintmap output for this result.

Your mask paint may have a little offset from your drops, I don't know the reason, but I managed to solve this by adding a little offset to the mask texture vector input:

masking texture offset

the values you need may or may not differ.

Now, if small parts of the painting mesh are not painting, you can try to change the brush source to Volume + Proximity with a very small distance and mess with the options below:

Dynamic paint brush source

Edit: Using the project option seems to give better results to me.

Edit 2: perfect method

Doing this, even small geometries will paint, and in the correct location.

Forget about translating the texture. Just do this:

Before baking, translate the entire brush geometry by 0.001 in every axis:

Transform geometry node

After baking, you remove the translation.

resulting texture:

texture result

The problem cause, probably:

/* a simple hack to minimize chance of ray leaks at identical ray <-> edge locations */
add_v3_fl(ray_start, 0.001f);

This code line in the dynamic_paint.c file apparently adds a little offset to raycast origins when using a mesh brush, the result is not very noticeable in large scale objects, but in small scales produces very different results from what one would expect.

  • $\begingroup$ thank you so so much for this response. It seems to be the right answer, but I must be doing something wrong in my implementation. I'm getting a result where the masking is offset from the drops, and some of them also aren't being painted for some reason. I'll post some additional shots in my original question to show it visually. $\endgroup$
    – Whit B
    Apr 14, 2022 at 17:28
  • $\begingroup$ @WhitB i was getting a similar problem, but was thinking i was doing something wrong, so I didn't add my workaround to the answer, I will add it now, sorry. $\endgroup$
    – Hulifier
    Apr 14, 2022 at 18:08
  • $\begingroup$ great solve! The vector math node on the texture helped fix the offset. and the edits to the dynamic painting helped quite a bit. I'm still working on settings because some drops are missing, but just a matter of experimenting with the settings. Thanks so much! $\endgroup$
    – Whit B
    Apr 14, 2022 at 21:56
  • $\begingroup$ @WhitB if some drops refuse to show even after messing with all settings, try using bigger scales for your project, Scale everything up and apply the scale, you may need to correct some things on your Geometry nodes after scaling, you will also need to adjust the vector node connected to the texture mask. $\endgroup$
    – Hulifier
    Apr 14, 2022 at 22:51
  • $\begingroup$ @WhitB Just in case you're still working on that project, I'm informing you that I added a method that works perfectly to the answer. $\endgroup$
    – Hulifier
    Apr 17, 2022 at 2:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .