Jump to content

Procedural Library


Recommended Posts

Hi all i'm currently i've been looking at the procedural forest tutorial and while i was watching it, it gave me an idea of a little scene that i have wanted to put two of my characters in, its just a library but i wanted it to be rather large, so i was thinking that instead of using the copy function for the trees i could use it for books to make a procedural book generator. so far i haven't had too much trouble with the proof of concept that i have been playing with, i can get the books to scatter nicely in a row with random sizes and all, but where i hit the wall is that the books have a tenancy to intersect each other. I have been looking around here and in the help files and i can see that in the COPYSOP that there are local variables (XMIN, XMAX, and such) that give me the info i need so that the books won't intersect each other and just rest nicely against each other like a well populated bookshelf should, but my retarded, non procedural 3dmax brain cannot join the dots. If anyone could just nudge me in right direction, it would be a great help. I will try to post a hip as soon as i can in case all of this rambling does not make any sence.

Cheers

Paul

Link to comment
Share on other sites

The hardest part is that there are soooo many ways to go ;) .

Below it's not even the fastest I think but came to my mind first.

Assumption is that you deal with book's distribution first than create books based on distance designed before. Depending what you're trying to do this could constrain a bit. I can imagine reversed order: books with variable width and than distribution. but anyway. See example.

cheers,

sy.

PS I simplified it by computing book's distance along X. But of course you can compute it both with hscript distance() expression or hou.Vector3.distanceTo() python function which in both cases is much more flexible.

books.hipnc

Edited by SYmek
Link to comment
Share on other sites

Thanks heaps for the hip SYmek, and thanks rdg for the link, i know what i'm going to be doing tonight instead of sleeping, I did not expect this really useful help so fast. will post results, and 21 million other questions as soon as i can

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...