Jump to content

How do I randomise scale on copies


nisachar

Recommended Posts

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
  • Like 1
Link to comment
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
Link to comment
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
  • Like 1
Link to comment
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

Link to comment
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.

Link to comment
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..

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