1

I've a question based on this thread: Geometry Nodes: How to scale and rotate instances based on segment length

I would like to do the same like in the mentioned thread, but instead of just scaling a single object. I would like to distribute and scale the collection content. I know how to distribute the collection content and know how to rotate it into the right direction to get this kind of fence. But I get crazy since hours because I don't know how to scale the individual objects inside my collection to get a nice result.

Here's a prepared file with a collection:

This is the current status. I would like to replace all the objects in the fence with the content of the collection. My problem are the different scales of the fence parts.

enter image description here

Christoph Werner
  • 1,965
  • 1
  • 14
  • 31

1 Answers1

2

You have already calculated the length of the individual segments correctly.
Answered here: How to scale and rotate instances based on segment length?

Also, in this context, we already had the question of how to find out the length of an object within a collection.
Answered here: How to get a field with individual object sizes inside a collection?

This question is primarily about how these individual mechanisms can be combined into one, and you can solve this as follows:

enter image description here enter image description here

Here, I first capture an integer value at each of the points where objects are to be instantiated. This is important because we need exactly the same value when instantiating to be able to read the corresponding object and its dimensions from the collection.

You can also use any other values here, so it doesn't have to happen via the Random Value node. If the node Instance on Points receives no input as Instance Index, the instances are simply numbered (i.e.: $0,1,2,0,1,2,...$), which is why you can actually also use this number sequence to query the dimensions of the individual instances (Tip: Math Node Modulo).

To calculate the dimensions, I use in this example as I said the answer from your previous question, which looks (slightly modified) like this here:

enter image description here

You can of course evaluate the lengths of the other axes in a similar way. The details of this have been discussed in detail in here.

This length can now be transferred comfortably with exactly this previously created integer value during instantiation.


(Blender 3.1+)

quellenform
  • 35,177
  • 10
  • 50
  • 133