-1
$\begingroup$

Hi wondering if anyone can help me. I am trying to make a castle enclosure using nodes which I have gotten so far from scratch. How ever am stuck at the point where I want to use the shape information from one tree and place it into another on a different object like grass, which I can then fill the shape in with, so that no matter the base shape it will always fill it in and I can place grass/fur onto it.

Here is what I mean

enter image description here

everything I look into online takes me down a rabbit hole and does not work, for example some people are saying to use a named attribute, but when I reference it on another onject it does nothing. Plus any videos I am finding on Youtube are for older versions and the attributes nodes have changed. Would appreciate any help from a Geo Nodes expert

Many thanks

$\endgroup$
2
  • 2
    $\begingroup$ "You" who needs more details - please add a comment describing what kind of details are you requesting. Thank you $\endgroup$
    – vklidu
    Commented May 19 at 10:19
  • $\begingroup$ 'Or' .. you could edit your post to reduce the problem to the simplest illustrative case you can think of .. a cube generated by one modifier, a plane generated by another, or something like that. That would make it ultra-clear to us which specific question you are asking. $\endgroup$
    – Robin Betts
    Commented May 20 at 6:22

3 Answers 3

1
$\begingroup$

(Using Blender 3.6.8)

The proposed approach is to use a Driver object storing an attribute based on its construction process (e.g. the walls in the question) and a Driven object recovering this attribute to control its own construction process (e.g. the grass).

Driver GeometryNodes modifier

V2 GN Walls

1. Walls are created from an outline made of connected edges, using the nodes with dark grey background.
2. Inner faces, enclosing the "Grass", are tagged using the nodes with dark red background. The approach is to raycast faces onto themself. Top, bottom and outer faces are returning no hit (for more explanations, see Can an object raycast onto itself?). As there is no need to store this information, a simple Capture Attribute node is used to trigger the raycasting.
3. Edges at "ground" level enclosing the "Grass" are tagged using the nodes with dark green background. Such an edge belongs to an inner face (the previously captured attribute is transferred automatically from Face domain to Edge domain here) And its Z coordinate is close to 0. The resulting boolean is cached (i.e. it can be used elsewhere) using a Store Named Attribute node.

Driven GeometryNodes modifier

V2 GN Grass

1. Grass is created as a triangulated surface, using a classical Mesh to Curve and Fill Curve nodes sequence.
2. The object (i.e. the walls here) from which is recovered the grass outline is specified through the Group Input node.
3. This object Geometry (i.e. a data structure with all its characteristics, including attributes) is recovered using an Object Info node.
4. Only the edges tagged as "ground" previously are kept using a Separate Geometry node set in Edge domain. The attribute value is recovered with a Named Attribute node.

Resources:

$\endgroup$
2
  • $\begingroup$ Many thanks for the reply. Will try this approach and optimise. I got it working with using a different method but always worth looking into what is less calculation $\endgroup$
    – Ectomia
    Commented May 20 at 11:02
  • $\begingroup$ You are welcome. May I recommend to apply this : What should I do when someone answers my question? $\endgroup$ Commented May 20 at 12:04
0
$\begingroup$

Speaking about transferring position Attribute from one object to another ...

enter image description here enter image description here

enter image description here enter image description here

$\endgroup$
0
0
$\begingroup$

Managed to get it working by referencing another mesh. May not be optimal but did the job I wanted.

Have attached screenshot of my result if anyone wants to try and use

enter image description here enter image description here

$\endgroup$

You must log in to answer this question.

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