3
$\begingroup$

This is a follow-up to this question - Geometry nodes: How to distribute points on valleys only?

One of the approaches considered was using particles to simulate rain, then using the wet map from dynamic paint to calculate where water flows and accumulates in a landscape. The animation below shows the surface with wet and dry areas.

enter image description here

I'd like to use the wet maps to distribute particles or apply modifiers that rely on vertex weights. Additionally, I'd like to be able to do this as part of an animation.

Is there a way to move the wet map to a vertex map as part of an animation? A preferred solution would not involve python.

The file used to generate this image is here -

$\endgroup$
1

1 Answer 1

3
$\begingroup$

Particle Distribution

For the particle distribution, you can bake the Dynamic Paint (the wetmap to be precise) to an image sequence. The landscape object must be UV unwrapped for this to work.

Baking Step

  • create the UV map for the landscape object. It will take a minute or two because your mountain landscape has many vertices.

  • in the Dynamic Paint settings of the canvas (landscape object) choose Format: Image Sequence and a higher Resolution, for example, 512.

  • expand the Output section, enter a folder name for Cache Path. This is where the baked images will be saved. The press the Bake Image Sequence button.

Done this, you can deactivate the Dynamic Paint physics on the canvas and the brush with monitor and camera icons on the Dynamic Paint section in the Physics tab or alternatively, on the modifier itself.

Using the Baked Image Sequence

Use the baked image sequence for the shader to visualize it.

  • choose Open on the Image Texture node and select all images with A. Make sure they are ordered by the file name to have them in the correct order.
  • enable [X] Auto Refresh for the Image Texture node
  • set the Number of Frames

shader setup w/ image seq

Then create a Particle System for the landscape object.

  • type is Hair, activate the [X] Advanced option
  • use the cone (tree) object as rendered object (Render > Re[]nder As = Object and .. > Object > Instance Object = the cone). Increase the .. > Scale to a higher values like 0.2.
  • activate the [X] Rotation (advanced option), and set Orientation Axis to Object Y to have the trees all vertically aligned.
  • in the Textures section of the Particle System create a new texture in the first slot with the New button below.

Switch to the Textures tab.

  • select the image sequence that you have created for the shader
  • tick [X] Auto Refresh and check if the Number of Frames value is correct
  • in the Influence section, tick [X] Density. And [X] Hair Length if you want to have the size affected.
  • set Mapping to UV and select the correct UV map if you have more than one

particle settings (the particle system has a few old bugs. Sometimes it doesn't update and you have to do a change and revert the change immediately. Here for example are tiny trees... no idea why. Hair Length is not checked).

Geometry Nodes - Point Distribution

This is rather easy to do in Blender 2.93.5 because you can access the vertex color that is created by the Dynamic Paint physics directly in the geometry node:

geometry node setup

The drawback here is that it is very slow when you replay the animation.

Related question

Is it possible to get a weight paint value for a vertex group inside of a material?

$\endgroup$
1
  • $\begingroup$ the 2nd part using Geometry Nodes was exactly what I was looking for. Thanks! $\endgroup$
    – Ed Tate
    Oct 18, 2021 at 1:51

You must log in to answer this question.

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