7
$\begingroup$

I am creating a scene in blender and want my grass to grow shorter near the path and the lake by taking data from weight paint, it was simple to achieve using the particle system, but I have no idea how to do it in geometry nodes.

$\endgroup$

2 Answers 2

12
$\begingroup$

Solution for Version 2.93 :

You can use an Attribute Math (or Attribute Vector Math if you want non homogeneous scale) node to control the point scale with your vertex group weights.

Input weights :

enter image description here

The node tree :

enter image description here

Basically : Distribute points, scale relative to the VG weights, instance your objects, join geometry, output geometry.

Result :

enter image description here

If you want to control the scaling factor, use an Attribute Mix to mix between a base scale and your VG weights:

enter image description here

Note that a float $value$ is automatically converted to a $(value, value, value)$ vector when plugged into a Vector input.

Result :

enter image description here

You can also change the interpolation by using an Attribute Map Range node.

enter image description here

enter image description here

$\endgroup$
2
  • $\begingroup$ Note: This solution seem to be out of date and can't be reproduced in Blender 3 anymore. $\endgroup$ Dec 2, 2021 at 6:39
  • $\begingroup$ @ChristophWerner You're right ! Seems more straightforward now. :) $\endgroup$
    – Gorgious
    Dec 2, 2021 at 7:58
5
$\begingroup$

Here's the basic solution how to use it in Blender 3. You can use vector math nodes and/or the distribution node to get more control and expand this method for your needs.

enter image description here

$\endgroup$
1
  • $\begingroup$ In Blender 3.2 there is now finally the node Named Attribute, so this answer could use an update ;-) $\endgroup$
    – quellenform
    Aug 10, 2022 at 16:54

You must log in to answer this question.

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