Search Unity

Voxeland - Voxel Terrain Tool

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

  1. pixelR

    pixelR

    Joined:
    Sep 16, 2013
    Posts:
    58
    Hello, I have only 2 questions at the moment:

    1. Will the tool support Unity 5 as well? Maybe it does already?

    2. I didn't see replies yet (maybe just didn't notice them?) whether the tool works with RTP or not. Could someone post feedback on this?

    Thanks in advance.
     
  2. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,276
    bigd, the first one - non-welded seams - is surely a bug that is already fixed, but will be available in next version (I plan to release it in January). The second one is just a filled terrain block with all the neighbor blocks non-filled, in this case terrain behaves as it should.
    Daldegan, I'm implementing a feature of per-frame rebuilding in next version: instead of building all the new terrain at once (this causes lag) Voxeland will build a small part of terrain in each frame, this should make dynamic build more smooth.
    pixelR, I have not tested Voxeland on Unity 5 yet, but theoretically it should work. Unfortunately Voxeland does not work with RTP. Internally it is not a standard terrain, but a bunch of meshes. So all the plugins made for Unity terrain are incompatible with Voxeland.
    Daldegan, bigd, thanks for positive feedback, it is very inspiring!
     
  3. VicToMeyeZR

    VicToMeyeZR

    Joined:
    Jun 3, 2012
    Posts:
    427
    RTP does work with a Voxel engine here on Unity. If you communicate with the creator of RTP, you could probably collaborate on getting it to work
     
  4. bigd

    bigd

    Joined:
    Feb 14, 2014
    Posts:
    40
    Hi Wright - Thanks for your response. For some reason I wasn't notified you responded so I was worried you had abandoned this project; I was wrong, you're here! This tool looks great and is still a very much needed asset for the community.

    Great! Looking forward to your update. On your second response, I believe this would be something I'd like to change for our particular application as floating, unfilled blocks would alter the gameplay significantly. I'm picturing a simulated-gravity for these instances similar to how sand works in Minecraft. I'm not asking you to make this change this for me as I'm sure it's a pretty specific requirement, but I would ask if your code is well-commented?
     
  5. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,276
    It should be inserted in Data, in SetBlock function. Upon setting block it should check all neighbors - if they have connections. Maybe I'll implement this myself, but not in the upcoming version.
     
  6. Obsurveyor

    Obsurveyor

    Joined:
    Nov 22, 2012
    Posts:
    277
    What is the correct way to get a different size of voxels? Just changing the transform's scale in the demo really breaks stuff and makes the textures look awful.

    Also, there's a bug with torches where if you bury one in a hole, dig out the spot and the torch has disappeared, then place another torch in the same spot, it goes into what appears to be an infinite loop spawning torches with this error repeated in the console:

    Code (csharp):
    1. ArgumentException: An element with the same key already exists in the dictionary.
    2. System.Collections.Generic.Dictionary`2[System.Int32,UnityEngine.Transform].Add (Int32 key, UnityEngine.Transform value) (at /Users/builduser/buildslave/mono-runtime-and-classlibs/build/mcs/class/corlib/System.Collections.Generic/Dictionary.cs:404)
    3. Voxeland.Chunk.BuildPrefabs () (at Assets/Voxeland/Scripts/Main/Chunk.cs:1955)
    4. Voxeland.VoxelandTerrain.Display () (at Assets/Voxeland/Scripts/VoxelandTerrain.cs:513)
    5. Voxeland.VoxelandTerrain.Update () (at Assets/Voxeland/Scripts/VoxelandTerrain.cs:245)
    I found this in the demo before I decided to buy the asset. :) It does create a neat effect with the terrain, even though it slows the demo down to a crawl after a bit if you look at it.
     
  7. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,276
    Scaling a transform should do the trick. I guess textures look awful because of their tiling - it remains the same in a scaled terrain due to triplanar shader (this shader does not use terrain's uv, so textures do not scale along with transform). Try to adjust tiling in terrain material, scale it the same amount as terrain.

    Just checked out burying and digging out prefabs, something's really wrong. I'll deal with it in an upcoming version, thanks for your report!
     
  8. Wiegriaf21

    Wiegriaf21

    Joined:
    Jan 17, 2015
    Posts:
    7
    I cannot figure out how to make a voxeland terrain with diffirent block type depending on the height of the block, I've created a terrain with noise on it but I cannot find the part in the code that I need to change to have different block types, it actually uses only the first one in the "Block types" list. I'm really struggling at this.
    What I basically want to do is set different biomes depending on the height of blocks.
    If it is possible please help me find out how.
     
  9. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,276
    Wiegriaf21, do you want to replace all of the cliff blocks above certain level with "snow" (I suppose) block? And it should happen both on terrain autogeneration and setting block?
    Or you want to keep cliff block type internally, but give a different texture to all cliff blocks above certain height?
     
  10. Wiegriaf21

    Wiegriaf21

    Joined:
    Jan 17, 2015
    Posts:
    7
    @Wright I appreciate your quick answer, both things are interesting and I would like to know how to do them, by the way my goal is to create a voxel terrain with different biomes (and block types) like minecraft, but with a smooth look. I want to generate it programmatically (procedurally), I don't want to edit the terrain manually through the unity editor.
     
    Last edited: Jan 23, 2015
  11. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,276
    So it looks that you want to change the blocks type depending on height. Currently Voxeland generator does not have a suppert for this, and I'm not sure that it will have in a close future. So you'll have to write your own generator or modify an existing one. The best way to do this is to add generator postprocessor that iterates through all blocks at a certain type and changes them (maybe it is a good idea to start with data.GetBlock and SetBlock functions, and then try to optimize and make it faster).
    But if the only difference between high blocks and low ones would be a texture, then I'd recommend using your own custom shader. You will not have to change Voxeland code at all, and moreover - you can gradually blend textures depending on height. Mmm, this could be nice.
     
    Wiegriaf21 likes this.
  12. sefou

    sefou

    Joined:
    Aug 30, 2011
    Posts:
    287
    Hello Wright ,
    i have a problem using Substance Designer : i use Substance Designer proper texture at output with VoxelandTexture.sbs. Everything work fine with Voxeland Terrain :



    i save scene , close Unity and reopen Unity and load scene saved and have this :



    Can you explain how using VoxelandTexture.sbs ?

    Anothing, when i generate lightmap , i have this weird result :



    How fixing it ?

    Thanks
     
  13. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,276
    sefou, what Voxeland version do you use? It is not necessary to create substance since the release of v.3 which uses triplanar shaders instead. But if you want to - use baked substance. This blue texture appears due to sbs file load algorithm, it's not related with Voxeland. This could be fixed by selecting file in inspector and changing load behavior to "bake and keep" or "bake and discard".
    And do you have "generate lightmaps" toggle (in voxeland terrain - settings) checked?
     
  14. sefou

    sefou

    Joined:
    Aug 30, 2011
    Posts:
    287
    Hi Wright,
    i use Voxeland 3.12.
    "bake and keep" or "bake and discard". don't resolve my problem.

    I have "generate lightmaps" toggle (in voxeland terrain - settings) checked.
     
    Last edited: Jan 25, 2015
  15. Wiegriaf21

    Wiegriaf21

    Joined:
    Jan 17, 2015
    Posts:
    7
    I've also noticed that triggering infinite checkbox on doesn't seem to make the terrain effectivly infinite, in fact it is still limited, maybe I'm missing something
     
  16. Obsurveyor

    Obsurveyor

    Joined:
    Nov 22, 2012
    Posts:
    277
    Is "Ctrl-Left Click to smooth blocks" just a leftover from an old version? It doesn't seem to do anything. I understand the block Smooth setting, I'm just curious about this because it implies per block-instance smoothing(which would be great at the cost of memory/rebuild time).
    edit: Oh, I see what blur does now, you have to use a bigger brush size than 0.

    Also, I know drag clicking isn't great for most voxel editing, but being able to drag click ctrl-shift-left click would be really nice.
     
    Last edited: Jan 25, 2015
  17. Wiegriaf21

    Wiegriaf21

    Joined:
    Jan 17, 2015
    Posts:
    7
    If someone has a method to have an infinite terrain with Voxeland please share, I'm still struggling here, the terrain has borders even if you check infinite checkbox...
     
  18. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,276
    Wiegriaf21, when checked "infinite" the terrain is actually infinite. But not generated. To generate area you want just move camera to desired area and generate new land here using parameters in Generator foldout.
    Voxeland generator was designed as an artist tool, not a game feature, so it works in on-demand and in editor mode. It does not have an ability to generate a new land on-the-run (through I'm going to refine this).
    sefou, oh, my bad, I've sent you the wrong direction. To bake lightmaps terrain should be baked. Import&Export -> turn on Bake Lightmaps toggle -> Bake to Scene. Can't test it right now, but this should do the trick.
     
  19. Obsurveyor

    Obsurveyor

    Joined:
    Nov 22, 2012
    Posts:
    277
    Are there any plans to add per-block instance smoothing? I actually spent a bit of time trying to add it myself and it kind of worked, but the internal data structure of blocks doesn't seem to be very friendly to change without more study. I'm sure this is because of optimizations you've made to keep things as fast as they are.
     
  20. Wiegriaf21

    Wiegriaf21

    Joined:
    Jan 17, 2015
    Posts:
    7
    @Wright Ok thank you for your answer, unfortunately I need exactly to generate the map on the run :(
     
  21. sefou

    sefou

    Joined:
    Aug 30, 2011
    Posts:
    287
    @Wright

    is it possible using separately each texture about Triplanar tile ?


    Thanks
     
  22. sefou

    sefou

    Joined:
    Aug 30, 2011
    Posts:
    287
    Hello,
    everytime i hit Play , the grass disappear. I use shader TerrainBump4Triplanar. Here my settings:

     
  23. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,276
    sefou, thanks for report, bug is fixed and grass will be saved in next version. It will be available in February.
    About per-texture tiling - I'm going to bring all of terrain material settings out to terrain material, where they should be initially. This will bring an ability to change texture tiling and offset as in any other material.
     
  24. EightBitNine

    EightBitNine

    Joined:
    Jun 10, 2013
    Posts:
    3
    Hello. I am having a problem with Voxeland in Unity 5 beta 20. The error happens in the Editor, and reads:

    NullReferenceException: Object reference not set to an instance of an object
    Voxeland.VoxelandTerrain.Display () (at Assets/Voxeland/Scripts/VoxelandTerrain.cs:431)
    Voxeland.VoxelandTerrain.Update () (at Assets/Voxeland/Scripts/VoxelandTerrain.cs:244)

    It does this error endlessly, without even hitting play.

    What's weird is that I can see the terrain in one scene where I created the terrain, but when I save the terrain as a prefab, and try to bring it into another scene, this error happens. and the Terrain is not visible while this error is happening. I tried tweaking the settings, and nothing seems to help.
     
  25. Skaeren

    Skaeren

    Joined:
    Feb 9, 2015
    Posts:
    14
    Is it at all possible to use this to, say, construct a solar system? also, how would the system handle building vehicles and such? interested in using it as a base for a game like minecraft or starmade.
     
  26. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,276
    Speaking about solar system, what features do you have in mind? Different planets, planetary size, spherical objects? It is possible to create several terrains, it is possible to make them look as flat round worlds like in StarMade, but it's better to avoid creating big spherical terrains.
    Do you mean modelling vehicles with Voxeland? Oh, no, that's not possible, Voxeland was not designed for this. It's a terrain tool, and I try to improve it in this direction only.
     
  27. Skaeren

    Skaeren

    Joined:
    Feb 9, 2015
    Posts:
    14
    Yes, I was thinking different planet composition, planetary size, and with them being spherical objects, as well as moving in orbit around the central star at different rates.

    And yes, I mean modelling vehicles with Voxeland. Could you recommend a plugin that would allow for the vehicle aspect?
     
  28. ValrikRobot

    ValrikRobot

    Joined:
    Jun 26, 2013
    Posts:
    206
    Hi

    I want to write a script that i can define my own values in a 3d array to create the terrain. Can anyone advise the best way to do this. Also, would it be possible to detect 'floating' peices and remove them. Say, when in play, anytime i delete a 'tile' we can scan the surrounding area somehow?
     
  29. ValrikRobot

    ValrikRobot

    Joined:
    Jun 26, 2013
    Posts:
    206
    I got rtp working on voxeland, all i did was go into the chunk creation code and assign the material myself. You need to use the ReliefTerrainPMTriplanarStandalone shader
     
    hopeful likes this.
  30. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,276
    The simplest way to define your terrain data is to use VoxelandTerrain.SetBlock and SetBlocks functions.
    Detecting and removing floating terrain blocks is not easy, this is the main reason why it was not implemented yet.
     
  31. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    RTP works with non skinned meshes as well as Unity Terrain.
     
  32. pce

    pce

    Joined:
    Jul 24, 2014
    Posts:
    5
    We are planning to have our work flow like such: Terrain Composer>Voxel Land > RTP3.

    So we need to know few things.

    1. what does voxel land import/export to? file extension types?

    2. can it export to a height map or a model? what I mean by export is, can it be modified in unity afterwards, or is VL a self containing system and cannot be modified outside of VL?

    3. can voxel land convert a model or height map into voxels or is it a stand alone program?

    4. does voxel land export a model we can paint and texture using RTP 3? or does voxel land Feature a filtering and a texture system?

    5. Is it unity 5 ready?

    things like octree filtering would make it difficult for us to export the model separately. It is not hard to write a script that exports a mesh from another mesh but if the filtering is applied we would only have a high detailed terrain near the camera and load detailed terrain far from it.
     
    Last edited: Mar 5, 2015
  33. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,276
    Internally Voxeland generates standard Unity mesh. It could be saved to scene or as .asset file, and, theoretically, it could be exported to obj file with any exporter (this one, for instance). But on practice you should keep in mind that obj does not store vertex color information, which is used for Voxeland texture blending.

    Voxeland can import heightmap as basis for your voxel terrain. Note that heightmap cannot contain such a complex terrain structures like arcs or caves. If you want to import and export a heighmap I assume that you do not have such a structures - in this case it's better consider using standard terrain - Voxeland is a terrain made especially for that tricky landscape, and you will not get benefit from using it.

    I'm testing end resolving Voxeland's warining and errors in Unity 5. I plan to release a new version, which would be fully compatible with Unity 5 this month.
     
  34. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,325
    First I want to congratulate you for continuing the development of this asset after 2 years.
    Now the questions:
    1. I noticed that your demo has a lot of hiccups. How do you rebuild your mesh? Is it multithreaded?
    2. When making a non infinite terrain, are the borders filled with mater or is the mesh open?
    3. Do you bake AO in the vertices?
    4. Can the voxel asset files be stored as playerprefs to provide persistence on ios or steamcloud or server?
    5. What happens if two voxel volumes intersect? Will their terrains voxels merge or will their mesh interesect?
    6. You have auto generators, what controls do they have? Erosion?
    7. Blocks have diffuse and normal maps, what about gloss (for mud)
    8. Does it have some sort of cellular automata based fluid system?
    9. Do you automatically cull out chunks which aren't displayed or are occluded?
    Thanks.
     
    Last edited: Mar 11, 2015
  35. ValrikRobot

    ValrikRobot

    Joined:
    Jun 26, 2013
    Posts:
    206
    I want to generate a planet sphere using this. can anyone advise on techniques? also, if i set the extents to 1000, how would i access the array with that in mind? would the total be [1000,1000,1000]?
     
  36. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,276
    laurentlavigne,
    1. multithreading is in experimental stage: it works, it is about 1.5 times faster than non-multithreaded build, but it can cause visual flaws sometimes (like chunk was build before ambient was calculated, so it displayed with contrast light). So it is turned off by default.
    2. Borders are filled from sides, but the mesh is open from the bottom. Unless you generate an empty 1-block bottom layer.
    3. Yes, ambient is baked in vertices. It is calculated every time chunk changes.
    4. Voxel data or compiled meshes could be stored in an .asset files
    5. While all the volumes within one Voxeland terrain will always be smoothed, different Voxeland objects do not interact with each other.
    6. Generator sequentially generates noise, plateau, terrace, and erosion.
    7. Terrain shader support specular (diffuse alpha is specular power). Gloss power is not adjusted. This applies to released version, as Voxeland for Unity 5 will have different material settings.
    8. Voxeland is a terrain plugin. It does not have neither liquid system, nor celluar automata (except erosion which is calculated in 2D, so it could not be taken into account).
    9. Culling such a complex and playmode-changable meshes as voxel chunks is mildly non-trivial task. Infinite terrain destroys chunk by distance, LOD system switches chunks by distance... The only culling is made by distance, making a realtime visibility culling is out of the scope of terrain plugin.

    ValrikRobot, generating a huge spherical planet with Voxeland is not a good idea: firstly, Voxeland uses cubical structure: on 6 surfaces of planet it will be ok, but in other areas all the cubes will be inclined. It will be rather odd for the player to see terrain behavior changing while he walks further and further. Secondly, chunks are placed as a 2D array, so chunks on equator will be too complex (I'm pretty sure that they will not build up on a planet with a 1000-unit diameter).
     
  37. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,325
    Thanks for the replies Wright.
    What happens if I define a small volume, say 20x20x20 and while sculpting reach the border? Does the sculpting stop nicely as if sculpting in a glass bowl?
     
  38. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,276
    Yes, it's strange: in the current version a block could be set out of terrain borders, and terrain will increase it's size. It is unplanned feature, I've fixed it for next version.
     
  39. awardell

    awardell

    Joined:
    Feb 5, 2014
    Posts:
    71
    Bought this product and enjoying it. Is there any estimate on how soon Unity 5 support will be ready?
     
  40. colinfizgig

    colinfizgig

    Joined:
    Feb 20, 2015
    Posts:
    9
    So I opened it in Unity5 and tested. I updated the shadow warnings and had to fix the cursor lock, but man it really runs great. Thanks for the incredible Unity addon. I'm going to try to implement it with the Oculus Rift and the Leap motion plus to create a sort of "God" world creation/painting game.
     
  41. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,276
    Thanks for the compliments! It's a real pleasure to know that someone is satisfied with my work.

    I hope Unity 5 version will be ready soon. Can't say that about shaders, upcoming version's terrain will not use new standard material. But in other aspects Voxeland going to be far better: it is a lot faster, more convenient, and has new features like gradual per-frame smooth terrain building and new areas automatic generation. Right now I'm fixing remaining bugs and updating documentation.

    I'm going to build a new web demo today. Or maybe tomorrow.
     
  42. colinfizgig

    colinfizgig

    Joined:
    Feb 20, 2015
    Posts:
    9
    based on testing it in both 4.6 and 5 there is a major improvement in performance. I'm getting 85 fps in 4.6 and 140 fps in 5 with much less chunking going on as well (not sure why this is the case.

    I'm trying to setup the raycasting and terrain editing for the Oculus Camera rig but I'm having trouble getting it to work. Can I use a physics raycast for the terrain Edit function?

    Thanks again for the amazing terrain editor.
     
  43. cjrussel14

    cjrussel14

    Joined:
    Jun 20, 2014
    Posts:
    69
    hi,is there any way to resize the texture within the editor? once i put the texture in voxeland editor i can't change the size of it

    i targeting mobile so the terrain bump4 triplanar must be expensive on mobile
     
  44. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,276
    coinfizgig, I guess performance improvement increased due to new deferred lighting algorithm (in Unity 5 it does not render the scene twice), as Voxeland does almost nothing when terrain is not changing.
    Edit function use physics raycast internally - to determine camera-cursor ray with terrain. You can email me the problem essense, and I'll try to give some hint.

    cjrussel14, you can adjust land tile parameter to adjust texture tile.
    You can try Terrain4triplanar, it is a simple triplanar shader. You can use non-triplanar shader Terrain4, but your texture should be appropriately prepared (see docs for details or use substance included with demo).

    If anyone interested: here is a web demo of a new upcoming Voxeland version 4. I wonder if someone will reach the end of the world )

     
  45. cjrussel14

    cjrussel14

    Joined:
    Jun 20, 2014
    Posts:
    69
    this is nice,but i'm targeting for mobile so achieving a result like this is impossible :(
     
  46. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,684
    With the new demo, if you head toward the horizon and force it to generate a new terrain, there can be black voxels sprinkled around on the rocky surface of mountain slopes.

    EDIT: Turned out it was happening right at the start if I looked in the right places, and the locations were the same in multiple runs of the demo. Using Windows 8.1 and ATI HD5750.
     
    Last edited: Mar 21, 2015
  47. sefou

    sefou

    Joined:
    Aug 30, 2011
    Posts:
    287
    Yes,
    probably old bug DX11 renderer.
     
  48. LacunaCorp

    LacunaCorp

    Joined:
    Feb 15, 2015
    Posts:
    147
    I really need to be able to generate large terrains with this, but I just can't seem to figure out how to do it. The largest terrain size I can get is 512, but if I jump to 1024 it just crashed Unity after generation, with the error too many heap sections in gc. It's not my PC, and I can guarantee that much. Maybe I just need to assign more memory to Unity or something (somehow). Anyone know how to generate large terrains with Voxeland?
     
  49. cjrussel14

    cjrussel14

    Joined:
    Jun 20, 2014
    Posts:
    69
    I hope the next version of voxeland still supoort unity 4.6
     
  50. paulojsam

    paulojsam

    Joined:
    Jul 2, 2012
    Posts:
    575
    what is the size of a voxel terrain this package allows in therms of resonable framerate, and it will be compatible with unity 5