Welcome to od|forum

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

nisachar

How do I randomise scale on copies

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

Share this post


Link to post
Share on other sites

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 by mine
1 person likes this

Share this post


Link to post
Share on other sites

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 by nisachar
grammar

Share this post


Link to post
Share on other sites

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

Bookshelf node concept.jpg

Edited by nisachar

Share this post


Link to post
Share on other sites

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 by bonsak
1 person likes this

Share this post


Link to post
Share on other sites

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

Bookshelf.jpg

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites
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..

Share this post


Link to post
Share on other sites

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 by ThomasPara

Share this post


Link to post
Share on other sites

@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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now