BenWall Posted January 16, 2021 Share Posted January 16, 2021 Hey there, After spending a fair amount of time on SOP and VEX, I'm now learning basic volumes handling. I found a behavior I don't really understand and can't find any ressources on the subject. I created a simple setup to change the density of a scalar volume with the distance to a point. Everything works as expected, but when I move the point to a bound of the volume, the density from on side seems to be "reflected" on the other side of this volume. Looking at the screenshot, we should only get yellow values on the left (where the point is), the right side should be blue. Seems to me there are three possibilities here: - My volume wrangle might be wrong, - There is something I didn't understand about volumes, - There is something wrong with the way I setuped the volume visualization. Can someone explain what I didn't get right? Thanks strange_density.hip Quote Link to comment Share on other sites More sharing options...
Librarian Posted January 16, 2021 Share Posted January 16, 2021 Fit Function.. You have Reverse Or? Quote Link to comment Share on other sites More sharing options...
BenWall Posted January 16, 2021 Author Share Posted January 16, 2021 Not sure I understand your question. I used fit() in order to use chf("max_dist") and invert the values at the same time. Is there a better way to do this? Quote Link to comment Share on other sites More sharing options...
vicvvsh Posted January 16, 2021 Share Posted January 16, 2021 Hi, i think it's just volume visualization node's viewport visualisation imprefection. Quote Link to comment Share on other sites More sharing options...
BenWall Posted January 16, 2021 Author Share Posted January 16, 2021 Narrowing it down to avoid vex errors with a distance check, I still get the error float dist = distance(@P, point(1, 'P', 0)); float d; if(dist < chf('max_dist')){ d = fit(dist, 0, chf('max_dist'), 1, 0); d = clamp(d, 0, 1); d = chramp('gamma', d); f@density = d; }else{ f@density = 0; } Quote Link to comment Share on other sites More sharing options...
Librarian Posted January 16, 2021 Share Posted January 16, 2021 (edited) @BenWall Hm near-point-Function Maybe . strange_densityDnerpoint.hiplc Edited January 16, 2021 by Librarian Quote Link to comment Share on other sites More sharing options...
BenWall Posted January 17, 2021 Author Share Posted January 17, 2021 Seems to work like a charm with nearpoint(), thanks. Double checking by trying to get sample density on a point near the side which is not supposed to have any density, the data seem correct. I think vicvvsh is right: it's a volume visualizer error. Quote Link to comment Share on other sites More sharing options...
Librarian Posted January 17, 2021 Share Posted January 17, 2021 Seams like Error Exact Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.