Found 93 posts.
Search results Show results as topic list.
Technical Discussion » Why won't this ramp parameter work?
- KMcNamara
- 228 posts
- Offline
Technical Discussion » Python: evalute point attribute given a uv coordinate
- KMcNamara
- 228 posts
- Offline
Edit: These are the closest I could find, but I see what you mean.
surface: attribValueAt [sidefx.com]
face: attribValueAt [sidefx.com]
VEX and Expressions have primUV() so you might want to consider those languages if possible.
But I agree that HOM is still in a pretty early state! Fingers crossed that they will implement more functions soon
surface: attribValueAt [sidefx.com]
face: attribValueAt [sidefx.com]
VEX and Expressions have primUV() so you might want to consider those languages if possible.
But I agree that HOM is still in a pretty early state! Fingers crossed that they will implement more functions soon
Technical Discussion » Why won't this ramp parameter work?
- KMcNamara
- 228 posts
- Offline
Thanks for the reply - Did the strip render blue and white for you? No matter how I change the ramp it always renders with an even white to black gradient.
Technical Discussion » Get Avarage Color Value of a Group
- KMcNamara
- 228 posts
- Offline
You could use an AttribPromote node. Set ‘Original Name’ to the attribute that you want to take the average of, ‘Original Class’ to ‘Primitive’, and ‘New Class’ to ‘Detail’. I would also check ‘Change New Name’ and put something like ‘AverageColor’ and then also uncheck ‘Delete Original’ unless you want to delete the color. Leave ‘Promotion Method’ to ‘Average’. You will then have ‘AverageColor’ as a detail attribute and it will be the average of all the prims' colors.
If you want to average just a specific group, I would isolate the group with a blast node and ‘Delete Non Selected’ checked, do the average, and then merge that result with the result of a blast node with ‘Delete Non Selected’ unchecked. Make sense?
Hope that helps.
If you want to average just a specific group, I would isolate the group with a blast node and ‘Delete Non Selected’ checked, do the average, and then merge that result with the result of a blast node with ‘Delete Non Selected’ unchecked. Make sense?
Hope that helps.
Technical Discussion » Why won't this ramp parameter work?
- KMcNamara
- 228 posts
- Offline
I have a VEX shading network that is supposed to read in a point attribute from geometry. I then use that attribute to drive a color ramp. However, the ramp doesn't seem to work. Anyone know what I'm doing wrong?
Technical Discussion » findClosestPoint not implemented
- KMcNamara
- 228 posts
- Offline
Technical Discussion » findClosestPoint not implemented
- KMcNamara
- 228 posts
- Offline
Thanks for the reply! Unfortunately I am trying to implement non-uniform Poisson sampling and I don't know the locations until I'm actually generating them from within Python, so I can't store closest points beforehand. Further, each new point that I generate depends on the previous point's closest point, so I need to get able to get the closest point during run time of the python code.
The reason I need this is because I have to create noise on a grid beforehand and then sample that grid for its noise values. (I have to do this because most of the noise functions are also ‘not yet implemented’ in Python )
The reason I need this is because I have to create noise on a grid beforehand and then sample that grid for its noise values. (I have to do this because most of the noise functions are also ‘not yet implemented’ in Python )
Technical Discussion » findClosestPoint not implemented
- KMcNamara
- 228 posts
- Offline
Hi, I need to find the nearest point in a geometry in Python but the geo.findClosestPoint() function says ‘not yet implemented’. Is there a way around this for the time being?
Technical Discussion » vex or python - get point via point number?
- KMcNamara
- 228 posts
- Offline
Looks like this VEX node might be of some help?
http://www.sidefx.com/docs/houdini12.5/nodes/vop/findattribvalindex [sidefx.com]
http://www.sidefx.com/docs/houdini12.5/nodes/vop/findattribvalindex [sidefx.com]
Technical Discussion » Why the difference between xyzdist in VEX versus Expressions
- KMcNamara
- 228 posts
- Offline
Ah, thanks guys. Got it working with both VOPSOP and Point Wrangle. My main problem was that my mesh was storing its UVs in barycentric coordinates, so I had to convert these to the actual UV space.
For example, my point wrangle code:
vector primUV = 0;
int hitPrim = -1;
xyzdist(@OpInput2, @P, hitPrim, primUV);
vector finalUV = 0;
prim_attribute(@OpInput2, finalUV, “uv”, hitPrim, primUV, primUV);
@uv = set(finalUV);
For example, my point wrangle code:
vector primUV = 0;
int hitPrim = -1;
xyzdist(@OpInput2, @P, hitPrim, primUV);
vector finalUV = 0;
prim_attribute(@OpInput2, finalUV, “uv”, hitPrim, primUV, primUV);
@uv = set(finalUV);
Technical Discussion » helicopter orientation
- KMcNamara
- 228 posts
- Offline
Ah, I see.
You could probably do this quite easily with CHOPs using the lag node. The idea would be that you have a second particle dragging behind the first, as if being dragged on a rope. The vector between the two particles will always be the helicopter's up vector. This should capture the leaning forward as well as the tilting sideways to make a turn.
Have a look at this tutorial - should give you all of the information that you need. I can try to whip up an example later if this doesn't make sense
https://vimeo.com/6930074 [vimeo.com]
You could probably do this quite easily with CHOPs using the lag node. The idea would be that you have a second particle dragging behind the first, as if being dragged on a rope. The vector between the two particles will always be the helicopter's up vector. This should capture the leaning forward as well as the tilting sideways to make a turn.
Have a look at this tutorial - should give you all of the information that you need. I can try to whip up an example later if this doesn't make sense
https://vimeo.com/6930074 [vimeo.com]
Technical Discussion » helicopter orientation
- KMcNamara
- 228 posts
- Offline
You can't really “rotate” a point - it's just a position in space. It has no orientation.
You can, however, rotate a vector attribute that you have attached to the point. You can also rotate a sprite that you've attached to the point. Is that what you want to do?
It sounds like you already have what you need - the normal vector pointing in the direction of the velocity. That's your ‘helicopter orientation’ right there. 8)
You can, however, rotate a vector attribute that you have attached to the point. You can also rotate a sprite that you've attached to the point. Is that what you want to do?
It sounds like you already have what you need - the normal vector pointing in the direction of the velocity. That's your ‘helicopter orientation’ right there. 8)
Technical Discussion » Why the difference between xyzdist in VEX versus Expressions
- KMcNamara
- 228 posts
- Offline
Hey, thanks for the reply.
I get that VEX functions can be overloaded, but there's no version with a return_type argument, so I can't get back UV values like I can with the expression function. Why the difference?
I have a random point in space and I want to get the closest UV value from a nearby mesh. Any idea how to do that?
I get that VEX functions can be overloaded, but there's no version with a return_type argument, so I can't get back UV values like I can with the expression function. Why the difference?
I have a random point in space and I want to get the closest UV value from a nearby mesh. Any idea how to do that?
Technical Discussion » Why the difference between xyzdist in VEX versus Expressions
- KMcNamara
- 228 posts
- Offline
Does anyone know why the expression function xyzdist has a return_type argument that allows you to query UV values while the VEX equivalent does not?
I'm trying to loop through a collection of points scattered in space and get the interpolated UV value of the nearest spot on a mesh.
Thanks,
Kevin
I'm trying to loop through a collection of points scattered in space and get the interpolated UV value of the nearest spot on a mesh.
Thanks,
Kevin
Technical Discussion » Expression for number of connected inputs
- KMcNamara
- 228 posts
- Offline
Technical Discussion » Expression for number of connected inputs
- KMcNamara
- 228 posts
- Offline
Hey Graham, I tried using that earlier but got ‘Unknown Function in Expression’. Also, when I begin typing ‘opin…’ there's no auto complete for opinputs, just opinput and opinputpath, which makes me think it isn't accessible. Any idea why?
Thanks for the help
Thanks for the help
Technical Discussion » Expression for number of connected inputs
- KMcNamara
- 228 posts
- Offline
Is there an expression for getting the number of connected inputs for a given node?
For example, I want to write an expression for a switch statement so that it randomly selects one of the input nodes and I can add or remove connections without having to re-write the expression
select input: rand(seed)*numInputs
I know that opinput() can get a connection to a given input index, but I'm looking for the number of connected inputs.
Thanks!
For example, I want to write an expression for a switch statement so that it randomly selects one of the input nodes and I can add or remove connections without having to re-write the expression
select input: rand(seed)*numInputs
I know that opinput() can get a connection to a given input index, but I'm looking for the number of connected inputs.
Thanks!
Technical Discussion » Compositing - Max value over time
- KMcNamara
- 228 posts
- Offline
Technical Discussion » Compositing - Max value over time
- KMcNamara
- 228 posts
- Offline
Technical Discussion » Compositing - Max value over time
- KMcNamara
- 228 posts
- Offline
Hi, does anyone know how to take an image sequence and for each frame, set each pixel value to that pixel's max value over all of the previous frames?
For example, on frame 25 out of 50, each pixel would be set it its respective max over the range 1-25
Thanks!
For example, on frame 25 out of 50, each pixel would be set it its respective max over the range 1-25
Thanks!
-
- Quick Links