Search - User list
Full Version: Mesh Thickness in VEX with intersec(), improving my code
Root » Houdini Lounge » Mesh Thickness in VEX with intersec(), improving my code
vinyvince
So Far i was using this method in VEX to measure a thickness value, blur it after but as i could see some inconsistency, im looking for a more precise methods without having to do a render/baking…

Below is my actual code. Any suggestion for improvement?
Cheers

————————–

Measure Thickness

————————–

vector dir = normalize(@N) * -chf(“rayLength”);
vector hitPoint;
float hitu, hitv;

int ray = intersect(0, @P + dir*0.01, dir, hitPointt, hitu, hitv);

if(hitPt != -1)
{
f@meshThickness = distance(@P, hitPoint);
@Cd.r = f@meshThickness;
}
else
{
f@meshThickness = 0;



____________________________________________

Vincent Thomas (VFX and Art since 1998)
Senior Env and Lighting artist & Houdini generalist & Creative Concepts (Available shortly)
http://fr.linkedin.com/in/vincentthomas [fr.linkedin.com]
https://www.imdb.com/name/nm0859628/ [www.imdb.com]
vinyvince
Okay, gave a little new try to this problem tonight and i found a solution tonight with some tricks, get a really good one now
After 3 years in Houdini, really starting to have fun now



____________________________________________

Vincent Thomas (VFX and Art since 1998)
Senior Env and Lighting artist & Houdini generalist & Creative Concepts (Available shortly)
http://fr.linkedin.com/in/vincentthomas [fr.linkedin.com]
https://www.imdb.com/name/nm0859628/ [www.imdb.com]
Rob Chapman
what a tease! was just looking for some thickness mapping solutions!
Soothsayer
Use a vdb?
PaQ WaK
Hello,
There is a new calculate_thickness in the SideFxLabs (release 18.5.624)
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB