Hey everyone,
This question has been one I have had for quite a while, but never found an answer. Does anyone have any suggestions on how to create something like the attached image?
Basically, point cloud functions take a radius, but this refers to the geometry sampling the point cloud. How would one sample different points in a point cloud and create the appearance that those points had different radii?
I am familiar with using point cloud vops, just can't get this result.
If the smooth interpolation is causing issues, then don't get stuck on that, I can refine from a basic 0/1 result.
Thanks so much for any help
Variable Radius with Point Cloud functions
3181 7 1- animatedfox
- Member
- 4 posts
- Joined: June 2010
- Offline
- jlait
- Staff
- 6209 posts
- Joined: July 2005
- Offline
pcfind_radius() in VEX, “Point Cloud Find Radius” in VOPs. You can set your search radius to 0.0, relying on the pscale of the target cloud.
Then, after finding the points, use the point() VEX function or Import Point Attribute VOP to fetch the pscale of the point. Then it is a simple matter of taking your distance to the point and scaling by the pscale.
Then, after finding the points, use the point() VEX function or Import Point Attribute VOP to fetch the pscale of the point. Then it is a simple matter of taking your distance to the point and scaling by the pscale.
- animatedfox
- Member
- 4 posts
- Joined: June 2010
- Offline
- animatrix_
- Member
- 4517 posts
- Joined: Feb. 2012
- Offline
Is this the right approach?
int pts = pcfind_radius ( 1, “P”, “pscale”, 1, @P, 0, 1 );
vector newcolor = 0;
foreach ( int pt; pts )
{
vector color = point ( 1, “Cd”, pt );
float pscale = point ( 1, “pscale”, pt );
vector p = point ( 1, “P”, pt );
float dist = distance ( @P, p );
float s = fit ( dist, 0, pscale, 1, 0 );
newcolor += color * s;
}
@Cd = newcolor;
I am getting artifacts between areas of small and large pscales:
int pts = pcfind_radius ( 1, “P”, “pscale”, 1, @P, 0, 1 );
vector newcolor = 0;
foreach ( int pt; pts )
{
vector color = point ( 1, “Cd”, pt );
float pscale = point ( 1, “pscale”, pt );
vector p = point ( 1, “P”, pt );
float dist = distance ( @P, p );
float s = fit ( dist, 0, pscale, 1, 0 );
newcolor += color * s;
}
@Cd = newcolor;
I am getting artifacts between areas of small and large pscales:
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]
youtube.com/@pragmaticvfx | patreon.com/animatrix | animatrix2k7.gumroad.com
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]
youtube.com/@pragmaticvfx | patreon.com/animatrix | animatrix2k7.gumroad.com
- animatedfox
- Member
- 4 posts
- Joined: June 2010
- Offline
- animatrix_
- Member
- 4517 posts
- Joined: Feb. 2012
- Offline
Yeah higher values for max points works better but AttribTransfer doesn't seem to have this issue when the Max Sample Count is set to 1.
I faked the variable radius for that by moving the points above the grid by pscale.
I faked the variable radius for that by moving the points above the grid by pscale.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]
youtube.com/@pragmaticvfx | patreon.com/animatrix | animatrix2k7.gumroad.com
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]
youtube.com/@pragmaticvfx | patreon.com/animatrix | animatrix2k7.gumroad.com
- animatedfox
- Member
- 4 posts
- Joined: June 2010
- Offline
- animatrix_
- Member
- 4517 posts
- Joined: Feb. 2012
- Offline
No I used it for comparison. I want to have a custom VEX implementation as this trick will be hard to do with non-flat surfaces and I have a few other features that are not available in AttribTransfer.
I will investigate more as time permits.
I will investigate more as time permits.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]
youtube.com/@pragmaticvfx | patreon.com/animatrix | animatrix2k7.gumroad.com
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]
youtube.com/@pragmaticvfx | patreon.com/animatrix | animatrix2k7.gumroad.com
-
- Quick Links