Jump to content

Flattening mesh with RaySOP


Fool

Recommended Posts

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. 



 

RAYSOP.PNG

Edited by Fool
Link to comment
Share on other sites

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 :

image.png.dfbb5d60c4298b1ff34db303ffbb5e75.png

 

Cheers,

Edited by DonRomano
syntax
  • Like 1
Link to comment
Share on other sites

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 :

image.png.dfbb5d60c4298b1ff34db303ffbb5e75.png

 

Cheers,

This worked out great for me. Thanks! :)

Link to comment
Share on other sites

  • 3 weeks later...
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 :

image.png.dfbb5d60c4298b1ff34db303ffbb5e75.png

 

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...