Search Unity

Voxeland - Voxel Terrain Tool

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

  1. malkere

    malkere

    Joined:
    Dec 6, 2013
    Posts:
    1,212
    So we could set an offset value to 10,000 for the ground level and let players dig down to 10,000, or up 10,000? that sounds fair.

    How does the out of range generation work? I see a low res mesh being generated out of the voxel range. How far does this go, or can the start and end values be played with? Can this resolution be changed?
     
  2. sebou42240

    sebou42240

    Joined:
    Aug 21, 2015
    Posts:
    19
    Thanks you for your answer !
    I have a middle level in C#
    And do you know how to carry out these few scripts?
    Because I do not see how to convert byte list to string and write it to a save file
    thanks you
     
  3. MarStr

    MarStr

    Joined:
    Jan 5, 2013
    Posts:
    8
    Hi sebou,

    you can save a byte-array to a file using System.IO.File.WriteAllBytes(string path, byte[] data) and read a file with System.IO.File.ReadAllBytes(string path).

    I think those methods will solve your problem.

    Note:
    It's possible to convert a byte[] using the Encoding-Classes. You can find more information about that on MSDN.

    Best regards,
    Marcel
     
  4. sebou42240

    sebou42240

    Joined:
    Aug 21, 2015
    Posts:
    19
    Thanks you for your help !
    I have a good level in C# but this... i don't really understand. I go check in internet how to use System.IO.File.WriteAllBytes(string path, byte[] data) because here, i never see this ^^'
     
  5. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    There is an "easy save" asset on the store.. I'm not sure if it will work for this, but if it does it should also show you some code to make sense of it. Contact the developer of the asset first to find out if it will work for you.
     
  6. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,276
    In the upcoming Voxeland version horizon range will depend on a special horizon mesh size multiplied by the chunk size. Most probably I will include several meshes so you can choose the one that wits you with a range/density ratio, or create your own. In current version you can just set the horizon distance in settings.
     
    malkere likes this.
  7. tequyla

    tequyla

    Joined:
    Jul 22, 2012
    Posts:
    335
    Hello,

    Concerning custom objects in the world in large persistent world (town, mobs and others customs things), how i can place them ? they don't falling ?

    ++
     
  8. sebou42240

    sebou42240

    Joined:
    Aug 21, 2015
    Posts:
    19
    I would like, when in game I dig or add earth, i save. And when i quit game i would like see the modification in scene in unity... Anyone do this please... :/
     
  9. TylerO

    TylerO

    Joined:
    Aug 21, 2011
    Posts:
    35
    Here is what you need to do, in pseudo-code:

    1) Get a reference to the VoxelandTerrain object, this will be the actual component you create in your scene, however you do this - up to you.
    2) Using that reference, you'll notice there is an object called 'data' - this class contains the actual terrain data. This Class (Data) contains a method titled SaveToByteList(), which returns a List<Byte> object - this is your terrain data.
    3) Write that data to file using standard IO methods, as other have mentioned
    4) profit.

    Also, if you want to load terrain data, simply call LoadFromByteList() - which is also apart of the Data class. This will take the bytes you saved in the file, and apply it to the terrain

    With that simple bit of code, you have a full save/load system, which you can easily implement into your current savegame system.
     
  10. sebou42240

    sebou42240

    Joined:
    Aug 21, 2015
    Posts:
    19
    Okay, thanks for you comment, but i'm not an expert in C# (it for this i buy this asset) and i don't no the standard IO methods...

    and i have only this project, i try understand this... i don't have other savegame system...
     
  11. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,276
    tequyla, object blocks were made mainly for placing some special objects like lights or particles - those things that are part of terrain but could not be rendered as meshes. I'm not sure that using them for NPC or some objects that can move or fall is a good idea - they are still linked to their initial blocks even if they leave it. Consider placing them as standard prefabs.
     
  12. hoodoo

    hoodoo

    Joined:
    Oct 19, 2012
    Posts:
    154
    I have a question about using a custom shader on the mesh that I create with Voxeland. Can I create a Voxeland terrain with a single texture, then bake it to a mesh in the scene, and then set a new material on the entire mesh? My new material has the custom shader that I want to use. Basically I want to create an ice cavern, and use my ice shader on the mesh created with Voxeland.
     
  13. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,276
    That's possible. You can create voxeland object, make a mesh and bake it to the scene (or to .asset files if you are going to make a prefab), and then assign you own shader to them - and since it does not require to read texture channel information it should work just out of the box.
     
  14. hoodoo

    hoodoo

    Joined:
    Oct 19, 2012
    Posts:
    154
    Thanks @Wright - I'm having some trouble with bake to scene. It's getting stuck on step 1 of 6. Created a new project and it still gets stuck the same way. Is there a way to fix this?
     
  15. hoodoo

    hoodoo

    Joined:
    Oct 19, 2012
    Posts:
    154
  16. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,276
    Early Beta Test Announcement:

    I decided to share Bitbucket repository to all the Voxeland owners to enable study and integration with user's projects. So I plan to start Voxeland beta test soon - all Voxeland owners are welcome to fill in the form. Beta version will be distributed via Bitbucket, so you'll need Bitbucket account to download it and Git client to get regular updates. Please use Bitbucket's Issies page to report problems or share your ideas - btw this page is opened for everyone, not only Voxeland owners.

    The same page will be used to sign-up for an upcoming MapMagic version that will be able to generate Voxeland terrains, so if you happent to be a MapMagic owner fill it's number too.

    Do not expect perfect and polished product from the very beginning. There are still some issues, but I guess that some major aspects will not change.

    Whish you a nice testing!

    Beta sign-up form



    hoodoo, please check your inbox
     
    Last edited: Mar 17, 2017
    Ascensi, tequyla, MarkusGod and 2 others like this.
  17. trilobyteme

    trilobyteme

    Joined:
    Nov 18, 2016
    Posts:
    309
    Excellent news! Form filled out, and I look forward to seeing what Voxeland 5 will bring.
     
  18. tequyla

    tequyla

    Joined:
    Jul 22, 2012
    Posts:
    335
    woot :) access submitted too !
     
  19. hoodoo

    hoodoo

    Joined:
    Oct 19, 2012
    Posts:
    154
    Signed up for beta - thanks! :)
     
  20. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,276
    I'd just like to mension that I really enjoy reading comments you leave in a beta form. Thanks for all of the warm words! I do my best to keep everyone happy, but it is nice to hear that I'm doing a good job!
     
  21. Exbleative

    Exbleative

    Joined:
    Jan 26, 2014
    Posts:
    216
    @Wright I'm curious what dynamic Voxeland terrain generation speed will be compared to MapMagic? Comparable or a fair bit slower? I'm guessing the first integration with MM won't have any way of creating things like overhangs/tunnels, etc?
     
    malkere likes this.
  22. trilobyteme

    trilobyteme

    Joined:
    Nov 18, 2016
    Posts:
    309
    Getting a chance finally give the v5 beta a test. Using Build 631835a78b73 on a Mac running Sierra & Unity 5.5.2p2

    I removed my old Voxeland folder, then renamed the downloaded one to Voxeland and copied into the project. After assets imported, I created a new scene and added a Voxeland terrain object. I got the expected prompted for terrain size, and then after clicking on Create Terrain nothing appeared to be happening.

    Selecting the Voxeland terrain in the scene shows that it looks like the grid is being created, and when I click on the generator/Generate Terrain button it appears to work, but nothing is being shaded. Looking more closely, it appears there is no default terrain texture loaded, so I added my own... but nothing appears in the scene other than the wireframe.

    Checking the console, I'm getting this error on a fairly constant repeat (several times per second)

    NullReferenceException
    UnityEngine.Material..ctor (UnityEngine.Shader shader) (at /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/ShaderBindings.gen.cs:313)
    Voxeland.VoxelandTerrain.Display () (at Assets/Voxeland/Scripts/VoxelandTerrain.cs:441)
    Voxeland.VoxelandTerrain.Update () (at Assets/Voxeland/Scripts/VoxelandTerrain.cs:361)
    UnityEditor.EditorApplication.Internal_CallUpdateFunctions () (at /Users/builduser/buildslave/unity/build/artifacts/generated/common/editor/EditorApplicationBindings.gen.cs:197)
    Any ideas on whether this is something I can fix through tweaking a file or two?
     
  23. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    @Wright perhaps you could include a version of the beta in the asset on the store. I tried getting the download on bitbucket (31 mb) I believe and in a new project after compiling it was all errors -running Unity 5.5.2f1 so I'm not sure if what I downloaded was correct.
     
  24. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,276
    There's no difference of what does MapMagic generate - Voxeland or standard terrains. So total time to generate and build some chunk would be MapMagic generate time plus Voxeland time to visualize what MM has generated. Actually, since VoxelandOutput applies its result in a thread, pure MapMagic generate time is a bit lower/faster.

    Why not? You can create caves, tunnels, floating islands - and possibly overhangs. But, to be honest, I don't really like cave entrances yet - maybe in the first iteration they would be a bit clumsy, but at least they are possible.

    trilobyteme, if you have a standard Voxeland create dialog appearing then you have not removed the old version. Voxeland 5 does not have any dialogs - it has two types of new game objects: Voxeland Static and Voxeland Infinite (for limited and endless terrains). Check if you have any old scripts left or try a clear project.

    Ascensi,
    are you downloading directly or using Git client? What kind of errors do you get? Have you downloaded PluginTools repository?

    I really like you've started testing new Voxeland 5, but I'd like to remind things I've stated in the beta description:
    1. You need PluginTools repository along with Voxeland one
    2. Please report bugs to BitBucket's issue page. It's a special place to share bug reports, but still, it has the only test issue :)
     
  25. trilobyteme

    trilobyteme

    Joined:
    Nov 18, 2016
    Posts:
    309
    I removed the entire Voxeland directory (and I had the plugintools directory installed as well). I'll try a clear project.
     
  26. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    Thanks! I just downloaded the zip files and got it all working, I'm new to bitbucket/github so finding things was a bit of learning.
     
  27. Exbleative

    Exbleative

    Joined:
    Jan 26, 2014
    Posts:
    216
    I mean dynamically, using only Map Magic, no hand-painting of voxels after MM generates it. Unless you've got some 3D noise/'heightfield' stuff happening in the MM/Voxeland integration already?
     
    malkere likes this.
  28. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    @Wright the new version is fantastic! I like the realtime generation and now it's very quick! thanks for adding the stamp and chunk labeling!! haven't got to use either yet but pretty excited to test that. By the way does Voxeland require MM to create caves?


    Also would this beta allow Megasplat to work with Voxeland or are you keeping that development for a later date?
     
    Last edited: Mar 23, 2017
    Exbleative likes this.
  29. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,276
    Exbleative, I'll make a video showing how to generate caves in Voxeland with MapMagic as soon as I deal with an ambient and interface bugs. Shortly, you can use some layer on a certain height to subtract, cutting it from already existing terrain.

    Currently you will need MM for that, there's no built-in generator. Maybe it will be added in later versions.

    Not yet, not yet.
     
  30. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    695
    Hi
    I am interested in Voxeland but I would like to know some things before buying:


    1) Can Voxeland work on terrain already made with TerrainComposer2?
    If not, do you have plans to implement Voxeland 5?

    2) Do you have a large consumption of performance or consume too little?

    3) Can you modify a mesh in real time or only work on terrains?

    4) Is it compatible with infiniGrass or uNature - GPU Grass?

    regards
     
    ElroyUnity likes this.
  31. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    Regarding integration with uNature - I spoke with Wright a few days ago regarding the MapMagic integration and he also gave me access to Voxeland's source code which means that an integration is definitely coming soon :)
     
    pixelsteam, ftejada, TylerO and 2 others like this.
  32. TylerO

    TylerO

    Joined:
    Aug 21, 2011
    Posts:
    35
    That actually leads me to a question:

    I have been looking into perhaps getting a foliage system for my game. I had been looking at other systems but just came across uNature... it seems quite nice and I am interested. However, I did look over the forums (the uNature thread) and have a few questions for both @ElroyUnity and @Wright

    1) I noticed that uNature currently doesn't support (but seems it's being worked on) multiple layers for grass. Considering Voxeland is... well, voxels - there could very well be an overhang with grass on top of it, and grass underneath it. Is something like this going to be supported?

    2) Will uNature work with Voxeland out of box, or will it require Map Magic? I only ask because I had plans to create my own terrain generator for Voxeland... but that being said, I am not opposed to using Map Magic either.

    3) If uNature does require Map Magic, will you (@Wright) be adding support into Map Magic so that both uNature and Voxeland behave together nicely?

    Looking forward to your responses.
     
    ElroyUnity likes this.
  33. ElroyUnity

    ElroyUnity

    Joined:
    May 20, 2015
    Posts:
    1,588
    1) That's correct, in V2.3 I plan to add multiple-height-layers support and I will probably integrate Voxeland then :)

    2) Most likely out of the box, cant see why not :)
     
    docsavage and malkere like this.
  34. TylerO

    TylerO

    Joined:
    Aug 21, 2011
    Posts:
    35
    Thanks for that info!
     
    ElroyUnity likes this.
  35. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    @write I sent you a pm regarding Voxeland 5 some issues that could be user error rather than a bug.
     
  36. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,276
    Here's the tutorial video showing how Voxeland Output would work:

    Ascensi, do you take part in beta test? If so, please use issues page to keep all of the bugs orginized. If not - use it anyways, this issue tracker is public and opened for anounimous users :)
     
  37. ftejada

    ftejada

    Joined:
    Jul 1, 2015
    Posts:
    695
    Hi @Wright I ask again if you forgot to answer me ;)
    I am interested in Voxeland but I would like to know some things before buying:


    1) Can Voxeland work on terrain already made with TerrainComposer2?
    If not, do you have plans to implement Voxeland 5?

    2) Do you have a large consumption of performance or consume too little?

    3) Can you modify a mesh in real time or only work on terrains?

    4) Is it compatible with infiniGrass?

    5) Do you need to buy Voxeland to access the Voxeland 5 beta?

    6) Is the Voxeland 5 beta available?

    regards
     
  38. malkere

    malkere

    Joined:
    Dec 6, 2013
    Posts:
    1,212
    I gave up voxels two years ago after two years of frustration with everything from VoxelFarm to self-write engines. This is exactly what I was trying to do all along and Voxelfarm still does not care about implementing. I've been watching VoxelLand for a while, but after seeing it work with MapMagic I'm sold.
     
    MarkusGod likes this.
  39. whatbus2000

    whatbus2000

    Joined:
    Nov 21, 2014
    Posts:
    65
    Great looking asset.
    Is floating terrain going to have physics applied to it in the future.
    Example: if you dig around a bit of terrain until it is no longer supported by anything and is floating, then that bit becomes a physical entity and falls to the ground.
     
  40. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,276
    ftejada,
    Nope. The reason is that Voxeland is a real 3D terrain, that keeps all of blocks data underneath, while standard terrain and TC2 use a painted heighmap. It's not possible to say how deep is the top layer and what lays underneath. Voxeland has to know how the terrain was created layer by layer, and I do not plan so deep integration with TC2. At least yet.

    When the terrain is not changing or generating performance is comparable with using a 3d model instead of the terrain - with just a slight overhead. Changing or generating a chunk takes about 30-40 ms in sum - in Voxeland 4 it's a coroutine so this lag is split between 4 frames, in Voxeland 5 most part (80%) is generated in a separate thread, leaving in the main one only Mesh.Bake PhysX CollisionData (about 6 ms).

    Not yet. I'll start implementing advanced foliage with uNature first.

    Voxeland5 is currently in beta stage. During this stage I get bug reports and fix them, so beta smoothly turns to RC and then to release version - this way all of the beta testers will get a fully functional release version even if they have not even run it even once. So, yes, all of the testers have to have Voxeland license.

    whatbus2000,
    I don't have plans for implementing this feature yet. It seems to me very resource consuming because of the numerous blocks lookup, so it should be done in the background or something - so I've got to implement a pipeline for that.

    malkere, thanks!
     
    ftejada likes this.
  41. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    I've been thinking about this as well - I think a physics node may work and have it work with a specified size range for your "thin layers" and have the physics applied by either or a combination of (using check boxes) distance, size, texture slot/type, visibility etc. I'm also picturing that if a texture is selected and you can adjust the physics properties to have things rubbery or even fluid like perhaps using a vertex animation shader or megasplat flow map we could get some interesting effects.

    If objects need to fall and break then likely a particle effect might be sufficient -maybe integration of the asset "Exploder" set to a physics type for debris.

    Anyways
     
  42. trilobyteme

    trilobyteme

    Joined:
    Nov 18, 2016
    Posts:
    309
    One possible solution for people who want to use an existing terrain (coming from TerrainComposer 2, Gaia, or any of the other tools), if you export your existing terrain heightmap out, you ought to be able to import the heightmap into Voxeland.

    Wow, that MapMagic with Voxeland 5 demo is pretty amazing. Speaking of amazing, here's a quick demo I recorded of some Voxeland 5 testing I did earlier in the day. Looking at it from a pure performance perspective, Voxeland 5 delivers a pretty big boost.

     
    ftejada and MarkusGod like this.
  43. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,276
    trilobiteme, check out the latest beta version. There was a GUI-related performance issue, with the last beta submit Voxeland works significantly faster :)
     
  44. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    @Wright well I did it! finally got two different terrain styles in one Voxeland5 complete with caves! I don't know how you would have done it, it took me about 8 hours or so just experimenting. What I've learned is that I can't map the same textures on the Voxeland output in MM.. if use the + and add the same texture set up on Voxeland in MM all the deformations already setup on that texture becomes applied to the other generators that I've tried to use to generate a new surface area -this means I'd have to create another texture slot in Voxeland and use the same texture or something very similar to blend the new area.
    upload_2017-4-2_18-49-31.png

    I was wondering if using the infinite Voxeland setting is ok to use with the MM nodes workflow. I could potentially add new landscape styles especially with Megasplat but now I'm running out of texture slots - unless MM/Voxeland could be made to re-use texture slots in MM to plug in other generators
     
    Last edited: Apr 3, 2017
  45. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,276
    Sure, Voxeland can work with MapMagic in an infinite mode.
    Could you please describe your issue on the beta issues page? What were your steps and what were the results, and what are those deformations, what are the texture slots (are they block types or VoxelandOutput layers), and how do you know that you are out of "texture slots"?
     
  46. Hurtful-Toad

    Hurtful-Toad

    Joined:
    Feb 18, 2016
    Posts:
    20
    Denis, I sent my bitbucket application yesterday. Just want to make sure you got it as I am very excited about trying this new version
     
  47. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,276
    I always try to provide an access to beta version to every one who submitted a beta form, but, unfortunaately, it;s not aways possible. Repository users count is nearly reached a maximum for my bitbucket plan. I'm thinking about switching to github, where, as far as I can see, there's no limit for the number of private users. Or about dismissing inactive users - but I don't like this approach. Anyways, there's still some room, but I don't know your bitbucket account. Could you please re-submit a form, leaving a comment about a forums post?
     
  48. whatbus2000

    whatbus2000

    Joined:
    Nov 21, 2014
    Posts:
    65
    Hurtful-toad, have u given up on terrainengine in place of voxelland?
     
  49. Coltenney

    Coltenney

    Joined:
    Mar 10, 2015
    Posts:
    25
    Will there be a sweet Voxeland/MapMagic bundle deal when V5 gets relased?!?
     
  50. Pete_1061

    Pete_1061

    Joined:
    Apr 17, 2015
    Posts:
    16
    I'm planning on getting Voxeland soon. A couple questions though.
    How close is version 5 to final?

    And is the terrain infinite in all 3 dimensions?