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
Related Posts
8 Comments + Add Comment
Leave a comment
Recent posts
- [GreaseMonkey] Unity Forum Fixer
- UnityHub: Make Hub application background Translucent
- Customize SpriteShapeRenderer quality (but has issues)
- Editor tool: Copy selected gameobject’s names into clipboard as rows (for Excel)
- Editor tool: Replace string in selected gameobject’s names
- UnityHub: Enable built-in Login Dialog (no more browser login/logout issues!)
- Use TikTok-TTS in Unity (with WebRequest)
- Create Scene Thumbnail Image using OnSceneSaved & OnPreviewGUI
- webgl+javascript TTS
- Using Moonsharp (LUA) + Unity Webgl
- Using 3D gameobject prefabs with Unity Tilemap + NavMesh Surface
- Custom Unity Hub Project Template Preview Image/Video (using HTML+CSS in package description)
Recent Comments
- Vector3 maths for dummies! on
- UnityHub: Make Hub application background Translucent on
- UnityHub: Make Hub application background Translucent on
- Install Android SDK+JDK+NDK for Unity (without AndroidStudio or Unity Hub) on
- Install Android SDK+JDK+NDK for Unity (without AndroidStudio or Unity Hub) on
- [Asset Store] Point Cloud Viewer & Tools on
- [Asset Store] Point Cloud Viewer & Tools on
- ffmpeg stream raw video into Unity Texture2D on
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!
i think i got that fixed in one another version, will check later.
newer version is here, http://1darray.com/blog/2016/12/29/advanced-voxel-terrain/
Love the snow! =D
Dude this works amazing with this
http://schemingdeveloper.com/2017/03/26/better-method-recalculate-normals-unity-part-2/