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 to SimpleRookie
Recent posts
- 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)
- Check if point is inside polygon 2D (using line intersection)
- UnityHub: Enable Create Project Button (without having to select Cloud Organization)
- UI: Make Tooltip background fit Text content length
- Pong-Wars in Unity
- Install Android SDK+JDK+NDK for Unity (without AndroidStudio or Unity Hub)
- UnityHub: Add support for custom project title (instead of folder name) or use ProductName
- Testing Unity MUSE AI
- QR Code Generator Online
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/