Search Unity

Voxeland - Voxel Terrain Tool

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

  1. P_Jong

    P_Jong

    Joined:
    Jun 14, 2017
    Posts:
    58
    @Wright any plans for Voxeland to be updated to be compatible with the light weight render pipeline?
     
  2. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    I would completely delete the Voxeland download from the hidden Unity 5x store folder and start the download fresh. I've had Asset store errors whereby if you press update it will download but then doesn't allow import and other behavior.. it's not just this asset, things happen.. also make sure you have enough hard drive space -I ran into this issue long ago and the asset store download system doesn't warn if you have low space but the download may appear complete.
     
    TalkieTalkie and syscrusher like this.
  3. syscrusher

    syscrusher

    Joined:
    Jul 4, 2015
    Posts:
    1,104
    FWIW -- I have a published asset that I need to update to make it compatible with LWRP and HDRP. I've been actively investigating both of those, and have reluctantly concluded that the APIs just aren't stable enough and documented enough yet for me to make that a high priority. I'll definitely do it, but I wanted to mention here that getting an asset to be compatible with SRP can be a tall order right now. :)

    I don't presume to speak for @Wright at all, but thought I'd share my recent experience working with asset porting to SRP. SRP is a great innovation, but it's still pretty early in its life cycle.
     
    P_Jong likes this.
  4. Victor_cross

    Victor_cross

    Joined:
    Dec 16, 2015
    Posts:
    41
    Wright Is there anyway to say make a voxeland terrain size 30 mountain or boulder that can be used like a object in a mapmagic infinite terrain layout? Just like you would do for say a rock but the players can actually manipulate the vox object.
    And the update worked for me fine.
     
    Last edited: Jul 26, 2018
  5. TalkieTalkie

    TalkieTalkie

    Joined:
    Jul 5, 2012
    Posts:
    123
    Interesting.

    Deleted the asset folder and re-downloaded it. Not getting the "red error" warning I got before, only yellow ones. Those red errors have been popping up since forever for this asset for me, I never realized it was Unity all this time.

    So it seems basically, Unity is F***ing up as usual. Good job Unity.

    Just to be safe, I'll wait for the update before I start using this on my next project. I'll delete the folder and re-download on next update.
     
    P_Jong likes this.
  6. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    In fairness, I've got to notice that I've made some changes on my side to prevent this error. It was a minor change with no version increase, was available on AS since yesterday.

    That's an asset I'm going to make next when I'll deal with MM2. It will be called "Voxelump". It will make 32-units (one Voxeland chunk) voxel objects.

    The reason I'm not diving into LWRP and HDRP and SRP in general is that there's a lot could be changed before it all will settle down. I'm not a retrograde and wish to be on the edge of technology too, but I realize that I can't make Voxeland compatible with each and every upcoming change in SRP modes.
     
    P_Jong and syscrusher like this.
  7. syscrusher

    syscrusher

    Joined:
    Jul 4, 2015
    Posts:
    1,104
    I still think you should call it "Voxelith", from the Greek word "lithos" for "stone" or "rock". "Lump" sounds so icky. :)

    On a more serious note, when you develop the lump/lithos version, please provide a nice workflow for generating voxel objects that can easily export as standard meshes for reuse elsewhere without Voxel* code being required at runtime (assuming no runtime editing). This could make a really useful asteroid or rock generator. :)
     
    Last edited: Jul 26, 2018
  8. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    I will definitely make the feature to save Unity mesh to asset file, but can't promise fbx parser since it's slightly out of scope of this asset.
     
  9. TalkieTalkie

    TalkieTalkie

    Joined:
    Jul 5, 2012
    Posts:
    123
    Now that the asset is working for me, I am messing around with it (finally).

    So, does the 3D infinite terrain works like World Streamer? Allowing us to create large seamless worlds? Or is it different than that?

    Any video on this subject?
     
    P_Jong likes this.
  10. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    If you could do this for Voxeland I'd be so grateful although I am already. If individual chunks are generated as asset files I could use a 3d party streamer easily with a teleport portal system which I need.
     
  11. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    Yes, it can create "infinite" (limited with int precision) terrains. Voxeland and WorldStreamer are different in the way they get the source to build worlds: Voxeland does not load anything, it's keeping voxel block data (that is relatively compact) in memory.

    You can use a simple script to save the selected object's mesh to asset file:
    Code (CSharp):
    1. public static class SaveAssetClass
    2. {
    3.     public static void SaveAsset (UnityEngine.Object asset)
    4.     {
    5.         string savePath = UnityEditor.EditorUtility.SaveFilePanel(
    6.                     "Save Data as Unity Asset",
    7.                     "Assets",
    8.                     "Asset",
    9.                     "asset");
    10.         if (savePath!=null && savePath.Length!=0)
    11.         {
    12.             savePath = savePath.Replace(Application.dataPath, "Assets");
    13.  
    14.             UnityEditor.AssetDatabase.CreateAsset(asset, savePath);
    15.             UnityEditor.AssetDatabase.SaveAssets();
    16.         }
    17.     }
    18.  
    19.     [MenuItem ("Edit/Save Mesh")]
    20.     static void SaveMesh ()
    21.     {
    22.         MeshFilter filter = Selection.activeGameObject.GetComponent<MeshFilter>();
    23.         SaveAsset(filter.sharedMesh);
    24.     }
    25. }
    Click Edit > Save Mesh
     
  12. TalkieTalkie

    TalkieTalkie

    Joined:
    Jul 5, 2012
    Posts:
    123

    So basically, we can create a game like Skyrim using Voxeland? Does that mean one scene can basically be whole game since the infinite terrain can be pretty large (not that anyone would realistically do anything crazy with it).

    I don't want to create Skyrim but I would definitely like to use large areas in my game with Voxeland. Is there a proper tutorial video showing a test project (like Skyrim for example)? Cause I'm not sure how object placement will work if the terrain underneath disappears outside current camera view (will the objects just appear floating?)
     
  13. sultanbutt

    sultanbutt

    Joined:
    Jan 22, 2018
    Posts:
    1
    is it mobile optimized? Does it cause lag on android devices?
     
  14. raijogamer0909

    raijogamer0909

    Joined:
    Apr 17, 2018
    Posts:
    5
    is this Compatible with GAIA ?
     
  15. crimsonmortis

    crimsonmortis

    Joined:
    Feb 21, 2016
    Posts:
    63
    don't think so but works with Map Magic.
     
    P_Jong likes this.
  16. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    Yes, you can create terrains of this size using Voxeland.

    All of the objects are bound to the Voxeland chunk - when chunk is destroyed the objects are destroyed too. The drawback is that you can't see the distant landmarks this way - but they could be placed manually and be always visible (within camera range).

    You can try evaluation version to see if Voxeland is compatible with your target platform. Relatively small terrains should work fine, so it's worth trying to fiddle with eval to find out the terrain size / performance ratio.

    That's right.
     
    TalkieTalkie likes this.
  17. GamePowerNetwork

    GamePowerNetwork

    Joined:
    Sep 23, 2012
    Posts:
    257
    Well, I'm still going to give Voxeland a 5 star rating on the asset store because it does perform great and it is relatively easy to use.. but sadly I think it was a waste of money for me, only because I thought I could get smoother terrain with it.

    Right now the terrain is really lumpy and even using the demo scene character controller, the camera bounces and shakes while walking across the ground. If there was a way to smooth the terrain even more, this asset would've been perfect for my needs.

    PS: Or maybe I'm just not understanding how to get a smoother looking terrain.
     
    Last edited: Aug 3, 2018
  18. TalkieTalkie

    TalkieTalkie

    Joined:
    Jul 5, 2012
    Posts:
    123
    Nice. Any tricks or tips on how to display distant landmarks or terrain without making it disappear for the player?

    Maybe a really low quality distant terrain with DOF hiding the low details. I guess we can always hide distant areas by creating large mountains to obscure view. There is always fog to mask it further. Hmm..

    Anyway, gonna mess around with it. Finally going to use this instead of letting it sit around in store page. :p
     
  19. Adamantius

    Adamantius

    Joined:
    Apr 28, 2014
    Posts:
    7
    I'm sorry if this has been asked before but I couldn't find the answer while searching the thread. Is it possible to procedurally place objects inside caves using Voxeland with mapmagic together?
     
    JasonCG likes this.
  20. JasonCG

    JasonCG

    Joined:
    Oct 6, 2012
    Posts:
    29
    Are you using it with MapMagic? I was getting really bumpy terrain for quite a while and I finally figured out it was because if you "Add" multiple Voxeland layers with the same noise generator it amplifies small amount of noise.

    You'd be able to tell if that's the cause because if you turn on one layer at a time they'd look smooth, but then when you start turning all of them on you'd get these ugly bumps. Another way to see it is to turn Voxeland's relax settings down to 0 (to make it look blocky Minecraft style). The bumps in my case were typically two or more blocks stacked on top of each other in in otherwise flat terrain.

    The solution for me was to use multiple Noise generators with different "Seed" and "Detail" values (so that small amounts of noise to add up together and get amplified), and use paint or clamp append in some cases where I didn't need to strictly add blocks to increase altitude.

    So now I have terrain with lots of noise at large scales, but smooth at small scales.
     
    camta005 likes this.
  21. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    Have you tried increasing the relax iterations value?
    1:
    NonSmooth.jpg

    10:
    Smooth.jpg

    Recently got a similar question from Jason in MM thread.

    Using MapMagic to place objects inside the caves is tricky. MM was designed to work in 2.5D, it can hardly be used as a cave generator. Probably you will need a custom objects generator for that.

    If you have "relative height" feature enabled in Voxeland Objects Output then objects will be placed using the final terrain heightmap, which does not include caves. Disabling this feature will make them use absolute position, which is 0 by default. You can write a custom node that will lift the objects to the caves level (using the height maps from step 3 or 4), but still I don't know how to remove the objects that are scattered in the places where there are no caves.

    Speaking of terrain - that's exactly what Voxeland's horizon mesh feature was made for - displaying the terrain in a distance. And speaking of objects on this terrain - you can place large landmarks like huge castles or other buildings with LODs the usual way with no Voxeland involved. This way they will always be visible within the LOD or camera view range.
     
  22. JasonCG

    JasonCG

    Joined:
    Oct 6, 2012
    Posts:
    29
    I'm not sure if this is the best way of doing it and I haven't fully tested it yet, but it seems to work.

    https://gist.github.com/jasoncg/e253f3ddc6488f378ccf13d91ca939d6
    upload_2018-8-11_14-51-17.png

    Basically I modified the VoxelandObjectsOutput generator Layer to have three inputs:

    1. The original Objects input
    2. A new heightInput (InoutType.Map)
    3. A new inputMask (InoutType.Map)

    To make things a bit cleaner I also added an enum that replaces Layer.relativeHeight with an enum that can be "Base" (was relativeHeight==false), "RelativeHeight" (was relativeHeight==true), or "Absolute". In Absolute mode it enables the new inputs. I also changed it so rather than showing all the Voxeland objects in the GUI, it has a list that can be modified just like the VoxelandOutput generator.

    Next to remove the scatter objects I use the inputMask.If the mask is 0, I skip that object position (the input mask is treated as 0 for do not place, and not zero for place).

    Finally I changed the objHeight calculation to work based on the new enum. For Base and RelativeHeight modes there isn't a difference, but in Absolute mode it checks heightInput to get the actual height.

    Again, it seems to work, but I haven't fully tested it yet.
     
    camta005 likes this.
  23. sgower

    sgower

    Joined:
    Mar 9, 2015
    Posts:
    316
    Hi, I'm sometimes seeing uneven lighting between chunks.

    upload_2018-8-11_19-51-34.png

    Is seems the difference is that some chunks are not being lit by ambient light. So if I turn off my scene lights, but keep ambient light on, I see this:


    upload_2018-8-11_19-53-2.png

    Have any ideas? I tried comparing the lit and unlit chunks in the explorer, but didn't see any obvious differences that would explain this.
     
  24. sgower

    sgower

    Joined:
    Mar 9, 2015
    Posts:
    316
    Also, when I click on my Texture Array (generated with an older version of Voxeland), all the textures show with "No Source". These textures still are working, but I believe these should be listed as having a Source. Any idea what would cause this?

    upload_2018-8-11_20-8-31.png


    Also, have you given more thought to switching the generation to use the new unity Job system?
     
  25. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    Try increasing the ambient margins. But for the complex shapes like this one I'd like to recommend turning ambient occlusion off. The lower levels of this structure will be filled with black anyways, so if your game use a first or third person view consider disabling occlusion.

    No wonder textures still work - in Texture Array mode Voxeland does not use your textures directly. It uses a special texture named "texture array" instead, that is generated from source textures in editor. Initial feature version used a slightly different approach of storing the source links, so updated version does not see the sources - you have to re-assign them.

    Voxeland already uses multithreading, is there any reason to remove the compatibility with the older Unity versions and switch to Jobs System?
     
  26. Ramsdal

    Ramsdal

    Joined:
    Oct 18, 2013
    Posts:
    251
    Hi @Wright
    Any news on the simplified shader possibilities?
     
    ChillyMcChill likes this.
  27. Adamantius

    Adamantius

    Joined:
    Apr 28, 2014
    Posts:
    7
    Hi Jason, I've tried the new generator but I'm getting a few errors in console:

    https://gyazo.com/c4bd91ccfadeb21d74d6e274d96af9c7

    I'm using Unity 5.6 so that's probably the reason.
     
  28. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    @Wright if I make changes in the texture array inspector to an array that is currently setup with Voxeland (relabled landblock names) what happens after updating? will it automatically add the new blocks to Voxeland? or would I have to re-add the texture array to Voxeland for the new landblocks to be added?

    My situation is that I have a large texture array with custom names and settings already setup in Voxeland and the lanscape mostly painted but I only need Voxeland to add/update only the new blocks rather than adding them all again.. am I forced with re-adding the array and deleting most of the blocks that are already added? or does the texture array inspector force Voxeland to add new/changed blocks?
    -----------------------------------------------------------
    Also I just updated to the latest Unity 2018.2.4f1 and I keep getting the error message:
    MissingReferenceException: The variable loMesh of Chunk doesn't exist anymore.
    You probably need to reassign the loMesh variable of the 'Chunk' script in the inspector.
    Voxeland5.Chunk.Switch (System.Single distance) (at Assets/Voxeland/Main/Chunk.cs:285)
    Voxeland5.Voxeland.Update () (at Assets/Voxeland/Voxeland.cs:301)
     
    Last edited: Aug 19, 2018
  29. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    Still no ETA on this, yet it's not even enlisted in plans, sorry. It's more like an idea, but I'm going to implement it if users (or potential users) will find it interesting to put it in a row with MicroSplat compatibility and others.

    No, new blocks will not be added, Voxeland will still use the same number of blocks, although the array count is larger.

    Does it remain after pressing Rebuild?
     
  30. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    If it's possible and not much of a hassle for you I hope you can add some kind of "force/add new blocks to Voxeland" if changes are done/added in your texture array inspector.

    And yes, the error remains after pressing Rebuild.. it actually doesn't rebuild anymore but I did open Voxeland in a new project and it works fine.. I just wish I didn't have to copy all the assets to a new project's asset folder for the new Unity version.. this is the only way I know how to resolve conflicts with upgrading.
     
  31. LucidNonsense

    LucidNonsense

    Joined:
    Dec 12, 2017
    Posts:
    2
    Hello,

    I'm looking to extend Voxeland with some custom generation code. I was wondering if you had any suggestions on best practices for extending your asset, I was hoping to not have to touch any of your code directly and I could wrap, extend or use partial classes to add my own behavior (this way its easier for me to update when you update Voxeland). I've taken a look at your Generation code and it doesn't seem to have a way for me to effect it without changing your code directly.

    As a suggestion, you could create an interface that each of your Generator types implement (probably just needs the Generate method) and then you can have a Custom type in the drop down in the Editor inspector with a field that accepts any type that implements your interface that would inject my custom generator into the tool so it could be used.

    It looks like one of your primary design goals was to keep things centralized in as few source files as possible. And since you've given me no extension points to your framework, I'm forced to go into your source to make changes and the structure is not conductive to easy understanding or extending. I feel like the architecture of your project should either have a way to inject new behavior (like the above example) or you need to spread things out to more source files, I don't want to have to merge a thousand line source file when you update because I had to make changes to it.
     
  32. neighborlee

    neighborlee

    Joined:
    Jan 26, 2016
    Posts:
    50
    prefab ramps are one thing, though I'm not sure where to find them,- but even so,helpful though they are, they are static meshes, which look terrible given organic ones like UE4's offering where the ramp created looks as if it was always there, is absent in unitys offering...I refuse to pay for a ramp tool when something like uE4's SHOULD have been included, after all this time.

    I feel like this is just another way to exact money from those who least can afford it. Just bc we are making 'games', being devs, just mean we're all created equal- some of us struggle and even $5 -$10 is way too much. Laugh those whom are tempted to but it doesn't change the fact , unity should include a , simple if nothing else, ramp tool that makes the ramp PART of the terrain, not separate. Artists like myself are very fussy about things like that ;)

    I see no way unless I've missed something and its been awhile since I"ve bee using unity so-- to make a ramp using current built in tools and have it the precise 'slopping' angle you want.
     
  33. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    Texture array inspector is encapsulated from Voxeland. I can hook adding block to events, but it wouldn't be very straightforward. What if Voxeland object is in the other, not loaded scene? What if you don't want to add blocks to Voxeland objects? It's really better use Voxeland to add Voxeland blocks.

    When I was making Voxeland v3 or so I was looking for the way to extend generators too. It all ended up in creating a node interface and then gave birth for MapMagic World Generator. I don't want to impose it, in some cases it could really be an overkill, but using MM is the most convenient way to extend Voxeland's generators.

    neighborlee, guess this post should go there, right?
     
  34. ChillyMcChill

    ChillyMcChill

    Joined:
    Nov 17, 2016
    Posts:
    57
    Hello, when I try to add an object to the object blocks section I get these errors. What could be the issue? I am using unity 2017.4.6f1

    Also how can I keep trees from sticking out the terrain and floating in the air?

    Much thanks <3 voxhalp.PNG
     
  35. LucidNonsense

    LucidNonsense

    Joined:
    Dec 12, 2017
    Posts:
    2
    I don't want to extend your generators I want to replace them with my own (actually I'm looking at generating non-terrain structures so I don't think MM would be a good fit). What if I buy MM but then run into the same problem where I want to extend the behavior but I don't have a hook to do that?

    In Voxeland I see where the hook is for MM's generator, all I'm asking for is to make that an interface and let me set my own Class that implements that interface as the generator. That would let me drop in new generation code but use the rest of your engine/tool as is without touching any of your code. (Actually I could almost get this to work just by manually setting the MapMagic define symbol and then implementing the MM interface, however there is a bunch of other editor integration with MM I'd have to fake to get it to compile and this would lock me out of ever using MM on the project).
     
  36. Gruguir

    Gruguir

    Joined:
    Nov 30, 2010
    Posts:
    340
    I finally bought it after evaluation of the demo version.
    I would have a lot of questions but will try to stay concise for now, and i've ran into several bugs/issues (one being MM not detecting Voxeland), but i'm confident and really impressed by the asset.
    I would love to get more info / examples about the scripting part (for instance creating a terrain by script).
    That would also be a good example, i assume you would have to move the tree one block lower ? As destroying grass if it is not anymore on a grass block. Also i would need infos pointing toward stamp features, would it be possible to place pre-made stamp by scripts ? I may sound a little lazy, and could certainly answer some questions myself by starting really getting my hands on the code, still this is quite intimidating at start.
     
    ChillyMcChill likes this.
  37. ChillyMcChill

    ChillyMcChill

    Joined:
    Nov 17, 2016
    Posts:
    57

    I updated to the latest and no more errors.

    As for trees, I use infinite generated terrain so moving trees down manually is not an ideal solution : (
     
  38. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    NP, I can add generator interface. Feel free to contact me via skype so we could discuss what interface methods and properties you would like to see and what else should be changed in Voxeland code (preferably text messages now).

    Adding tutorial on using Data.cs in my to-do list, but I can't promise it soon.

    Just wanted to ask your Voxeland version since line 1564 of Layout.cs seems to be pointing to the empty line :)

    What's happening with the trees? Note that like all the objects placed on inclined terrain they should have a model going a bit underground (about half of a block).
    If you mean that they are remaining in the air after you have digged under them then it's an expected behavior - any block remains on the same place - Voxeland doesn't know if you have a tree or an object that shouldn't move.
     
  39. erpatton

    erpatton

    Joined:
    Oct 6, 2014
    Posts:
    55
    I did some searching, and I'm sure I missed this, but how the heck do you paint different block types? I've got 2 land blocks right now; One for rock, and another for grass.

    The rock was what I added first, so it shows up as the material for all of the area. When I click on the grass block in the Land Blocks section and then try to paint that on, it just adds more of the rock.



    If I switch the Texture Arrays on, it shows the grass, but it looks odd.



    Am I missing something here?
     
  40. Gruguir

    Gruguir

    Joined:
    Nov 30, 2010
    Posts:
    340
    @erpatton i encountered once the same issue(/bug?) while texture array off.
    @AyyliensRule About floating tree : - i thought that object blocks were stored as regular data block, but they are returning void blocks if i'm correct. (edit : nope i'm lost with blockType usage) - So i simply move a cube upon an aimed block :
    Code (CSharp):
    1. landObjectsDetector.position = new Vector3(aimCoord.center.x, aimCoord.center.y+1, aimCoord.center.z);
    I'm making a simple script to trigger collision and move the detected object according to voxeland edit mode etc..
     
    Last edited: Aug 27, 2018
  41. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    You're missing a normal map for texture array shader. Try assigning any valid normal for all of the blocks, that should fix it.
    However it's a mystery to me why the grass is displaying yellow on the first screen. Are you using the demo textures?
     
  42. erpatton

    erpatton

    Joined:
    Oct 6, 2014
    Posts:
    55
    The grass isn't displaying yellow on the first screen; It isn't showing up at all. That's just the brush overlay. I'm not wanting to use texture arrays, I was just showing that it isn't showing the grass at all without texture arrays turned on, and I'm wanting to know if there's some fix for that. My game doesn't use normal maps for the art style, so I'd like to avoid having to use texture arrays if they require one.
     
  43. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    @Wright will Voxelump work along with Voxeland? I was thinking that it might be a great solution for Voxeland physics! it can be that mesh that people want to fall over if it were pillars and crumble(saved to obj with position and fractured with 3rd party asset).. each sculpted lump/clay may be instanced as an independent object with physics but can utilize the same texture array and position -(setting the area/size the same as Voxeland) and then objects could blend and be disabled/unloaded via trigger and replaced with the fractured model. I know someone made a post here a while ago about taking out chunks in real time and replacing it with a particle effect.. that's good.. especially if you can set up a different falling/scatter debris animation type via the angle of the mesh normal. Anyway I hope you can now consider adding physics -maybe voxelump if hit can explode into many smaller independent instanced voxelumps and scatter out from the main voxelump normal.
     
    Last edited: Aug 28, 2018
  44. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    Just downloaded the eval, seems to be a fairly old version. Fixing up the Texture2DArray stuff makes it run on 2018. Thanks for having an eval, very nice especially when you never know what you will get with this type of asset.

    Performance seems pretty good and shaders look to be fine for what we need.

    Our game has a lot of islands, so I'm curious how well the LOD works viewing from a distance say from a boat on the water. Looks like it would take some work to set that up to test so hoping someone has some feedback on that.

    Main question is how will it fit our planned workflow. Which is we start with a small set of base maps with very little detail, then take modular hand crafted meshes and place them over the base terrain and then deform the terrain to those meshes. Are there height based api's for this type of thing? Or would that be straight forward to create from what api's exist?

    In similar fashion we would want to create some custom runtime brushes.

    Data structures. We would want to record changes to be replayed locally or over the network. Is this straight forward?

    GC allocation. I'm seeing a small amount per frame in the editor. Does that go away in builds?

    Does it work with IL2CPP?
     
  45. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    I noticed you can save and load it all at once. How much work to do that incrementally? This would be a hard requirement for us. As long as we could tweak the code without too much trouble to get there that works.
     
  46. Adam_Starcaster

    Adam_Starcaster

    Joined:
    Dec 7, 2012
    Posts:
    37
    Any Chance of HDRP support?
     
    P_Jong likes this.
  47. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    Voxeland uses the diffuse alpha channel for the height blend. While using texture arrays you can combine diffuse with height automatically on texture array creation, but for the legacy shader the textures are used directly. Try filling grass's texture alpha with gray (or copy GreenGrass_hgt texture to alpha), that should "elevate" grass layer for the shader and make it visible.

    Most probably Voxelumps will be used for the Voxeland chunks. This will give code design flexibility, but I'm not expecting such an advanced features like automatic detaching of floating blocks in separate voxelump chunks, let alone exploding in smaller voxelumps with physics.

    As I see it, you can convert meshes to some sort of heightmap (using raycast every unit, maybe?) called Voxeland5.Matrix. Treat Matrix as a 2-dimentional array of floats, each for one block height. You can create Matrix using
    new Voxeland5.Matrix( new Voxeland5.CoordRect(0,0,mySizeX,mySizeZ));
    and set heights using the [] operator:
    myMatrix[x,z] = 42;

    Once the Matrix is created, you can append it to voxel terrain using
    myVoxelandData.AddLayer (Matrix thicknessMatrix, int type)
    where type is the the block type number (cliff, grass, etc). Once done call
    myVoxeland.Rebuild();
    to apply changes to meshes.

    You can use a custom voxeland controller to record all the changes user makes before calling Alter, creating a queue of altered coordinates, edit modes and time deltas passed from the previous edits (if you want to replay with a timeline). And then re-play the changes by calling alter from script.

    Garbage collector is the thing on it's own, if you know what I mean. It can increase the amount of used memory gradually, but then clear it at once - when os decides to do so. I'm testing each Voxeland release for memory leaks, if it is what you are concerning about. The other thing you might be concerned is GC spikes - and I'm trying my best to minimize them like re-using arrays and using structs where they should be used. But I have (almost) no control over the garbage collector, hopefully it works the way it should.

    Voxeland works with both scripting backends, mono and il2cpp

    I'll surely add a special shaders for HDRP when the things will settle up a bit. HDRP is still in beta mode, and I've got no resources to make Voxeland compatible with each and all (or users will complain about compatibility) change in render pipeline. I'm going to add HDRP support when it's finally released.
     
    Adam_Starcaster and P_Jong like this.
  48. snacktime

    snacktime

    Joined:
    Apr 15, 2013
    Posts:
    3,356
    Thanks for the answers. One more question.

    The feature in question is creating livable underground areas by removing volumes that fit a specific grid layout and use flat surfaces. Cubes, ramps, etc..

    So le'ts start with the simplest version which if that works everything else should. A 3d grid of 1x cubes where the center of each is a floored position. This would all be subtractive against existing terrain. Imagine the cubes as bounds and it just removes voxels within that bounds.

    Which actually leads to what the ideal api would be. A brush based on a bounds that just subtracts everything within the bounds.
     
  49. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    2,277
    It's possible. Use Matrix3 - it's the same as Matrix, but in 3D space. Matrix3 should be all filled Data.emptyByte values except places where the cubes are (cube positions should be filled with block type number). Then use
    data.SetMatrix (matrix, pin:true);
    to set the matrix, then rebuild.
     
  50. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    @Wright so the Voxelump concept is going to replace how Voxeland works or compliment it? If it replaces it will current landscapes we've generated not be compatible?