Mesh Thickness in VEX with intersec(), improving my code

   3087   4   0
User Avatar
Member
255 posts
Joined: 9月 2012
Offline
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]
Vincent Thomas   (VFX and Art since 1998)
Senior Env and Lighting  artist & Houdini generalist & Creative Concepts
http://fr.linkedin.com/in/vincentthomas [fr.linkedin.com]
User Avatar
Member
255 posts
Joined: 9月 2012
Offline
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]
Edited by vinyvince - 2020年8月3日 18:08:36
Vincent Thomas   (VFX and Art since 1998)
Senior Env and Lighting  artist & Houdini generalist & Creative Concepts
http://fr.linkedin.com/in/vincentthomas [fr.linkedin.com]
User Avatar
Member
51 posts
Joined: 7月 2013
Online
what a tease! was just looking for some thickness mapping solutions!
https://tekano.artstation.com/ [tekano.artstation.com]
User Avatar
Member
856 posts
Joined: 10月 2008
Offline
Use a vdb?
--
Jobless
User Avatar
Member
89 posts
Joined: 1月 2015
Offline
Hello,
There is a new calculate_thickness in the SideFxLabs (release 18.5.624)
Gameloft
  • Quick Links