Jump to content

Book Generator - help with books leaning onto each other


trx

Recommended Posts

Hi, 

I am trying to build a book generator where I can have multiple books leaning at an angle onto each other, the problem is I am not able to figure out a way to have the books touching, without using RBD or any simulation. 

I have tried projecting a point at the top corner while also having the pivot there, then trying to project via a ray and have it on the previous book iteration but I can't get it working.

I am a beginer at Houdini so I don't know VEX and am struggling with it since I tried looking at an attribute wrangler as well.

Does anybody have an idea on how I could have each book touching the previous one perpedincularii based on the top pivot?

Many thanks

image.png.21f5f22801adad5243ff70778f090709.pngimage.thumb.png.b8471a0d0932aff9ad9fda23b2730d69.png

BooksGenerator.hip

Link to comment
Share on other sites

  • 3 weeks later...

If you're still looking for a solution, I can post something;

Click the Like reaction on this message

It's actually quite simple, but you have to be proficient in For loop with feedback SOP

None of the distribute / align tools that ship with Houdini compute the collisions on the full geometry, AFAIK,  you have to do it yourself with rays; there are a few different cases to test though, depending on how complex you want you book stack.

Link to comment
Share on other sites

On 1/2/2026 at 11:38 PM, konstantin magnus said:

The UV layout-node lines up the books. Just disable the axis alignment and pack into UDIM tiles.

houd_books_title.thumb.jpg.793e522070cba83ee7e9e68767806e81.jpg

book_shelf.hip 568.09 kB · 8 downloads

books_shelf_3d_od.hip 596.18 kB · 6 downloads

This is the Feedback loop I was talking about:

If you sort the prims by increasing rotate attribute, you can pack them tight against each others like this, by repeatedly Ray SOP'ing the latest prims against the prims already in place, and translating by the minimal distance 

This is an approximation to keep the Feedback look simple, there are a few intersections, but it's acceptable. If you want to pack exactly, you would have to ray SOP the points of the prims that are already in place against the candidate primitive, and handle the possible problematic cases, which I'm sure exist 

If the candidate book is taller than the rightmost book that's already in place, it will not lean against the top right corner of the rightmost book,there is some slight collision. If the book is shorter however, this is always exact.

 

loop.png

book_shelf.hipnc

Edited by AntoineSfx
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...