Search Unity

  1. Engage, network and learn at Unite Austin 2017, Oct 3 - 5. Get your ticket today!
    Dismiss Notice
  2. Introducing the Unity Essentials Packs! Find out more.
    Dismiss Notice
  3. Check out all the fixes for 5.6 on the patch releases page.
    Dismiss Notice
  4. Unity 2017.1 is now released.
    Dismiss Notice
  5. Unity 2017.2 beta is now available for download.
    Dismiss Notice

Voxeland - Voxel Terrain Tool

Discussion in 'Assets and Asset Store' started by Wright, Jun 25, 2013.

  1. tiggus

    tiggus

    Joined:
    Sep 2, 2010
    Posts:
    1,143
    After playing with this asset I find myself wishing for the following features:

    1) Ability to create ramps. This appears near impossible to do with the current raise/lower brush tool. Needed for things like roads where the terrain needs to be smooth.
    2) Ability to create plateaus. Ie. click on a square and immediately fill in surrounding radius with same block type at same height level.
     
  2. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    939
    shwa, was there any message on crash?
    You can build all the chunks at once by turning dynamic build off. But note that it will take time, memory and the performance with displaying all the meshes will not be great.
    tiggus, as the voxeland has block structure like in minecraft actually there could be no real ramps. But you can use smooth brush to create something in that kind.
    Hmm, actually I did not think about height brushes, but I like the idea.
     
  3. omarzonex

    omarzonex

    Joined:
    Jan 16, 2012
    Posts:
    150
    Thank you, the programmer realistic environment
    The formation of ground and grass and trees and cave
    Very nice and fast construction and preparation distinctive programmatically
    Regards programmed professor Wright
    :-D
     
  4. omarzonex

    omarzonex

    Joined:
    Jan 16, 2012
    Posts:
    150
    Why did not you used in the installation of images programming؟؟؟؟؟!!!!! (Substance designer)
    In order to be realistic landmarks......And have a stronger control
     
  5. tiggus

    tiggus

    Joined:
    Sep 2, 2010
    Posts:
    1,143
    Thanks, ok that makes sense I was not sure with the smoothing whether it was possible to do easily or not. For now I will just use prefab ramps, seems to be working ok.

    Another idea: Under settings allow user to specify a layer for the chunks. Right now it seems they get created with default layer and they are regenerated dynamically so even if I set them once to a different layer it will not stick. Worked around it but easy nice to have feature and plays well with camera scripts that do camera collision based on layer of object(important for underground).

    For those of us with substance designer can you release the sbs for your substance so we can apply to our own substances? Otherwise we have to export our substance material to bitmaps and then load it into your example substance, losing the easy one-step tweaking that substances provide.

    Thanks!
     
    Last edited: Oct 13, 2013
  6. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    939
    I'll publish the substance as soon as I get to my pc.
     
    Last edited: Oct 13, 2013
  7. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    939
  8. Tagaris

    Tagaris

    Joined:
    Apr 21, 2013
    Posts:
    6
    I have a question on improving runtime performance that might be relevant to many of us.

    It happens that one wants to make a change to the terrain in runtime (e.g. an explosion that leaves a crater). Is it possible to schedule the terrain change to smoothen out performance peaks? If I want to change the terrain within a 0.5 or 1 second timeframe, how can I distribute the processing work of that terrain change over this time instead of having it peak in one big Edit() call?

    Simply changing all affected blocks one by one and waiting some frames inbetween does work a little, but seems not to be a very elegant solution. I know that threading might be a possible solution, but that goes way beyong my skills.
     
    Last edited: Oct 15, 2013
  9. tiggus

    tiggus

    Joined:
    Sep 2, 2010
    Posts:
    1,143
  10. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    939
    Tagaris, setting blocks one by one is not a solution - the most expensive operation is to build graphical and collision meshes after that. And building is needed to be done only once. What is your method of creating crater now? And how big is the crater?
    tiggus, enjoy)
     
  11. Tagaris

    Tagaris

    Joined:
    Apr 21, 2013
    Posts:
    6
    Thanks for the answer Wright.

    The craters are created by using the build in Edit() function of Voxeland.js on user input (triggered by a granade kind of object). Its size is the build in round brush tool with a radius of 1. The performance problems arise mainly when there are multiple users doing simultaneous input (I expect up to about 2 or 3 explosions within one second at most).

    The way I set up my game it does not matter if the change occurs immediate or if it takes half a second, therefor I want to use that time to even out peaks. At the moment I only see two different options for me:
    1. Creating a queue in front of the Edit() input that will be processed on a fixed time stamp.
    2. Creating a queue for the mesh recreation of chunks that will be processed on a fixed time stap.
    Solution one would not increase the performance if two explosions alter the same chunk in the same time frame. Solution two would probably lead to graphical artifacts if the explosion affects multiple chunks, because the chunks would be updated one by one. At the moment I'm tending to implement solution two if nobody can brighten my day with a better idea. :)

    On a last thought, would adjusting the chunk size (making it much smaller, about as big as the explosion) lead to increased performance if I never plan on doing any bigger edits? I will definitely try this and report back. Edit: very small chunks are not a solution, as it puts way to much stress on the renderer (too many draw calls).
     
    Last edited: Oct 17, 2013
  12. VicToMeyeZR

    VicToMeyeZR

    Joined:
    Jun 3, 2012
    Posts:
    425
    Is it possible to make this addition? I thought you added this feature already, that why I bought the asset. I can't believe people only want 1 type of grass for their whole terrains?

    Thanks


    [​IMG]

     

    Attached Files:

    Last edited: Oct 18, 2013
  13. VicToMeyeZR

    VicToMeyeZR

    Joined:
    Jun 3, 2012
    Posts:
    425
    Anyone heard from the OP? Usually responded with in a day??
     
  14. Nifflas

    Nifflas

    Joined:
    Jun 13, 2013
    Posts:
    103
    Hi! I just started to use Voxeland. However, my intention is to use it from a side view with a very wide and tall terrain, so I'd really like to start out shaping my terrain from a vertical surface facing the Z axis, rather than a horizontal one. Can this currently be done in Voxeland? It'd really be a time saver.
     
    Last edited: Oct 21, 2013
  15. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    939
    Nifflas, you need just to create data that is thick in x axis, and then fill it with generator. Also think about rotating the whole terrain on 90 degree, it could be the other way.

    VicToMeyeZR, I'm thinking about universal grass method. The idea you suggested looks fine,but it does not allow to have the same block type with grass and free of grass in different places at the same time. I'm thinking about grass block type, but method you suggested looks more... intuitive.
    Yep, I have no possibility to react as soon as I wish, unfortunately, and it will last until the end of the week. Sorry.
     
  16. cl-apps

    cl-apps

    Joined:
    Mar 16, 2013
    Posts:
    128
    Hi there,

    Voxeland 2.0 seems still to be broken when loaded into an iOS project, producing the same JS errors as I emailed before, for example:

    Assets/Voxeland/Scripts/VoxelandData.js(1230,56): BCE0005: Unknown identifier: 'i'.
    Assets/Voxeland/Scripts/VoxelandData.js(2008,17): BCE0005: Unknown identifier: 'rect'.
    etc...

    Any ideas on a fix as I'd love to use Voxeland in an iPhone / iPad project
     
  17. franktinsley

    franktinsley

    Joined:
    Jul 1, 2010
    Posts:
    129
    Is it possible somehow to place cube voxels in among all these smoothed ones? I don't see a way to allow players to build anything that isn't messy and blobby in nature.
     
  18. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    939
    cl-apps, I've fixed this error and checked - but for android. Maybe the fixed version was not included or ios finds out other errors. I'll find it out it as soon as posible.
    franktinsley, the ability to set smoothing value for each block type is in my to-do list. My primary task was to reduce memory consumption and data size. And now when it's done I'm ready to implement extended type parameters like smoothing and grass.
     
  19. ScTar

    ScTar

    Joined:
    Oct 7, 2012
    Posts:
    12
    Is there a way to have textures that work like a 3d tile map, i.e. the entire texture gets applied to each side of the voxel? Right now I am trying to make a grid out of voxels with a texture of the outline of a square.

    Also, do you have any plans to implement texture atlasing?
     
  20. cl-apps

    cl-apps

    Joined:
    Mar 16, 2013
    Posts:
    128
    I just tried deleting the downloaded voxeland package and importing to a fresh Android project and the same errors pop up as in an iOS project.

    I'm on a Mac running 4.2.2. Really strange if you can't reproduce the errors?
     
  21. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    939
    ScTar, the algorithm you describe works in Voxeland now. The only difference is that Voxeland chooses from 4*4 atlas at random after the mapping was applied. You can tile your grid texture 4 times in width and height, so it will be a 16-grids texture, this will make terrain look like a grid.

    cl-apps, try these files, will a problem remain?
     
  22. cl-apps

    cl-apps

    Joined:
    Mar 16, 2013
    Posts:
    128
    That fixed it!

    Thanks!
     
  23. stevesan

    stevesan

    Joined:
    Aug 14, 2011
    Posts:
    48
    Greetings again :) I upgraded to the latest version, and I feel like it still doesn't look as smooth as I remember it from the original demo. A screenshot: http://i.imgur.com/KaCvqAc.jpg

    Also, notice here how the "pit" looks very blocky: http://i.imgur.com/bM4glDW.jpg

    It looks a little.. "lumpy". Is this a bug?
     
    Last edited: Nov 5, 2013
  24. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    939
    Just to make sure that terrain geometry smooth is similar in version 1.0 and 2.0 I've made a simple terrain in first released version and compared it to same terrain in current one. The results of the comparison you can see on a screenshot:
    $TerrainGeometryChange.gif

    Well, there is defference in normals (ie in lighting) - however, I must say that 2.0 normals looks even more smooth. The other difference is in face orientation - it should not be noticeable. The real difference in vertex position is on intersection of 6 faces in the center of screen. In first version vertex was slightly not in place, but now it is fixed.

    Please note that Voxeland uses block structure, like a Minecraft. You cannot get a perfectly smooth terrain in Minecraft, right? Voxeland creates a cubical terrain and then smoothes it like MeshSmooth modifier in 3ds Max. This is the algorithm Voxeland uses from the first version, this is what distinguishes it from other terrain engines.
     
  25. stevesan

    stevesan

    Joined:
    Aug 14, 2011
    Posts:
    48
    OK I get that. I just thought there may be a bug in the smoothing code (which has happened before :) It's not a huge problem now, I guess I just need higher resolution..
     
  26. stevesan

    stevesan

    Joined:
    Aug 14, 2011
    Posts:
    48
    I'm using per-frame build in play mode, and I get seams like this, but pretty rarely: http://i.imgur.com/CQIsB4B.png

    Have you seen anything like this before?
     
  27. stevesan

    stevesan

    Joined:
    Aug 14, 2011
    Posts:
    48
    OK I just turned off "additional ambient" and this fixed the seam. We don't use that anyway, so it's OK.
     
  28. castor76

    castor76

    Joined:
    Dec 5, 2011
    Posts:
    1,037
    Just checking out Voxelland.

    I was wondering if it is possible to do "sub-d" like operation on the voxel.
    Instead of pre-define fixed sizes for voxel, can we expect so we can sub divide the voxel as we go? This way, it should be possible to save more memory and still add details to where we need them.

    I know this is not an easy thing to do and you probably have to build some kind of occ tree system to do it, but I wonder? version 3.0?

    Also instead of selecting block and do add block or sub block, can we do replacement block? So like we can just paint over the already existing voxels instead of altering it?

    if we use custom shader , will I be able to see the full properties of the shader inside inspector where I add blocks?

    I think voxel land has good potential , just waiting for it to be fully usable in real game production!
     
  29. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    939
    Well, currently Voxeland stores data in octree structure. But the difficulty is not in data storing, but in faces distribution. There should be big faces, and small faces, and all of them should be welded together. It is certainly not a trivial task.

    Clicking on terrain with shift and control pressed replaces voxels with selected type.

    If your shader will have _MainTex, _MainTex2, _MainTex3, _MainTex4 texture properties for diffuse textures; _BumpMap, _BumpMap2, _BumpMap3, _BumpMap4 for normal maps; _Ambient color property for additional ambient color, _SpecColor color and _Shininess float for specular you will be able to set them from Voxeland inspector. Any other shader properties will not appear there if that's what you mean.

    And thanks for believing in Voxeland's potential )
     
  30. shwa

    shwa

    Joined:
    Apr 9, 2012
    Posts:
    392
    Hi,

    Are there plans to add more control to the sculpting aspect?
    As in how one can sculpt clay, etc.

    I think this would be quite useful.
     
  31. Reniezs

    Reniezs

    Joined:
    Nov 2, 2013
    Posts:
    38
    Hello guys, is here chance transform our world created in Unity to Voxeland? because we are create great world and this tool is have good abilities for our studio :)

    Thanx for any help with this problems and how.
     
  32. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    939
    shwa, what kind of sculpting control do you mean? Voxeland always had a block structure and it will remain in future versions, there will be no smooth sculpting - as I understand clay - only the blocks adding or removal. I believe that not it's not worth making ZBrush from Voxeland, but I can add some features if you have an idea.

    Reniezs, are you going to transform all of your world or just a default Unity terrain? Actually I was thinking about converting terrain to Voxeland, and maybe this feature will be added in future versions.

    Right now there is a problem with Unity 4.3 because of changes in Unity's undo system. I've submitted a quick fix, but it will take some time for Unity to review fix.
     
  33. Reniezs

    Reniezs

    Joined:
    Nov 2, 2013
    Posts:
    38
    That is great step in this editor. If you release this version where clasical unity world transform to Voxeland we bought it. Now we looking for some videos and thinking about bought it. If we can buy this version can we have free updates or its better wait for this great update and after buy it. ?

    Oh, yes and we planing fully transform our game MMO world on this asset if you create support for this and create better brushes with we see on classical terrain creator.
     
    Last edited: Nov 14, 2013
  34. Reniezs

    Reniezs

    Joined:
    Nov 2, 2013
    Posts:
    38
    Sorry i created double post. I edit it and used.

    Here is this Unity zbush for beter creating world. This star is voxeland zbrush but if you create greater and better zbush assets its better but this is only my vision for implementing :) O: -)

    $zbrush.jpg
     
    Last edited: Nov 14, 2013
  35. Spiderbean

    Spiderbean

    Joined:
    Nov 12, 2012
    Posts:
    6
    Hello. I am new to Unity and that plugin just looks amazing. I like the way you can dig the terrain so that it´s flat. In some other Voxel terrains it is very difficult. I have seen your plugin but i havent bought it yet. It seems that the framerate likes dropping. Is there any way to solve that (by maybe changing lightening, textures or maybe even the update functions in the scripts). And if the framerate kept itself high would there be a way making an infinite procedural terrain out of it through adding ond/or writing other scripts. Sorry for my less experience ;) I am a very young starter.
     
  36. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    939
    Spiderbean, when do you experience framerate dropping? It seems that you're in web demo, and web demo frame rate should not drop when the terrain is not changing (as the dynamic build is off in demo). Voxeland generates quite a small overhead when the terrain is not building. Does the demo freezes when you dig/add terrain or when you do nothing or maybe walking/looking around?

    Reniezs, it seems that you are talking about brush texture. And there is a problem because standard terrain is in fact 2D plane just extruded by heightmap. Voxeland brush is actually real 3D brush, and it should use some sort of 3D texture which is not so easy to draw. Maybe clone stamp can solve a situation, but actually it is also not an intuitive solution.
     
  37. Spiderbean

    Spiderbean

    Joined:
    Nov 12, 2012
    Posts:
    6
    Yes it droppes indeed when i dig the terrain but I have tested the asset version on an other computer.
    But what about the infinite terrain? Would anything like that be possible?
     
  38. vincentellis

    vincentellis

    Joined:
    Oct 21, 2013
    Posts:
    90
    Does this support multiplayer realtime modifications? (eg.: Two clients altering the same terrain)
     
  39. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    939
    Spiderbean, Voxeland does not support procedurally generated infinite terrain. It has terrain automatic lang generator, but Voxeland is mostly terrain editor - you have to create a limited terrain and edit it, and auto-generator is just a tool to sketch your terrain quickly.
    There will always be a small delay on terrain change - Voxeland computes changed chunks, sets their meshes and bakes collision. I try to minimize this delay and thinking about splitting it into threads, but it cannot be removed completely.

    vincentellis, Voxeland does not have any built-in network-related functions. But theoretically they could be implemented with RPC on every terrain change. See Readme Scripting FAQ for details.
     
  40. shwa

    shwa

    Joined:
    Apr 9, 2012
    Posts:
    392
    Can voxeland be tweaked so, during runtime, the tree placing/removing function can work on a standard unity terrain?
    I've got a project right now that could benefit from this.
    Tx.
     
  41. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    939
    Voxeland has nothing in common with standard Unity terrain. It cannot place trees or in any other way modify standard terrain. I like the idea of a level-design tool for standard terrain, but Voxeland is not suitable for this. But the idea is really worth living.
     
  42. shwa

    shwa

    Joined:
    Apr 9, 2012
    Posts:
    392
    Tx for the info, Wright.

    I agree, it's a good idea/useful.

    Looks like Judah4 is working on it.

    http://forum.unity3d.com/threads/202028-Runtime-Terrain-Editing-WIP
     
  43. Olafson

    Olafson

    Joined:
    Aug 7, 2012
    Posts:
    233
    Hi there. I tried to read through the thread, but did not find any real answer. With the new version you released, what is the maximum "terrain" size you can achieve? And how many terrains can you put close to each other?

    Lets say I wanted to create a 8km * 8km map, would that be possible while keeping a decent terrain resolution of maximum 1m*1m*1m voxels?
     
  44. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    939
    The biggest tested terrain resolution is 4096*4096*512 blocks, but it is recommended to use lower resolutions due to memory usage.
    It should be considered that 3D block structure requires much more memory than ordinary 2D heightmap, so it is not recommended to use more than 2-3 km dimension of voxel terrain. If you have a possibility to split your land in several scenes it will be better do it.
     
  45. Casto

    Casto

    Joined:
    Aug 14, 2013
    Posts:
    44
    Hi Wright,

    I'm considering Voxeland but I was wondering a much memory does it take? Typically, 4096*4096*512 = 8,589,934,592 so even if a block takes only one byte this would take more than 8GB of RAM. How do you do to handle it?
     
  46. Olafson

    Olafson

    Joined:
    Aug 7, 2012
    Posts:
    233
    Do you think that you can increase the size in the future, or allow several voxel terrains to be placed on the same scene, without lagg?

    I really like your tool, it is by far the best voxel tool for Unity, but for the fact that your terrains can not be very large.
     
  47. eridani

    eridani

    Joined:
    Aug 30, 2012
    Posts:
    655
    Does this work on mobile? Thank you
     
  48. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    939
    Casto, Voxeland uses an octree data structure. It is some sort of compression. If an octree node of blocks 2*2*2 has the same block type, it is treated like a single block. Then this is done recursively up to the top node - if a node of nodes has the same type, it is treated like a single node.

    Olafson, I can optimize a couple of things in Voxeland, but I cannot promise a large size growth. I have some ideas in mind, but I'm not sure if they will work.

    eridani, not a large terrain with dynamic build turned off can be used on mobiles. I would recommend to bake terrain into mesh if you do not plan to change it in game. And non-bumped terrain shader should be used for mobile version.
     
  49. Olafson

    Olafson

    Joined:
    Aug 7, 2012
    Posts:
    233
    Hmm. I do not plan to change my environment in game. Would it be possible to somehow edit a larger version, or several terrains in editor, bake it into meshes which I could then easily cull out, based on distance and visibility?
     
    Last edited: Dec 14, 2013
  50. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    939
    Olafson, yes, you can bake terrain into meshes. But most probably the meshes size would be larger than the terrain data.

    Hm, but if you'll save the meshes into resources and will load them dynamically... it can make a sense.
     
    Last edited: Dec 14, 2013