Dec
24
2016

Voxel Terrain

Uploaded the old source for the marching cubes voxel terrain package (from https://unitycoder.com/blog/2012/09/30/marching-cubes-voxel-terrain/ )

Replaced the old shader with unity 5 compatible version,
also should convert the .js into c# someday.. *Note: its now converted, thanks to “SimpleRookie” (see comments below)

Instructions:
– R = reset (reload scene)
– A/D = rotate camera
– Left mouse button = draw
– Right mouse button = erase

Source: (whole project)
https://github.com/unitycoder/VoxelTerrain


8 Comments + Add Comment

  • Thank you very much. Early holiday gift for me!

    I went through and did a quick and dirty conversion to c#

    https://www.dropbox.com/s/w26q2lyb6yiq6rm/MarchingCubesCSharp.cs?dl=0

    • thanks! ill add to github later

      • updated c# to github

        • Okay, I been fiddling with this for a few days now. (Thank you again) And I made a chunk system with some noise randomness using it, to decent success. But there is one thing. Between all my chunks is a single sized gap. I tracked it down to the base voxel code, even using your stock release as a test bed for my confirmation.
          size is off by one. size of 1 has no results, size 2 is a single ‘block’
          So I’m figuring out, that it takes at least two/four ‘nodes’ to make a ‘block’ So I need to manipulate sizes or I need to force my blocks to jump the gap.
          Maybe I’m tired, but the life of me, I can figure out how to fill that gap.

          Any advice? Thank you!

        • Love the snow! =D

Leave a comment to SimpleRookie

Connect

Twitter View LinkedIn profile Youtube Youtube Join Discord Twitch

UnityLauncherPro

Get UnityLauncherPRO and work faster with Unity Projects!
*free unity hub alternative

@unitycoder_com

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.