Geometry Nodes

Hi all
Are there news/plans for Cycles/eevee supporting instance attributes?
A very useful feature in houdini, to change for example the color of specific instances. Couldn’t live w/o it!

in bpy you can check what we call “depsgraph” layers, it represents a world where everything is “applied” let say. And in this case it can be used to find information about geometry node instances


def fill_instance_data(geonode_obj, dic={}):
    """fill dic w info about geonode instances"""

    d = bpy.context.evaluated_depsgraph_get()
    instances = []
    for i in d.object_instances:
        if(i.is_instance):
            if(i.parent.original==geonode_obj):
                instances.append((i.object.original, i.matrix_world.copy()))

    dic[geonode_obj.name] = {}
    for i, v in enumerate(instances):
        b, m = v
        l, r, s = m.decompose()
        e = r.to_euler('XYZ', )
        dic[geonode_obj.name][str(i)]= {
            "instance name":b.name,
            "location":tuple(l),
            "rotation_euler":tuple(e[:]),
            "scale":tuple(s),
            }
    
    return None

then you could simply re-create new instance from this information in your scene

3 Likes

Could you turn this into a tool to convert any object with GN instances for the next version of Scatter?

edit*
i’m reaching the devs to see how we could implement a bpy operator for this purpose in main blender. This is typically the kind of thing where plugins shouldn’t be needed IMO
Did you check if the native “apply” behavior is not a bug?

Yeah, it’s a bug ⚓ T93903 Make Instances Real doesn't work for geometry instances
And reported quite a long time ago so it seems that native solution can’t be implemented easily.

I haven’t really kept up, any news relative to sampling nearest point on a curve?

Is there a way to recalculate the face orientation (normals) of an object so they all face outwards?

I basically want to select the faces that are flipped (red color)so I can add them to the selection of the flip faces node in geometry node.

so that at the end I can achieve the same result of using bpy.ops.mesh.normals_make_consistent

with raycast like that maybe

that is better

scale element might also work but in my case this setup doesn’t work

I m trying to create a procedural bevel after boolean and because I m extruding a curve generated from the intersection between 2 object the curve change direction every time I move one of the objects so I m try to fix this by flipping the polygons. Here is the scene…

Blender Scene

Hello
I’d like to do a very simple task in geometry node and it seems that it is not currently possible to achieve this easily.

This is my forest
There are dense and low density area

I would like to scatter a layer of lower vegetation only on the dense areas,
how can i do that fast ?

You can’t i asked the devs last time, told me that we need some kind of low level way to calculate a heatmap

see this stack exchange for a better understanding of such “heatmap”

I suggested to add a heatmap option in the proximity output

nice set up, yes weird, normals are not stable, don’t know how to solve that.

Try this approach:

  1. turn all instances into points
  2. calculate geometry proximity from those points onto the land
  3. use the result as a density field for secondary scatter
  4. PROFIT

=)

1 Like

Can’t you base the low vegetation on the inverse of the map you used to generate the trees?

Hi,

Looks like its possible, but it’s not a good solution.
(I’m not sure in which cases this might be really useful)

Your forest :

Result :

  1. Create a 3dgrid based on the bounding box

  1. Use proximity to wrap the grid then merge points by distance.

  1. Split edges > Convert to curve > Capture Spline Length > Transfer the length to use as a factor for your new vegetation layer. (Long Splines = Low density, Short Splines = High density).


The cool part is that you calculate the distance between points and not between your instances and the closest point. This can be used to influence instance rot/scale (among other things).

2 Likes

Ha!
Make me think of the trick I used to convert points to edges

Thanks for your input
The problem is that merge is too slow when dealing with a ton of point :frowning:

I think a « point density to volume » node followed by a « sample volume attribute » would be a potential fast implementation elegantly solving this problem.
Alternatively some kind of distance mode from the proximity node output :thinking: but this proposal has been rejected

Cheers

Agree.

Couldn’t the “Distribute Point on Faces” node in Poisson Disk mode give the distance between the points in Output ? At a given time, it calculates it, right ?

At least it is fun :slight_smile:

4 Likes

I dream of the opposite,

If we could feed a distance attribute to the min distance input
we could have a variable density delaunay triangulation (poison disk == delaunay afaik)

on a re-mesh, “adaptative delaunay” looks like this
It’s a remesh on steroid, because there are much more controls

Capture d’écran 2022-10-11 133449
source

H has this option for both the Scatter & Remesh
it’s extremely powerful

11 Likes

Delaunay topology is asked such a long time by a lot of people… is a BADASS GOOD Triangulation level such a long time we waiting to blender integrate it :confused:

5 Likes

I think i could resolve the issue if i had a node that could intersect field to gether
like value in field

Check if one or many values are in a field or not