clip plane

   5326   10   2
User Avatar
Member
64 posts
Joined: July 2005
Offline
does anyone know how to make clip plane edge look random so it doesnt build surface in a straight line but in a nisy face edge
User Avatar
Staff
2540 posts
Joined: July 2005
Offline
One way is to follow the clip with a Group SOP set to bounding box., set geometry type to points then follow with a Point SOP to randomize the point positions in your axis of choice.


Group SOP should be set to bounding box selection (don't forget to turn off the default Number>Enable option). Set the bounding box center to be the center of your clip SOP's center parms (do a channel reference if you want this to be live). It is a nice exercise to see how to make the clip SOP drive the Group SOP's bounding box dynamically using channel references.

As for the Point SOP, you can jitter the positions for the points isolated by the previous Group SOP in either X, Y or Z with a real simple rand( seed ) random function like this (make sure to select the point group to work on):


$TX + fit01( rand( $PT + 1.001 ), -1, 1 ) * 0.1
$TY + fit01( rand( $PT + 10.001 ), -1, 1 ) * 0.1
$TZ + fit01( rand( $PT + 100.001 ), -1, 1 ) * 0.1


where the fit01(expression, -1, 1) takes the rand() function which returns 0-1 values and re-maps so that the values go from -1 to 1. I then multiply by 0.1 which is the gain. Adjust to suit.
The 1.001, 10.001 and 100.001 are just offset seed values. These ensure that the random function returns different random values for each point number $PT input in to the random function.

You could make a nice HDA (Houdini Digital Asset) for this.
There's at least one school like the old school!
User Avatar
Staff
2540 posts
Joined: July 2005
Offline
O.K. It isn't as easy as I said. For basic clips along the three cardinal axes, it is a trivial solution. For arbitrary clip angles, it get's tricky as you need to know vector math and delve in to matricies a bit to get the right noise controls.

Given that, I have built an asset called clip_rand_edge that does just what you want: Randomize the clipped edge where randomness is controlled along the clip plane.

I can't attach anything in this forum so I will have this asset posted on the exchange, hopefully very soon.

If you want an early release, give me an e-mail or I will post it on od-force.


-jeff
There's at least one school like the old school!
User Avatar
Member
2199 posts
Joined: July 2005
Online
Another way would be to make two wiggly lines with the curve sop, skin them together, intersect it with your geometry and then use this as the second input to the cookie sop.
The trick is finding just the right hammer for every screw
User Avatar
Member
64 posts
Joined: July 2005
Offline
thank you for replys,
man with such a support and community there is no reason not to learn houdini!!!
regards zoki
User Avatar
Staff
2540 posts
Joined: July 2005
Offline
O.K. I got my version of the clip noisey edge up on the exchange. It is all documented. The nodes inside are also fully commented.

It turned out to be a bit tricky to align a bounding box to the Clip SOP's directoin vector and orientation. I also made the final noise amount in the space of the clip plane. Dialing out X and Y only leaves displacments normal to the clipping plane. Nice for giving a random edge that maintains the silouette of the incoming geometry pretty well.

I have already used it to put a slightly noisy edge to a cut to simulate a broken edge. Not too bad.
There's at least one school like the old school!
User Avatar
Member
2199 posts
Joined: July 2005
Online
Hey Jeff, check out my clip from grid sop, it has all the math in there to align the clip plane to a piece of geometry.
The trick is finding just the right hammer for every screw
User Avatar
Member
64 posts
Joined: July 2005
Offline
this is awesome tool jeff
but i would like my models to build on their face topology not to distort them, not in this case
and one more question once asset is made like yours can anybody change networks and reconect them with other sops?
how can you edit dig.asett and make new ones from it?
User Avatar
Staff
2540 posts
Joined: July 2005
Offline
Hey Jeff, check out my clip from grid sop, it has all the math in there to align the clip plane to a piece of geometry.
Just took a look at it. Sorry for not doing this much sooner. Yes I see how you remade the clip. Very nice and elegant use of the normal() expression. I like it alot.
Do check out my solution. It is completely compatible with the clip SOP. You could do a change type on a clip to this tool as the parm names are the same. It goes the opposite way where I take a vector's orientation and map things to that.

i would like my models to build on their face topology not to distort them
Yep, you are right. I am distorting the edge points. I will see if I can add another option to actually cut the polygons around the clipping plane, thereby preserving uv's, etc. If I have time today I will take a shot at this. Siimon's technique of drawing a distorted line then cutting by that sure sounds like the way to go here.

once asset is made like yours can anybody change networks and reconect them with other sops?
You bet! Anything I do always get's changed. :cry:
In the spirit of the Exchange, please upload any assets that you downloaded and subsequently modified though. Add changes to the help and comment the ndoes that you changed. That way, everyone can see the modifications. If the modifications are extensive, then submit a new asset to the exchange with a new name.

how can you edit dig.asett and make new ones from it?
The easiest way is to use the RightMouseButton on the asset node icon and open the Operator Type Manager. The node in question should currently be highlighted. RightMouseButton on the name and select copy. Now type in the new name for your HDA and the new name for the otl library file you want to save it to. I alwyas name my otl file the same name as the HDA.
There's at least one school like the old school!
User Avatar
Member
64 posts
Joined: July 2005
Offline
thanks jeff
it's not that I want to change it in general, its just I thought in vop noisey to change noisey to other types of noises or even paterns?!
you see since i am primarily artist-painter I just focus on the visual effect of what I want, how it will look in the shot etc.
but since I am very new to houdini I ofcourse have difficulties getting there, i work in maya for 8 years
and cant exploit everything houdini offers me yet………someday :shock: hopefuly
regards zoki
User Avatar
Staff
2540 posts
Joined: July 2005
Offline
I understand.

VOPs and Houdini in general require you to work with the nodes directly at some point in time.

Given that, the VOP network that is adding the noise can actually work with any pattern available in VOPs. Just add the pattern VOP of your choice and wire it in place of the anti-aliased nosie VOP I put in there.
There's at least one school like the old school!
  • Quick Links