Jump to content

Looking for slight random variation in scale, pos, rot


lacer8

Recommended Posts

Hello and thank you for your time. 

This is my first post here. Not only am i new to the site, but also Houdini - having only been poking around a month or so. 

So, here's my problem, I'm feeding an edge wear graph that I'm working on, an imported mesh. The mesh is for a modular wall kit. The mesh is broken up into watertight bricks. I run the edge wear on this mesh within a foreach connected loop. What I really want to do is achieve a more natural and worn old rock wall look. To do that, I'd like to introduce small amounts of randomness to scale, rotation, and position. However, since the bricks aren't copied to points, I'm struggling to get anything to work. In fact, I can't get it to work within the loop or pulled out on it's own. Hopefully the issue makes sense. This has to be a trivial thing, but all the tutorials i'm finding are for using point attributes and vops... and when I do that, I'm unable to group the points within each connected mesh. In general, i want these to stay rectangular. 

Thanks again for your help. 

randomized_pos_scale_rot.jpg

Link to comment
Share on other sites

Hmm. I'm getting closer, but the way I'm currently doing it isn't actually doing a random but mulitplying by a float... so the pillar constantly rotates one direction, and constantly moves in one diagonal direction. The code in the boxes is: 
Translate: detail("../foreach_begin4_metadata1/", "iteration",0) * ch("../controller/randPos")

Rotate: detail("../foreach_begin4_metadata1/", "iteration",0) * ch("../controller/randRot")

Scale: detail("../foreach_begin4_metadata1/", "iteration",0) * ch("../controller/randScale") +1

I added the plus one to scale because it was getting some very small results too. So I need to figure out how to slot rand in here with a range instead for all these functions. 

 

 

randomized_pos_scale_rot2.jpg

Link to comment
Share on other sites

Ok, I think I've got it for rotation... Seems to be working with this expression in transform node's rotate X field: 

rand(detail("../foreach_begin4_metadata1/", "iteration",0)) * (2 * (ch("../controller/randRot"))) - (ch("../controller/randRot"))

So, I just need to extrapolate that out to other fields. 

I guess I just needed to talk to myself some. Thanks for listening! ;)

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