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
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?
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…
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).
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
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 but this proposal has been rejected
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 ?
If we could feed a distance attribute to the min distance input
we could have a variable density delaunay triangulation (poison disk == delaunay afaik)
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