Jump to content

Extracting Points based on $TY from Mountain

Recommended Posts

Hello! Everyone is doing good and not losing too much hair using Houdini :)

Here is the problem,and it's a block in the road for me.

I can extract points from a grid sop using add & line node's. Then I can apply color to these points via a color node, them pipe

this into an attribtransfer node, with the grid sop on the first input. And as you will see, these points that were extracts will be colored (let us use white) and the grid color will be blue (coming from the color node on the grid side input). No I animate the extracted points, then we see this white soft dot or line animate across the grid. Okay great, so what... well the problem is, how do you extract points from a grid sop (that is piped in a moutain sop) based on $TY (height value of the point in 3D space) without collecting all the points in the grid (like a group would with an expression). Sure a group works, but it has all the other points in there also. And if I animate the Cd via channel to a chopnet, it moves all the points, unlike using add or line, which will only move the extracted points because that's all I'm feeding into that side. If i use an attribute, then pipe the attribute to the group, then use an expression ($HEIGHT > .5), then apply a point node to color all points that have a height > .5 white, the problem is, is in that group, the rest of the points that aren't > .5 will still be animated in that channel... so the whole top of the surface moves, and not just the extrated points. Hope you understand why I'm trying to say.

As a consequence, if I apply a delay in the chopnet, pump in Cg via channel .. then watch the animation... the whole surface is black.. then the blue and white come in ... however, if i use add or line ( which EXTRACTS NOT GROUPS) points and use the attribtransfer, then the chop only animates EXTRACTed points (not a group) and you see a blue surface all the time, and the delayed white shaded points come in.. kinda like an overylay.. but the extracted point color is the only one animated, not all the points which in turn would animate all the points... HELP! :)

Edited by remlorestudios
Link to comment
Share on other sites

You can perform operations based just on your group in question. For example, delete or blast them or their inverses away.

The Macha Houdini Training Kit ;)

Let's start with problem A then move on... :)

Okay Macha (and i really appreciate the help that you have been giving), try this and see what you come up with. Create a gridsop, and create an add node. Then, create a transform node, color node and attribtransfer node(easy example setup...). Okay on input1 of the attribtranfer node, pipe in the gridsop. On input 2, pipe in the Addnode>transform>color. In the Add node, extract 1 point (0,0,0). In the transform node, translate that point 1 on Y axis (so now you have this one extracted point hovering above the grid). Okay, now chose a color (red is good) in the color node for the Cd attribute. So now you're transfering the point Cd to the gridsop. Adjust the attribtransfer conditions distance threshold so it makes a red square thing in the center of the grid. Uhhhhhhhh... now place a material node (set to primitive) between the grid and attribute transfer. Apply a material in the material node, (i used checker).

Now you should see a red mark on the center of the grid with the checker material... Okay.. Problem is, we are shading points via color on the right side, and the left, we're shading primitives. Now what I want to do first (before we get into the $TY extract and all that animated chop channels) is make that red color opaque over the checker material, because now it looks like it was multiplied on. I would think you apply a shader to the points on the grid, but that didn't work. It did mention something about instanced points though... As you would guess, make the grid a liquid material, and the Add Cd white... so it's opaque over the liquid. This would be the start of the foam, you'll see why i'm doing this when we get this down and get into chops and some coding. :)

Link to comment
Share on other sites

I'm having some trouble filtering the essential question out of your post, but seeing that you start with a verbal description of a network, I think it would be best if you post a file of it and then I can see what we can do.

Link to comment
Share on other sites

I figured it out... but one thing leads to another :) I'm having a little problem with this.

How can I base transparency on height ? I'm using normals based on Y component vector of the points on the grid... it works great with a ramp ... but now, i want to make the crests somewhat transparent...

I was playing the the opacity values, pluging in the normals to that (that are at different lengths based on height, so the higher crests have color and the valleys are black.. works with a ramp no problem) How can we get this effect? I didn't normalize the normals with the ramp and it worked well...

Link to comment
Share on other sites

Use $BBY instead. That will always be in the 0..1 range. With a ramp you can modify your transparency as you wish. There's also some useful attributes by the HOT nodes that can help you to be even more specific.

Edited by Macha
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.

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