lacer8 Posted August 6, 2020 Share Posted August 6, 2020 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. Quote Link to comment Share on other sites More sharing options...
lacer8 Posted August 7, 2020 Author Share Posted August 7, 2020 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. Quote Link to comment Share on other sites More sharing options...
lacer8 Posted August 7, 2020 Author Share Posted August 7, 2020 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! Quote Link to comment Share on other sites More sharing options...
DonRomano Posted August 7, 2020 Share Posted August 7, 2020 You can also use the fit01() function to add more control over your randomness : fit01(rand(detail("../foreach_begin_metadata1", "iteration", 0) + ch("seed")), ch("min_value"), ch("max_value")) Quote Link to comment Share on other sites More sharing options...
lacer8 Posted August 7, 2020 Author Share Posted August 7, 2020 Thanks Don. Cool suggestion. I don't know if I need that much control at this point, but if I want to individually limit the min and max, I'll return to this! 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.