nisachar Posted February 14, 2017 Share Posted February 14, 2017 Hello, Trying to learn and understand Houdini's procedural modeling processes. I am trying to build a bookshelf like so Can anybody suggest a good way to randomize the scale of each copy? Ideally, no expressions if possible. Prefer to visually connect nodes in Houdini TEST 06 Book shelf.hiplc Quote Link to comment Share on other sites More sharing options...
mine Posted February 14, 2017 Share Posted February 14, 2017 (edited) Well, I don't know if this suits your need, but you can create a pscale attribute on your line. Copy sop will automatically read this pscale and resize each copy accordingly. Also you can create a scale parameter as a float 3, and scale your books only in y coord. I guess tyhis is more what you need. TEST 06 Book shelf.hiplc Edited February 14, 2017 by mine 1 Quote Link to comment Share on other sites More sharing options...
nisachar Posted February 14, 2017 Author Share Posted February 14, 2017 (edited) Ok thanks. Let me try this... Ideally, I want to use the same randomise setup to feed into the color, scale, rotation, position etc and then use a few sliders to drive variations. Edited February 14, 2017 by nisachar grammar Quote Link to comment Share on other sites More sharing options...
nisachar Posted February 14, 2017 Author Share Posted February 14, 2017 (edited) Alright. Your sample works as expected. But is there a way to do it without expressions? I managed to create somewhat similar scale randomization via an attribute randomize node. For some reason, the node works when entering pscale in the attribute name ( I suppose Houdini then knows it has to randomize the scale of the incoming points ). I didn't have to enter any expression and after fiddling with the distribution type, I found the Gaussian setting works. The issue is that it is scaling on all three axes. IS there a way to tell it to work on only the y-Axis? Without expressions? Or is there just no way around without invoking expressions? I am trying to see how much I can use Houdini without using a line of code. Here is what I was thinking in my head while trying to create the bookshelf procedurally via nodes. TEST 06 Book shelf.hiplc Edited February 14, 2017 by nisachar Quote Link to comment Share on other sites More sharing options...
bonsak Posted February 14, 2017 Share Posted February 14, 2017 (edited) You are right. You can go a long way with out using expressions. Houdini reads a set of basic attributes when using the Copy SOP, the Instance SOP and the Instance Object. Check out this link in the docs for a full list. http://www.sidefx.com/docs/houdini15.5/copy/instanceattrs And while your at it, head over to Matt Estelas indispensable site with page up and page down of Houdini stuff. Here's a link to the section on Instancing: http://www.tokeru.com/cgwiki/index.php?title=Houdini#Instance -b Edited February 14, 2017 by bonsak 1 Quote Link to comment Share on other sites More sharing options...
nisachar Posted February 14, 2017 Author Share Posted February 14, 2017 Thanks a lot, @mine and @bonsak , fellow peons higher up the hierarchy! Sucess ( kind of ) I inserted the @attributename into the Translate, rotate and scale slots and viola.. Randomness. To control the scale in just Y axis, I could have just linked the attribute in the Scale Y slot, but the step size was small enough that it didn’t matter if I copied into all three to get some more randomness. It isn’t ideal. There is some interpenetration between the copies in places. But as proof of concept, it is a start. I suppose using the @attributename function is invoking expressions and I wish there was a way to just direct ( visually ) plug the name into the transformation slots...Maybe an RFE is in order Maybe after the shelves are done etc.. Might be the next step to manually rotate each copy of the book for final tweaks. TEST 06 Book shelf.hiplc Quote Link to comment Share on other sites More sharing options...
ThomasPara Posted February 14, 2017 Share Posted February 14, 2017 You can create the vector attribute scale instead of pscale. Copy and instance reads this variable. So if you want random "y" you can use scale.y. If you want to do this with nodes, use a pointvop and use ex a turbnoise driven by position or pointnumber (you can use random, but it gets uniform). Then plug that into a bind node where you have scale as output. Quote Link to comment Share on other sites More sharing options...
nisachar Posted February 15, 2017 Author Share Posted February 15, 2017 10 hours ago, ThomasPara said: You can create the vector attribute scale instead of pscale. Copy and instance reads this variable. So if you want random "y" you can use scale.y. If you want to do this with nodes, use a pointvop and use ex a turbnoise driven by position or pointnumber (you can use random, but it gets uniform). Then plug that into a bind node where you have scale as output. Hello, Can you explain a bit more ? Here is how I undertand your suggestions. 1 : Make an attribute create node, choose the variable type as vector ( to be able to connect to all three axes ), then in the copy sop scale slots, insert scale.y in the y slot ? Or 2: Create a point vop node, connect the line sop to it, go inside the pointvop node, create a turbulence noise node, plug the output into a bind node. But I can't see any scale in the bind node, nor do i see any scale slot in the geometry output node. Sorry if it sounds noobish in the Houdini land, its just I am having a bit of a hard time trying to connect nodes to drive other nodes. I dont know where to look.. Quote Link to comment Share on other sites More sharing options...
ThomasPara Posted February 15, 2017 Share Posted February 15, 2017 (edited) I can give you an example Its the most basic i can make it, add fitrange to adjust min and max. On the random you can use the bias node. ShelfBasic_01.hip Edited February 15, 2017 by ThomasPara Quote Link to comment Share on other sites More sharing options...
nisachar Posted February 16, 2017 Author Share Posted February 16, 2017 @ThomasPara Thanks, Man. I get it now. I guess the missing step was converting to vector node... I wish Houdini would do that automatically like ICE Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.