Instance on points alternative

I’m working on a procedural book generator that get some parameters such as the book thickness.
I’m trying to create a generator that given a shelf length and a number creates an array of that number of random books with the shelf’s length, I made a mesh line with the shelf length and the number of books +1 points, and then randomly moved the points on the line axis except the two end points.
now I need to instance the book generator on each line in the mesh line (between every two near points, using line to points and then instance on points) and use the line’s length as the book’s thickness. my problem is that I can only set a fixed value to a parameter of the instance (in that case the book generator) and I need the thickness to change depending on the line length.
I think I know how to do that with simulation nodes but I’m trying to avoid that option, because it’s only in a branch of 3.5α. A solution will be highly appreciated, thanks!

1 Like

Well, it’s hard to give you precise solution to your problem, but I’m pretty sure it’s possible.
You need to rework your book generator and avoid to create a curve line , but rater probably instance a line into a point, or generate the book from a curve/line.
Setting a line length is quite easy, you can generate a line of size 1 and scale it to any size you want after that.

I made a book generator myself if you want to have a quick look :

It was super complicated to get that particular arrangement, but anything else was pretty straightforward.

The main takeaway is that there are many roads to a solution, but it can quickly become complex too.

Of course, using loops makes things much simpler in many cases, but it’s also generally very possible to get to a result without !

Good luck !

1 Like

Geonodes don’t have loops, therefore aside from copy-pasting the desired generator as many times as you need to, you’re pretty much stuck here. Of course you can make certain operations on curves or meshes after realizing instances, but there is no one fit all solution to that kind of problem.

I haven’t watch it fully but this tutorial by Erindale might have a solution to your problem.