Voxel tools: unreal landscape, shaders, meltable ice, trees

SMOOTH Iso-surface Voxel Tools for Unity

Hello!

My work in progress: a set of scripts and assets to generate smooth voxel-based meshes in both real-time and in the Unity editor. I hesitate to use the word “voxel” since it has been so thoroughly claimed by the neo Cube aesthetic (i.e. Minecraft). However why should we be limited to right angles? This is the real power of marching cubes and iso-surfaces. Check it!

Details
The screen-shots should speak for themselves but here are some of the details of what I’m working on:

  • Marching Cubes implementation (as c# scripts) to turn various data sets into 3D meshes, complete with tangents, ambient occlusion, and colliders.
  • Editor plug-in to create noise-based 3D landscapes (“unreal” as in not Earth-realistic, no affiliation with the game series of the name.) Can also generate rocks, caves, and more realistic terrain. [See last screenshot in this post, working title “Ruaumoko.”]
  • Real-time paging scripts to generate the same landscapes dynamically and on-the-fly [see demos, below]
  • A melt-able ice space, allowing the player to form deform the terrain/mesh in real-time [see last demo, below]
  • Shaders to provide triplanar texture projections, detail textures, and per-vertex ambient occlusion (currently in parallax, bump, specular, and diffuse flavors). Also a few quad-projection variants to render ground, walls from the front and side, and ceiling textures. NEW An additive snow shader based on elevation to drop snow on any mesh (who doesn’t love snow??)
  • Editor wizards to subdivide, smooth, optimize, and save any meshes as assets (these meshes can take a LOT of vertices, making LOD schemes very attractive for larger worlds).
  • Next up: tree foliage generation, real-time fluid simulations.

The marching cubes script runs on any data that can be sampled for density values (i.e. values < 0 are inside the mesh surface, values > 0 are outside). All of the terrain in this post is generated as 3-dimensional arrays filled with many octaves of noise. I’m working on a simple meta-ball example to test/show as well. If you can find a way to represent what you want to build in a 3-D array then the cubes that march can render it for you!

Demos
I have posted several demos on my website (along with more screens):
NEW Destructible world (infinite, paging,etc.)
NEW Volatile Liquids - Meta Ball based fluid emulation
Infinite, paging, melt-able terrain demo (You Shall Not Escape!)
Infinite Paging Terrain demo
Walk-through paging terrain demo (see first screen shot in post)
Ice Caves: melt-able terrain demo

Questions
If some of this looks cool give me a shout on this thread! Or if you have any critiques, advice on how to put it over the top, I’m happy to hear that too! If any or all of these bits seem attractive I’d be glad for any advice on how to group them for distribution. Some parts of this represent a huge investment of my time and I would like to put them up on the store, although finding the right price point is an open question at this point.

Cheers!

[Note: next image is with the built-in bumped specular shader, revealing the attraction of triplanar projections!]

Ruaumoko: editor wizard to generate these meshes for all kinds of pre-game fun.

Very Nice!

The paging terrain looks very dramatic, I love it.

Can I ask what noise you’re using to create it with? Simplex, Perlin or something else?

Excuse my ignorance, but is this technology somehow in relation to this?
http://www.atomontage.com/

I mean, could it be used to display dense point clouds in unity?

That looks really amazing, good job!

im interested, this looks amazing :slight_smile:

Thanks y’all!

@Rasped: I used classic noise, which gives horrible performance (it’s all relative, but it’s not fast in c#), but I wanted to see what it could do before trying other noise algorithms. I’m going to drop in some other models and see what it comes up with. Stay tuned!

@Pulov: I wasn’t aware of Atomontage, he’s got some cool looking stuff! And yes, my “voxelizer” can do the same things (although he may have some fancier things added on, the texturing on his landscapes looks very complex). It can display any point cloud as a mesh-surface. I was going to guess Atomontage had things running faster but he says the hi-rez destructible scene took 6 hours to generate… Unity might be faster! I’m curious what he’s doing now, since his last activity was 8 months ago.

I’ve seen other GPU based implementations and they look great, but they make physics and collisions too difficult IMO. My solution builds meshs so that Unity’s mesh colliders can make them interactive (and so we can take advantage of all the Unity goodness!).

this looks amazing!

Hi , this is a little closer to the TerrainEngine.
http://forum.unity3d.com/threads/158887-TerrainEngine-Voxels-Marching-Cubes-Robust-Architecture-FPS-Control

This is very promising, I wish you great luck for the future, especially for fluids (and I say this from experience :wink: )

This is wonderful, my principle project is literally on hold while I wait for a suitable voxel tool for the creation of my game, where I need to create a world that is completely editable/destroyable on the players end.

how much is the estimated cost of your tool and could a person pay now and perhaps be allowed to beta test it?

Thanks, again!

@dyox: the TerrainEngine looks like a massive project, thanks for linking it! All the best with it.

@zephren: I’ve been tossing around the idea of beta testers. I could certainly use the feedback and ideas from people who are really interested. Perhaps the easiest way would be for me get it up on the asset store as a beta release with the understanding that the “upgrade” to release 1 will be free. I’m really not sure where to price it, I guess I need to do some more browsing of the Asset Store. I’ll also probably pull out the shaders as a separate package to reduce the cost of the main package.

ok well keep me posted, very interested, the only thing that i am interested in was voxel form but it is gone now and everything else is way out of my budget, but i am willing to invest if the price is right and the features are there.

I was having such a great time… I fell through the world… :smile:

Wow man, some neat stuff here. That melting ice demo was kinda trippy!

Wow, I need this badly, I have been looking for a “smooth” voxel terrain forever for the game I am developing. I would gladly pay for it (at a reasonable price). The only feature the tool lacks is infinite terrain, but it shouldn’t be that too hard to code it.

I just posted an infinite terrain demo! (added to the OP) I had it in the works but hadn’t ironed out the kinks fully. I also wrote up a snow shader in the hopes that spring will finally come to the upper US. Anyway, run through the demo–it’ll keep paging until your computer runs out of virtual memory (I haven’t had it crash but I’m never clearing any of the meshes out so theoretically the browser will die eventually!)

I’m trying to divine where “reasonable price” lies, and any thoughts would be helpful. The Asset Store is all over the place with prices… 5 for some cool #!7 right next to $150 for a few shaders or textures I can make myself (or better yet, find on the forums!) I guess it’s whatever the market will bear. I’m thinking I’ll probably start a bit low and call it a Beta release, then up the price and make sure everyone gets the upgrade to the official release when the bugs are all out.

Man the ice cavern demo is Awesome, with a big A!

Both paging and infinite paging demos crash on my system when fully loaded : windows 7 x64, google chrome and unity 4.1

Oh my. This is awesome! I actually squeed while playing your demo.

I have a question? Do you think this would be able to generate biomes eventually?

Also, and I hope this doesn’t make me sound like an idiot for bringing it up, but are you using the ROAM Algorithm at all? Reason why I brought it up is because using it someone was able to get 1.56 million triangles at 25.6 frames per second on an old Radeon 9700. Might be useful when dealing with stuff like large cave systems and long draw distances.

http://www.cognigraph.com/ROAM_homepage/ROAM2/

And yes. I would put it up on the store as a Beta… would benefit you by both for bug tracking and sometimes you’ll find out features you never new you wanted to include! :slight_smile:

The infinite terrain is amazing. The only problems with it are the annoying white cubes and the chunks only generate when you are very close to them. I accidently fell through the world before a chunk generated. The code also seems pretty optimized (even though you don’t unload chunks). I was able to generate hundreds of chunks with still good fps, and my computer isn’t a gaming rig. I can’t wait until you release it.
I also think a Beta would be a good idea.

Hey Bens1984

Love the work that you are doing cannot wait to purchase this!

A few Questions for you -

Does this run on unity indie?

and can I test this?