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

Need help with mesh deformation

Discussion in 'General Discussion' started by fito_guru, Dec 1, 2021.

  1. fito_guru

    fito_guru

    Joined:
    Nov 11, 2020
    Posts:
    3
    Hello everyone! Need help!!!

    Have you got any ideas hot to implement this mesh erasing mechanic?


    I already tried boolean operation but, in this case there is so many lags. And i already tried vertex method, but it doesn't looks so satisfying like in video above.

    Thanks for any ideas!
     
    Last edited: Dec 1, 2021
  2. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,554
    This can be a texture.

    You could try implmenting something like this as a heightmap.Basically, imagine that "erased" parts are pushed very far below the ground.

    You could also try to implement it as booleans, but the booleans would need to be 2d. Meaning a contour.

    But most likely this is a texture. Because you are not allowed to rotate the camera, it is also possible that this is something similar to two alpha-tested planes floating on top of each other with some fakery to create effect of thickness.
     
    zombiegorilla likes this.
  3. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    Google marching cubes algorithm. It's a way to take make a 3d shape from a point cloud or set of voxels.

    There are Unity mesh versions out there that would make this very easy to do. Not sure about performance.

    Another approach is to 'cut' the model by having the blade drop/build transparent mesh objects and use a 'cut out shader' similar to ones used to look through walls or hide sea/water in boats.

    Actually a cut out shader version might be the most performant way to do this.
     
  4. razzraziel

    razzraziel

    Joined:
    Sep 13, 2018
    Posts:
    395
    That looks like a regular surface deformation with a camera below the player and an invisible sphere collider writing on its rendertexture (since deforming object and deformed surface don't match up).
    Search "unity snow track" on youtube.

    And about the accumulating object; It is probably a custom model, animation could be blendshape. Also with additional outline shader.