Hi,
I don't think xyzdist would return all of them. I haven't tested this but I suspect it returns the polygon whose normal is pointing towards the origin point.
In any case if you want to detect all overlapping polygons, you could use xyzdist first to find the nearest prim and then fire a ray in that direction using the intersect_all VEX function to find all intersected prims along that direction:
https://www.sidefx.com/docs/houdini/vex/functions/intersect_all.html [www.sidefx.com]
If the overlapping polygons all share the same points, a more robust and faster method would be to compare sorted primitive points:
https://www.sidefx.com/forum/topic/88523/?page=1#post-382336 [www.sidefx.com]
Found 1556 posts.
Search results Show results as topic list.
Technical Discussion » VEX - xyzdist on overlapping prims
- animatrix_
- 4521 posts
- Offline
Houdini Learning Materials » Houdini Shorts
- animatrix_
- 4521 posts
- Offline
Technical Discussion » it is my first question about vex
- animatrix_
- 4521 posts
- Offline
juejuezianimatrix_
Hi,
No you can't do that. If it's a verified node, you can do that using Python and APEX:
https://www.sidefx.com/docs/houdini/model/verbs.html [www.sidefx.com]
Otherwise you would have to write your own version in VEX.
Can you tell me how to get writable gdp in vex in HDK? Currently, I can only obtain const gdp. Do you have any information?
I am not sure.
raincoleanimatrix_
Hi,
No you can't do that. If it's a verified node, you can do that using Python and APEX:
https://www.sidefx.com/docs/houdini/model/verbs.html [www.sidefx.com]
Otherwise you would have to write your own version in VEX.
I'm still confused about verbs. I know how to call them in Python. But what are verbs actually? Are they defined at C++ level and compiled as native code that shipped with Houdini? Is it possible to define a verb with SOP nodes (or python, or vex?).
This page explains it a bit:
https://www.sidefx.com/docs/houdini/model/verbs.html [www.sidefx.com]
AFAIK as of now they have to be done at the HDK level. HDAs are not supported to be verbs. I believe SESI is working on that.
Technical Discussion » it is my first question about vex
- animatrix_
- 4521 posts
- Offline
Hi,
No you can't do that. If it's a verified node, you can do that using Python and APEX:
https://www.sidefx.com/docs/houdini/model/verbs.html [www.sidefx.com]
Otherwise you would have to write your own version in VEX.
No you can't do that. If it's a verified node, you can do that using Python and APEX:
https://www.sidefx.com/docs/houdini/model/verbs.html [www.sidefx.com]
Otherwise you would have to write your own version in VEX.
Houdini Indie and Apprentice » How to use distance for effect fall off ?
- animatrix_
- 4521 posts
- Offline
woltiel
General question to you guys, so i have a very bad geometry and math learning experience, is there a good resource for specifically 3D math stuff with visual examples maybe not only in Houdini, i'm noticing same functions are used also in Unreal sometimes, so can someone share a good 3D math learning resource in general this would be very helpfull.
I created a VEX course for this exact reason:
You can watch the free chapters here:
https://www.sidefx.com/learn/vex [www.sidefx.com]
Technical Discussion » @pos1 to parameter doesn't work?
- animatrix_
- 4521 posts
- Offline
-1 is for when you use spare parms so that you don't have to type which node you are referencing. If you just want to use the first input 0 is perfectly valid.
But if you need to reference the current point's attribute for each point for the Peak node, you will have to write your own peak operation in VEX.
But if you need to reference the current point's attribute for each point for the Peak node, you will have to write your own peak operation in VEX.
Houdini Indie and Apprentice » Heightfield tile split with for loop
- animatrix_
- 4521 posts
- Offline
Hi,
You can reference the for loop iteration inside the Tile Number parameter like this:
You can reference the for loop iteration inside the Tile Number parameter like this:
Houdini Indie and Apprentice » How to use distance for effect fall off ?
- animatrix_
- 4521 posts
- Offline
Hi,
You can also compute the geodesic distance (surface distance) to measure the shortest path between points which follows the natural curve of the surface rather than Euclidean distance which measures the straight line between two points:
Falloff:
Blend:
You can also compute the geodesic distance (surface distance) to measure the shortest path between points which follows the natural curve of the surface rather than Euclidean distance which measures the straight line between two points:
Falloff:
vector origin = point ( 1, "P", 0 ); vector p = minpos ( 0, origin ); int pts [ ] = pcfind ( 0, "P", p, 1000, 1 ); int ptclosest = pts [ 0 ]; float sdist = surfacedist ( 0, itoa ( ptclosest ), "P", @ptnum, -1, "surface" ); @sdist = sdist;
Blend:
vector p = point ( 1, "P", @ptnum ); float sdist = fit ( @sdist, ch("dist_min"), ch("dist_max"), 0, 1 ); sdist = chramp("dist", sdist); @sdist = sdist; @P = lerp ( @P, p, sdist );
Technical Discussion » @pos1 to parameter doesn't work?
- animatrix_
- 4521 posts
- Offline
Hi,
Yes you have to use the point expression:
https://www.sidefx.com/docs/houdini/expressions/point.html [www.sidefx.com]
Yes you have to use the point expression:
https://www.sidefx.com/docs/houdini/expressions/point.html [www.sidefx.com]
point(-1, 0, "pos1", 0)
Technical Discussion » Inserting a new point at an arbitrary ptnum
- animatrix_
- 4521 posts
- Offline
Hi,
Since it's the first point you can also create it by itself and them merge with the input geometry.
Since it's the first point you can also create it by itself and them merge with the input geometry.
Technical Discussion » read an attribute name
- animatrix_
- 4521 posts
- Offline
alexwheezy
I've never done performance tests for this, but how much slower is it?
It depends on the input geometry, i.e. number of elements but from my tests with high res geo (10M+ points), it was orders of magnitude slower because the point/prim/vertex functions are designed to look up arbitrary elements.
alexwheezy
I think few people know about this feature because few people talk about it at all in their lessons. It is easier for artists to call the appropriate function.
That's why I talk about all kinds of tricks like this in Pragmatic VEX
Technical Discussion » read an attribute name
- animatrix_
- 4521 posts
- Offline
Gerardo Castellanos
@BabaJ, ok, thanks for your answer
@ObeidaZakzak ... ohh good to know, thanks a lot!
I also recommend using the Bindings tab if you can, as using any of the point/prim/vertex functions, you will take a severe performance hit over direct attribute binding, even if you are just reading from the current element.
A lot of people in production are not aware of this.
Technical Discussion » to select only those edges that are open
- animatrix_
- 4521 posts
- Offline
Technical Discussion » Deleting first and last point over for each primitive
- animatrix_
- 4521 posts
- Offline
Technical Discussion » Volume or VDB for image processing with OpenCL?
- animatrix_
- 4521 posts
- Offline
Technical Discussion » why Some point number cannot be removed from the array
- animatrix_
- 4521 posts
- Offline
Hi,
You shouldn't modify the array you are looping over when using foreach loop. You don't have to loop over the elements like that to remove values. Just do like this:
Or loop over the elements to remove:
You shouldn't modify the array you are looping over when using foreach loop. You don't have to loop over the elements like that to remove values. Just do like this:
removevalue ( npts, 6 ); removevalue ( npts, 1 );
Or loop over the elements to remove:
int elements [ ] = { 6, 1 }; foreach ( int element; elements ) removevalue ( npts, element );
Edited by animatrix_ - April 12, 2024 11:24:47
Technical Discussion » Why is frame padding ($FN) used and not just $F in renders?
- animatrix_
- 4521 posts
- Offline
Hi,
It makes managing the files easier and some file management systems do not sort the files properly if the digits don't have padding. It also works easier in some applications that work with sequences like Nuke.
It makes managing the files easier and some file management systems do not sort the files properly if the digits don't have padding. It also works easier in some applications that work with sequences like Nuke.
Technical Discussion » How can the parameter be called in wrangler?
- animatrix_
- 4521 posts
- Offline
As BabaJ said there are a lot of differences between Hscript and VEX. For example detail VEX function can get any type of attribute but for strings you need to use the details Hscript expression.
Technical Discussion » Can use Eigen C++ library in Vex or OpenCL?
- animatrix_
- 4521 posts
- Offline
ljzmathematicsjuejueziThank you very much for your suggestion. I actually have a small problem with HDK. Every time I recompile the plug-in, I have to restart Houdini to recognize it. This is a bit annoying. Is there a way to make Houdini detect custom node updates in real time?
use eigen in vex:
HDK: Custom Vex Function [www.sidefx.com]
But it's still inconvenient
The C++ Wrangle SOP won't have this problem. It will only compile if the code is changed or it's run on a new system where it wasn't compiled before or a new version of Houdini that uses a new compiler. The same binaries will be used indefinitely.
SESI did a great job with C++ integration albeit it's not really popularized.
Technical Discussion » Can use Eigen C++ library in Vex or OpenCL?
- animatrix_
- 4521 posts
- Offline
Hi,
You can use it inside Houdini using C++ Wrangle:
This guy integrated the Eigen library also:
https://github.com/lecopivo/cpp-wrangle [github.com]
So you can try that version to access the Eigen library directly. This is the closest you can get albeit not inside VEX or OpenCL.
You can use it inside Houdini using C++ Wrangle:
This guy integrated the Eigen library also:
https://github.com/lecopivo/cpp-wrangle [github.com]
So you can try that version to access the Eigen library directly. This is the closest you can get albeit not inside VEX or OpenCL.
-
- Quick Links