Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

3D Cookie Cutter Effect using Mesh Deformation

Discussion in 'General Discussion' started by iftah, Jan 7, 2022.

  1. iftah

    iftah

    Joined:
    Feb 25, 2014
    Posts:
    16
    Hi Guys,
    I need to create a cookie cutter effect for a new prototype like this one: https://apps.apple.com/us/app/cookie-cutters/id1485539721
    I tried simple mesh deformation like pushing down the vertices under the cutter, but it gave me horrible result, the cut isn't smooth at all, I know I need to manipulate the mesh to make it smooth, but I'am not an expert in mesh programming. Do you guys have any idea or resources that can help me with this or any assets on the store, I searched but couldn't find any. Thank you guys.
     
  2. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,553
    Easy way:
    High density heightmap.

    Harder way:
    A store information in texture, use shaders to cut the cookie and resulting mesh.

    Hard way:
    Investigate implementation of boolean operations on contours. Store cookie as a contour, then when it is being cut, perform bool and create two meshes based on it. This has been implemented in GLU tesselator before, but is not necessarily easy.
    https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/gluTessBeginContour.xml

    It is highly likely that you'd need to hire someone to make it work.
     
    iftah likes this.
  3. iftah

    iftah

    Joined:
    Feb 25, 2014
    Posts:
    16
    Thanks a lot for your help, I never done this before but I will do some research and experimentation starting with the easy way. I appreciate your help. Thanks.