Fool Posted August 22, 2020 Share Posted August 22, 2020 (edited) Hey Odforce, first time poster here. I am having a difficult time flattening my polygonal mesh to a flat surface using the ray sop. My goal is to have a flat mesh having the same shape my mesh had previous to the ray sop, but everything i can handle to create is this "squeezed" mesh as seen on the screenshot. I tried using the Project geometry node but couldnt get it to work either. Edited August 22, 2020 by Fool Quote Link to comment Share on other sites More sharing options...
AntoineSfx Posted August 26, 2020 Share Posted August 26, 2020 Not sure what your problem is, but you can try setting Scale in Ray SOP to .999 to make sure the primitives from one side don't end up in the same plane (i.e. sharing the Y coordinate) as the primitives from the other side in the case you're projecting on a plane. See https://en.wikipedia.org/wiki/Z-fighting Quote Link to comment Share on other sites More sharing options...
DonRomano Posted August 27, 2020 Share Posted August 27, 2020 (edited) You can wrangle this also, should be easier to set up : vector min_p = detail(0, "P"); //if you want a certain threshold to control the point depending on its y position //if (@P.y > min_p.y + ch("threshold")) @P.y = min__p.y; @P.y = min_p.y; With an attrib promote before the wrangle set up like this : Cheers, Edited September 14, 2020 by DonRomano syntax 1 Quote Link to comment Share on other sites More sharing options...
Fool Posted August 28, 2020 Author Share Posted August 28, 2020 On 27.8.2020 at 11:20 AM, DonRomano said: You can wrangle this also, should be easier to set up : float min_p = detail(0, "P"); //if you want a certain threshold to control the point depending on its y position //if (@P.y > min_p.y + ch("threshold")) @P.y = min__p.y; @P.y = min_p.y; With an attrib promote before the wrangle set up like this : Cheers, This worked out great for me. Thanks! Quote Link to comment Share on other sites More sharing options...
AntoineSfx Posted September 14, 2020 Share Posted September 14, 2020 On 8/27/2020 at 11:20 AM, DonRomano said: You can wrangle this also, should be easier to set up : float min_p = detail(0, "P"); //if you want a certain threshold to control the point depending on its y position //if (@P.y > min_p.y + ch("threshold")) @P.y = min__p.y; @P.y = min_p.y; With an attrib promote before the wrangle set up like this : Cheers, No. You're assigning a point to a float. Also , promoting a 3 component vector attribute to its minimum doesn't seem like a good idea. Will it find the minimum value using a lexicographic comparison over R^3, or will it do it independently over each component ? The documentation is not clear about it Quote Link to comment Share on other sites More sharing options...
DonRomano Posted September 14, 2020 Share Posted September 14, 2020 6 hours ago, AntoineSfx said: No. You're assigning a point to a float. Also , promoting a 3 component vector attribute to its minimum doesn't seem like a good idea. Will it find the minimum value using a lexicographic comparison over R^3, or will it do it independently over each component ? The documentation is not clear about it Yes, it was a syntax mistake. The minimum find algorithm looks for the minimum for each component, at least with my tests it's what it's doing. He said it was working fine, so I don't understand why you're digging old post to point out a syntax error 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.