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

Terrain Question (regards mesh manipulation)

Discussion in 'Scripting' started by Pysassin, Nov 20, 2014.

  1. Pysassin

    Pysassin

    Joined:
    Dec 27, 2012
    Posts:
    87
    Hey all I am looking at making a game that has some sandbox functionality. My goal is that the game has a premade level (created before runtime not generated) that the player during runtime can modify. The part I'm having issues with is that with the standard terrain asset making holes (for tunnels/caves) is needlessly difficult (or that I have found). Ideally what I think I'd like to is somehow convert the terrain mesh the artist makes into a voxel object (not those god awful cubes...) and use those to determine the deformation logic. I can't confirm that however as finding relative information has been a bit difficult, so I was curious if anyone else has done something similar in the past and wouldn't mind offering some suggestions on how to implement said feature or at least where to start looking. I've tried to find implementation of marching cubes and a few other algorithms but haven't found any code or anything tangible to look at and see how to use it in a real world example.

    Any help would be great.