Can Shapes make these type of shapes?

Avatar
  • updated
  • Answered

I'm wondering if Shapes can help me out here. I have a project where a user draws a shape/line around a map area. I need to then take that line and create a smooth convex hull shape. From that data I need to make some shapes, shape masks, and shape borders.

I've got the convex hull working and the smoothing kind of working, but I'm then having to use OpenCV for edge detection, creating fill textures and apply to materials to create the shapes and masks I need.


Is this something Shapes could do to aviod the OpenCV overhead?

Image 196

Reporting a bug? please specify Unity version:
Reporting a bug? please specify Shapes version:
Reporting a bug? please specify Render Pipeline:
Pinned replies
Avatar
Freya Holmér creator
  • Answer
  • Answered

soon, kinda, yes, but not with 100% smooth edges

you can do this with using the polygon Shape, and masking using the upcoming stencil buffer support. though, keep in mind that polygons are not infinite resolution, and you need to define those points manually, and that stenciling itself doesn't have anti-aliasing

Avatar
Freya Holmér creator
  • Answer
  • Answered

soon, kinda, yes, but not with 100% smooth edges

you can do this with using the polygon Shape, and masking using the upcoming stencil buffer support. though, keep in mind that polygons are not infinite resolution, and you need to define those points manually, and that stenciling itself doesn't have anti-aliasing

Avatar
anthony waite
Quote from Freya Holmér

soon, kinda, yes, but not with 100% smooth edges

you can do this with using the polygon Shape, and masking using the upcoming stencil buffer support. though, keep in mind that polygons are not infinite resolution, and you need to define those points manually, and that stenciling itself doesn't have anti-aliasing

Thanks for the response and info. I can manually plot the points, so that should be ok.

Do you have a date when the stencil buffer support would be available? 

Avatar
Freya Holmér creator
Quote from anthony waite

Thanks for the response and info. I can manually plot the points, so that should be ok.

Do you have a date when the stencil buffer support would be available? 

not at the moment! things are a little up in the air as I just moved apartments. But I can see if I can prioritize to push an update a little earlier if it's urgent, otherwise I'd planned for it to be part of a bigger patch in a week or two

Avatar
anthony waite

That's ok, I can revisit th is in a week or two. Thanks Freya!