@Malzbier
You can buy it in the Unity asset store
He didn’t put a link to it in the first post so i did not know thats already in store.
95€ is a little bit big for just toying around.
I will sure remember it wen i have a project where this is REALY needed.
Wow, this looks like a dream come true!
Would broken toy games triplanar texture pack work with this?
When you say you could use any shape, does that mean I could “voxelize” any mesh I have, so i can sculpt it in unity? For instance, can i sculpt a basic terrain shape in sculptris or zbrush, export the .obj file, bring it into unity and voxelize it with voxelform?
is it Not the Constructor your use as Character
@angel_m - I’d like to add editor support at some point, but it’ll be a little while before that happens. Even though editor support would be part of this package, it’s really it’s own project, and for the time being, I’d rather spend a little more time improving this project before switching gears to something that sits on top of this. Multiple materials/textures are definitely high on the to-do list though. ![]()
@dakka - As stated above, having multiple materials setup by height, slope or fall-off angle is high on the list. All it requires is a custom shader. My main interest was deformable terrain, as opposed to static, so I opted for volumetric shaders instead. It’d probably be done already, but I’ve been absolutely swamped over the last few days.
@brn - Thanks, and btw, your Hard Surface Shaders Pro package is stunning! Happy customer here. ![]()
@legend411 - I can’t vouch for that, but I think it just might! By “Chunks can be any shape or size.”, I was referring to groups of voxels that form a mesh. To explain a little: Terrain size can be pretty large… say you have a 512x32x512 voxel terrain size. The terrain is so large, that you need to chop it into multiple “chunks”. Then there’s a balancing act where larger chunks perform better in static situations, but smaller chunks perform better in dynamic situations due to the fact that certain dynamic operations can involve voxels owned by more than one chunk. For a static terrain of that size, you might create chunks of 16x16x16 voxels, and 32x2x32 actual chunks. For a dynamic terrain, you might choose a chunk size of 8x8x8 voxels and 64x4x64 chunks. Now let’s say you have a multiplayer shooter… perhaps even though 8x8x8 is a very nice size for dynamic single player, maybe it’s not working for your game with multiple people modifying the world within close proximity of each other. So perhaps you’d find 4x4x4 chunks to do the trick. You might also find at that point, that with the chunks being so small, and a small overhead cost per chunk, you’d need to reduce the world size a little bit. No matter your situation though, the support for chunking up the world and smoothly managing them in the background, should allow you to get the job done.
Clarification here… all those examples were cubical. You can create chunks of 1x2x3 voxels if you find a need for it. Here’s an unlikely example, but perhaps you have a game where for some reason people are digging through a world, but they tend to stay almost totally fixed on the y-axis except for certain times when they use elevators, but aren’t digging. You might create chunk sizes of 25x1x25 for that situation.
@angel_m - I’d like to add editor support at some point, but it’ll be a little while before that happens. Even though editor support would be part of this package, it’s really it’s own project, and for the time being, I’d rather spend a little more time improving this project before switching gears to something that sits on top of this. Multiple materials/textures are definitely high on the to-do list though. ![]()
Thanks for the response.
I 've been wondering how have you built the initial terrain in the demo, because it is “saved” in his initial form.
This is most awesome indeed!
Great work! I might have some use for this! 95EUR really is a little high for a test drive, but I guess it’s a good value for any serious project.
Cheers
Hi All - I just saw my first review come in and was a little disappointed, so wanted to make sure to clear something up.
From the review:
title: argh, perlin noise
very cool, great start - but having trouble customizing the shape of the generated geometry. ideally you’d be able to load in an image file to define to initial shape - there’s probably a way to mod this but gonna be some investigation.
Response:
Regardless of my initial intentions, I’m working for you, and so I will do my best to address pain points as they may arise.
After you’ve purchased Voxelform, and imported the package to your project, the first order of business is probably to load the included scene and hit play. Following that, you may want to tweak some of the inspector properties for the VoxelTerrain object, and maybe try out or tweak a few materials.
The Readme.pdf can help you get started with the afore mentioned items.
Once you feel comfortable with that, it’s time to start modifying the code base. The code base was intended to get you quickly started, and work nicely as a behaviour.
The point of entry, is the Start function. Here’s a code snippet for the purpose of discussion:
///
/// Entry Point - Start here.
///
void Start ()
{
//Screen.lockCursor = Screen.fullScreen;
#if USE_PERLIN_NOISE_CODE
_tex = CreateTexture();
#endif
if (_observer == null)
{
_observer = Camera.mainCamera;
}
// Create the shared voxels, to be used by all chunks.
_voxels = new Voxel[
2 + _xChunkCount * _numVoxelsPerXAxis,
2 + _yChunkCount * _numVoxelsPerYAxis,
2 + _zChunkCount * _numVoxelsPerZAxis
];
// Note: Chunk properties can be set via VoxelTerrain properties in the Inspector.
_chunks = new VoxelChunk[_xChunkCount, _yChunkCount, _zChunkCount];
// This algorithm can be modified or replaced to suite your needs.
GenerateVoxels(VoxelNoise.ModifiedPerlin1, 2);
// Note: All voxels need to be generated before any chunks are generated.
// The reason for this is that the chunks require information from their neighbors.
// Start the world.
StartCoroutine(InitChunks());
}
Also of interest for this discussion:
///
/// Processes a custom function to generate voxel data.
///
///
/// This is intended for use in Start. Subsequent manipulation should use AlterVoxel.
/// Note: It’s a good idea to leave a buffer along the edges of the world.
/// It keeps the chunk meshes solid at the edges.
///
private void GenerateVoxels(System.Func<Vector3, Voxel> noiseFunc, int groundPlaneHeight)
I think part of the issue here, may have been a misunderstanding of the GenerateVoxels line. My intent was not to force Perlin noise on anyone, but rather, to provide a fun starting point that could be easily replaced.
The intent was that you could swap in your own function, or just use GenerateVoxels as an example, and replace it completely.
This would likely be a place where you might want to load some volumetric data. I figured that everyone would want to load this data in their own way, and that perhaps I shouldn’t clutter the code with that type of “feature”. But it’s a simple thing to do, and several people have requested saving and loading code. So rather than updating the docs to explain what’s not there, I’ll just add that functionality, and you can remove it, if it doesn’t suite your needs.
It’s also a fairly simple thing to load a new level into an existing VoxelTerrain and reuse the existing chunks. So I’ll make sure the load/save code handles that for you to, and will document any likely concurrency issues. This will essentially give you a simple editor.
It seems that an integrated editor is the #1 most desired feature, and as such, I may go ahead and just do it, and improve it over time.
I have to run, but will be back on later tonight to answer more questions on the forum, and private messages. Very busy day today! ![]()
Again, thanks so much everyone!
Heru - Because I have no other way of contacting you, if you’re reading this, I’d first like to thank you for your support. I’d also like to thank you for your honesty, and if you’d like to contact me to discuss your concerns, I’d be happy to help as much as I can.
Just wanted to let everyone know that an update is on the way with minor fixes, and new features. Among other things, due to popular demand, triplanar texturing is in. This means you’ll have the ability to use independent textures for top, bottom, and sides. I’ll make a full post and update the features list as soon as it’s submitted to the Asset Store. After this build, there’s much more in the works.
Awesome! Triplanar texturing is gorgeous. How about some screenshots in the meantime? ![]()
Great work!, would change the aiming reticle color for the demo though.
Two further things:
- Guess you’ve probably already seen this, but I used this when researching marching cubes.
- Why are you using MCs anyway? It means every hole you dig looks exactly the same…but I suppose it is faster. (No trolling meant, please don’t take it as that).
I’m no expert, but I’d be inclined to believe that the second paragraph there summarily explains why that particular technique would be tough to pull off in Unity:
“By utilizing several new DirectX 10 capabilities such as…”
Actually, you can pull off most of it in Unity fairly easily. Including triplanar texturing.
@veighlyn - Thanks, and yeah, it could be better.
@Muzz5 - Unless there’s something I’m missing here, we already covered this when I responded to your e-mails. You’re working on a competing project, and I respect that. Why don’t you start a thread and show us a demo?
For everyone else’s benefit, based on the material I encountered while researching this project, MC appears to be faster than any dual-method. There certainly are benefits to other methods, such as improved visual quality, but at a cost. You also have to consider the data structure. Voxelform uses a uniform grid, and marching cubes is made for that. A uniform grid provides the most flexibility from a performance standpoint, not just for the graphics, but for interactivity, and any type of cellular automation you may want to run.
One of my objectives with Voxelform, was to develop something that would provide reasonable speed for lower-end hardware, while still providing a great experience with a huge world to explore. I also wanted to provide a product that was going to work well, within it’s category, for the largest number of games.
@legend411 - I think you’re absolutely right. Although, I would love to be proved wrong on that one. Can’t wait until we do get some more advanced features in that area. Seems like the only way to get those graphics with our DX9 feature set, would be to save that image as a jpeg and import it into Unity. ![]()
Also, got those screenshots for you. These are very rough, real dev shots if you will, with a lot of junk in the scenes. But you can still get an idea of how things will look in the next build, which was supposed to go out yesterday, and hopefully that’ll happen today instead. Just gotta find a good cut-off point.
Hello,
Your work seems realy REALLY cool, and i think lots of people who likes caves, underground levels, and need to implat them in their project would be interested by yours.
I have some questions :
Can i use it in the unity editor ?
Can i use heighmap, Tom’s terrain tools to build a prototype of terrain and after use yours to dig and create underground space and levels, or i cannot ,and need to use yours all the time if i want create caves ?
If not, i suggest if it is possible to create something to work with heigmaps, like , step 1 : heighmap, step 2 voxels to tweak and create.
It is possible to use it as a tool rather as a game ?
In the unity editor.
One Million thanks for your work.
Best Regards.
![]()
Of course you can pull off triplanar texturing in Unity, its already been done before. I’m more referring to the use of the geometry shader, rendering to 3d textures, etc. I’m sorry, but you’re not going to be able to get that fidelity of a voxel terrain in real-time in Unity with DX9 and no multithreading.
Also, doesn’t that article use marching cubes, just at a much higher “resolution”?
Any news on an iOS version?
Purchased, the code is quite nice and clean… and there is surprisingly very little of it, which is a good thing!
An area that requires (significant) improvement is material handling. It is a bit better for rendering demo purposes to support tri-planar mapping. However, for games really need voxel material control. Do you have any thoughts on this? If it is a large task, perhaps it would be possible to contract with you to add it?
Thanks!
Edit: Reading above some thoughts on this, doh!
If the height/slope/etc controls also allowed per voxel material to be set for like a resource cluster (gold for instance), that would be great!
Edit2: A couple more thoughts, voxel locking (making some uneditable) and chunk LOD (not having LOD on chunks is a pretty big deal, however you would probably want to keep the physics representation always 100% or have that be a toggle)