3
$\begingroup$

I've created several instances of an object on points along a mesh line (see below). I would like to disrupt the uniformity by translating the vertices at the left and right ends of each instance by a small random distance along the x-axis (the long axis). Since the edges of the object are beveled, I believe that to solution would involve location translation rather than extrusion.

enter image description here

Problems I've encountered include:

  1. Separating the geometry (Separate Geometry node) by vertex groups, manipulating sub-geometries individually, and then rejoining the geometries (Join Geometry node) held the greatest promise, but resulted in gaps and overlaps in the rejoined geometry. Join Geometry doesn't remember the object's original topology
  2. Attempting to to apply the Set Position node and selecting vertex groups using the Named Attribute node also seemed a plausible approach but presented two problems: a) the Set Position mode used in conjunction with the Random Value node applied a different (rather than single) random value to each vertex in the vertex group, and (b) applied the same exact random pattern to each objects' instance. How does one manipulate the vertices in individual vertex groups by object instance? I was hoping (unreasonably) that the random value node would (magically) behave similar to the shading Object Info node
  3. Attempting to overcome the problems with the Set Position node, I discovered that the transform geometry node does not have a selection input to control which vertex group to address.
  4. Creating collections of different sized objects and choosing from among them at random using the Collection Info node works great, but defeats the advantages of using geometry nodes
  5. Simply scaling along the x-axis using the Instance on Points node corrupts the geometry between the two end of the object

Is what I'm attempting even possible?

PS - New to this group. My 1st attempt at asking for help. Please excuse me if botched this plea for assistance

$\endgroup$
1

1 Answer 1

4
$\begingroup$

Your attempt #2 was the way to go.

Let's say you have a monkey that you want to duplicate and drop the jaws randomly. Select vertices of the jaw, assign them to the vertex group JAW, and use a setup like this:

This probably fairly resembles how far you've got. Now the problem is each vertex is moved by a random offset, but you want the offsets to be shared for each instance. So just randomize per instance, instead of per vertex:

Alternatively, you can still randomize per vertex, but make sure the input of the randomizer is the same for each vertex of the same instance:

And in this case you don't actually need to capture the instance index, because you're fine sharing the seed ("ID" is technically a part of the seed, together with the actual "Seed") just across islands:

$\endgroup$
2
  • 1
    $\begingroup$ Thank you Markus. I was able to implement without much difficulty. The only problems I encountered were (a) the random assignment of material texture orientation by object ID was ignored when I applied the geometry randomization for the first vertex group, and (b) the HSV node and UV mask were corrupted when I applied the geometry randomization for the second vertex group.These problems likely warrant a new post $\endgroup$
    – Andrew
    Commented Jun 10 at 12:52
  • $\begingroup$ Markus, I figured out the problem with HSV node and UV mask. I made false assumptions. And cockpit errors. I had created two realize instances nodes, one for each of two vertex groups. Then joined their geometries. Which resulted in two slightly difference versions of the same topology (and their materials) occupying the same space. Where they intersected the materials seemed to darken. Since the original object is symmetrical, I can get away with a single vertex group. Now to figure out why I lost material orientation randomness built into the shading node tree across the instances $\endgroup$
    – Andrew
    Commented Jun 10 at 20:20

You must log in to answer this question.

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