Search Unity

Cutting a shape in the mesh

Discussion in 'Scripting' started by Batuhan13, Jul 3, 2020.

  1. Batuhan13

    Batuhan13

    Joined:
    Apr 9, 2017
    Posts:
    117
    Hi there I hope you are well I stuck at mesh deformation. I am trying to cut a shape from a mesh with mouse input like that image on the below but I dont know how to achieve that .My main reason for do this is I want to cut a shape from that mesh then I want to save that cut part as a new game object .Currently I am searching about mesh deformation in unity but I dont how can achieve this. Could you help me what should I do or do you have a any tutorial document about this Thanks=) ScreenClip.png
     
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,736
    If you want to modify geometry like the above, this is called constructive solid geometry (CSG) and there are plenty of scholarly studies out there. I'm told that Unity's ProBuilder exposes some basic functionality for you, but I have not used it myself.

    If you just want to make bumps in your normal map (for not-too-close-up viewing), then use a Material that accepts a normal map (bump-map, depth map, offset map... there's lots of ways of doing it ranging from purely lighting to actually deflecting the vertices), and then map your user's input to make changes in that normal map.
     
    Batuhan13 likes this.