Search Unity

Voxeland - Voxel Terrain Tool

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

  1. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    @Wright I tried making max limited terrain and I get the following error:
    Failed setting triangles. Some indices are referencing out of bounds vertices. IndexCount: 419304, VertexCount: 0
    UnityEngine.Mesh:set_triangles(Int32[])
    Voxeland.Chunk:ApplyTerrain() (at Assets/Voxeland/Scripts/Main/Chunk.cs:1477)
    Voxeland.VoxelandTerrain:Display() (at Assets/Voxeland/Scripts/VoxelandTerrain.cs:676)
    Voxeland.VoxelandTerrain:Update() (at Assets/Voxeland/Scripts/VoxelandTerrain.cs:361

    I'm using Unity 5.4.1f1 When it generates it shows the bounds higher than where the terrain is actually located.

    I wanted to make it max size then bake it all later as meshes once areas are refined with sculpting and more texture-painting. In the end I'm hoping to use world streamer.
     
  2. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,680
    laurentlavigne, currently I have no plans for adding pathfinding.

    RangePlusOne, does it logs any error in the console?

    neoshaman, I plan stamp tool for the upcoming version. And I have a plans for creating lite version of Voxeland, that will use only one chunk and will be purely a modelling tool - it looks like the use case you described. Voxeland uses a singleton pattern, this means that there could not be several Voxeland objects in one scene, and it could not be saved as a prefab.

    Ascensi, it could be one of the two things: either your chunk size is too big, or you've got too high walls on the edges. Try reducing the overall terrain height. In the next version I'll make the edge walls switchable.
     
  3. Smokas

    Smokas

    Joined:
    Mar 7, 2016
    Posts:
    115
    Good :) Already have MM, going to buy Voxeland now.
     
  4. guidoponzini

    guidoponzini

    Joined:
    Oct 4, 2015
    Posts:
    55
    +1 for InfiniGrass support! :) I bought Voxeland yesterday with 24h Sales, and it looks amazing from the demo. I think I will use it soon! :) i was looking for a Voxel solition for digging simulations and this one looks the best :)
     
  5. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    @Wright thanks for the tip I'll test changing the the chunk and wall size. About our new shader for Voxeland 5 by any chance will it have the ability for tessellation and displacement or will Voxeland 5 now be compatible with other terrain shaders the same way how Unity terrain will accept many third party terrain shaders? I have experimented with the Asset Landscape Auto Texture which has allowed me to use 6 tessellated displacement textures on a unity terrain. It takes textures that have the color and depth/height combined then another texture that has smooth, spec and AO combined. Anyway it's a good light concept I hope you can create some kind of tessellated displacement feature or become compatible with third party shaders.

    Also a request for Voxeland 5
    If you still use the label "dynamic build" to help make it more intuitive/clear please consider renaming it to "Dynamic Show" or "Camera Distance Culling" -build is to create/build.
     
    Last edited: Oct 15, 2016
  6. MakeGames2

    MakeGames2

    Joined:
    May 23, 2016
    Posts:
    82
    I picked this up during the sale and am going to have to get MapMagic eventually too since it looks great. I already have Terrain Composer and Gaia but I really want players to be able to edit the terrain and I'm not sure how to link them with Voxeland yet if that's even possible and so MapMagic seems like a great solution so I don't have to do it myself. I'm excited about that upcoming integration.

    For now I just want to figure out how to make it so players can explore infinite, procedurally generated terrain and be able to edit it sort of like Minecraft, though not with blocks of course. Pretty excited to figure it all out. I tried so far and couldn't figure out how to get the grass and trees spawning properly, it seemed to spawn way, way too many so I don't know what I did wrong there and maybe that's where MapMagic will come in.

    I also had the same issues with the demo scene as RangePlusOne did. I'm using Unity 5.3.6p7.

    This one twice when I first load the scene after Unity starts:
    IndexOutOfRangeException: Array index is out of range.
    Voxeland.Matrix2`1[Voxeland.Chunk].get_Item (Int32 x, Int32 z) (at Assets/Voxeland/Scripts/Main/Matrix.cs:26)
    Voxeland.Visualizer.Visualize () (at Assets/Voxeland/Scripts/Main/Visualizer.cs:47)
    Voxeland.VoxelandTerrain.OnDrawGizmos () (at Assets/Voxeland/Scripts/VoxelandTerrain.cs:1051)
    UnityEditor.DockArea:OnGUI()

    This one 3 times when I press play:
    Invalid editor window UnityEditor.FallbackEditorWindow
    UnityEditor.EditorApplicationLayout:FinalizePlaymodeLayout()

    I can also make more errors appear when clicking the Voxeland object and trying to turn Debug on:
    NullReferenceException: Object reference not set to an instance of an object
    Voxeland.VoxelandEditor.OnSceneGUI () (at Assets/Voxeland/Scripts/Editor/VoxelandEditor.cs:59)
    System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)
    Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
    System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232)
    System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115)
    UnityEditor.SceneView.CallOnSceneGUI () (at C:/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:2056)
    UnityEditor.SceneView.HandleSelectionAndOnSceneGUI () (at C:/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:1405)
    UnityEditor.SceneView.OnGUI () (at C:/buildslave/unity/build/Editor/Mono/SceneView/SceneView.cs:1242)
    System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222)

    Edit: It seems like maybe the issue is that the data setting isn't set properly for some reason. I'm not sure what to do exactly but I will see if I can figure something out. At any rate, the rest of the things in the demo scene still helped me figure things out what I was doing wrong with grass and trees so now I'm just going to work on integrating it with Inventory Pro and see if I can add a shovel so they can dig tunnels and collect dirt and so forth into their inventory. Woohoo!
     
    Last edited: Oct 15, 2016
  7. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    2,524
    So how do we do dynamic pathfinding on this?
     
    Nateply likes this.
  8. RangePlusOne

    RangePlusOne

    Joined:
    Dec 6, 2014
    Posts:
    123
    Anyone know how to bake a navigation path when grass/foliage is placed?? Grass acts like a static mesh for me killing any chance to have AI move around... no idea why?

    Also, any solution to prevent the terrain from reloading each time I start and stop the scenes?


    I'm using Tactical AI, and it seems the AI sees me right through the Terrain, is there anything special about this VoxelTerrain that I need to know about to make sure they treat the terrain as an obstacle? You can see a GIF here of the AI shooting at me when I'm behind the rock cover. https://i.gyazo.com/08a4bc818c7b919a90f41c0d4f7ec5cb.gif
     
    Last edited: Oct 15, 2016
    emperor12321 likes this.
  9. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    I don't know how well it would work but maybe attach a script to your plants as a node/path and integrate your ai to include obstacle avoidance which I believe uses raycast to detect collisions. I'm no pro at this but might be a simple way to do it. You might need to attach a script to Voxeland itself that destroys your projectiles.. but if there is another standard way that works better I'd like to know too ;)


     
  10. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    5,072
    I'm seeing the exact same problem - the whole center of the terrain is missing.

    Has anyone a fix for this?
     
  11. libra34567

    libra34567

    Joined:
    Apr 5, 2014
    Posts:
    32
    Hi sir, i just saw your asset on asset store, and i got one question before i can decide to buy or not. Would it be easy for me to modify your asset in order to generate astroid field?

    Or if not, is there any recommendation on where should i start after i bought it?
    Thank you.
     
    Last edited: Oct 16, 2016
  12. MakeGames2

    MakeGames2

    Joined:
    May 23, 2016
    Posts:
    82
    I discovered that the data asset is missing under the Voxeland object settings. I was able to partially fix it by creating a new data asset and using it which I did by making a new Voxeland Terrain object in the scene hierarchy and saving the data asset and then placing it into the spot where the other one should be. However there was still a space missing for some reason which wouldn't generate and I didn't bother trying to fix it any further, I just made my own terrain in my scene using the parameters found in the Voxeland object within the demo scene and it seems fine so far.
     
  13. emperor12321

    emperor12321

    Joined:
    Jun 21, 2015
    Posts:
    50
    I'm having trouble changing the block type in game (scene). Can select a tree and it still builds a cliff (or whatever I had selected in editor. Anyone else see this in the demo?
     
  14. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    5,072
    Yes, I was able to recreate the data object to get the missing terrain. Now I see the same thing you are - no matter what is selected, it always makes the rock blocks.
     
    emperor12321 likes this.
  15. crazymonkay

    crazymonkay

    Joined:
    Apr 1, 2013
    Posts:
    115
    Hello,

    I am definitely very interested in this asset, but there is one thing i'm wondering.

    How well-suited is this for editing the terrain in-game? This video from Planet Coaster is a good example of what I'm talking about. If this can work similarly to this than this is a must-buy for me.

    Thanks!
     
    RangePlusOne likes this.
  16. RangePlusOne

    RangePlusOne

    Joined:
    Dec 6, 2014
    Posts:
    123
    I'd like to know too... I bought it but I can only edit in the Scene mode, not in Game mode, or at least the changes I make don't save?
     
  17. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    Just getting back to you on the error. yes it seems the higher I make the terrain area size the lower I have to set the chunk number. If you mean switchable ie; lock the correct chunk values for each corresponding terrain size I'm all for it! I've lost many terrains experimenting.. I guess we can't really jump back and forth between limited and unlimited and terrain sizes? I've done that and my blocks/texture area and generator settings have disappeared.
    It would be handy to save generator settings and texture blocks separately so we can make templates.. but also it's confusing to save as a txt and voxelanddata I would ultimately like the program to have "save points" after so many paint strokes or sculpting and maybe keep a backup of the land before that new save.

    The height was also set to max, I wanted a massive terrain size.. but it seems the chunk size was the culprit.
    Ascensi, it could be one of the two things: either your chunk size is too big, or you've got too high walls on the edges. Try reducing the overall terrain height. In the next version I'll make the edge walls switchable.[/QUOTE]
     
  18. Player7

    Player7

    Joined:
    Oct 21, 2015
    Posts:
    1,535
    eeh i missed the flash sale oh well unity should sort out there site to show countdown timer on those things.

    anyway i was going to ask some questions seeing as there isn't a whole lot of info on this or a demo (exe not abondoned unityplayer)

    what are the future plans for this? I see mapmagic integration anything else?
    is there a max number of textures you can use for blocks that are integrated into the smooth gen.. like take 7daystodie, they have multiple block types sand,dirt,grass etc etc various other ore types.. is this voxel implementation limited to certain number of textures?
     
  19. MrIconic

    MrIconic

    Joined:
    Apr 5, 2013
    Posts:
    182
    In a dynamic setup any ideas how to make chunks load less aggressively? Since right now if I move in the scene view when chunks are loading it's very harsh (low performance). This is evident when moving from one location to another.

    My reasoning is the harsh loading is fine in-game when there's a loading screen. However, in the editor when I'm trying to survey a small area to get an overview of how to design the immediate area Voxeland still is loading chunks I don't even need causing the editor to struggle. This becomes increasingly bothersome for me since if the character (for any reason) moves relatively fast compared to walking they'll likely be hit with a similar issue even though the loading land is still far away.

    Therefore, is there perhaps a way to make the loading more passive? As in, it will take less cpu completing tasks overtime rather than as fast as possible?

    Edit: I increased the remove size to be about 9x the build size and I moved around to load everything nearby. This at least made it less bothersome to move around editing an area. However, then I realized every time either in-game or in-editor moving between chunks caused a huge fps drop for a brief moment.
    Looking in the profiler it showed this
     
    Last edited: Oct 17, 2016
  20. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,680
    I cannot promise tessellation in the upcoming version, but the chance that I'll do it later is high. Standard Unity terrain shaders are not applicable to Voxeland - since it uses the standard meshes it's better mesh shaders like RTP Standalone ones.

    I think "Dynamic Generate" would be okay.

    I've tried to set up a default navmesh for a project I've made a year or two ago, but it seems to be generated using the graphical mesh instead of collider. As long as your model appearance is rather simple everything seems to be okay, but using real game models instead of prototypes turns out in hell. If Unity is still using mesh renderers to generate navmesh instead of colliders then the only thing I can recommend is turning off Navigation Static flag for grass mesh.

    Bake it to scene using a button in Import and Export foldout. However, this will disable Voxeland component, making terrain non-infinite and not editable.

    Does it logs any error to the console? Does the same happens in a terrain created from scratch?

    Does this happens in editor or in demo scene playmode only? In the last case it's the problem with demo controller, it will be fixed for the next version (or maybe I will release quickfix patch earlier).

    I plan to release a sort of lite Voxeland version - it will have only one chunk and no generators included, but will have the ability to be saved as a prefab. It will be would be fine for creating stones, cliffs - and asteroids.

    Voxeland could be edited in playmode. Not the same way as in the video, however.
    Playmode editing is done using the same algorithm as in the editor - all edits from this video could be done in game, but you will have to set up the block type and brush size from your game ui with scripting.

    You can turn on the Playmode Edit in settings, or use a custom Voxeland controller like VoxelandController.cs from the demo.
    Date edited in a playmode could be serialized by converting to byte[] using Data.SaveToByteList and Data.LoadFromByteList functions.

    Besides the MMWG integration I plan to
    - increase the chunk generate performance;
    - make it multi-threaded;
    - more compact data;
    - use DX11 shader batching for chunks to reduce draw calls;
    - new height-blended shader with 32 channels per chunk for DX11, 7 channels per chunk for other platforms.
    So it's hard to say what will remain from the old Voxeland rather than say what will be changed :)

    I will make a make a chunk build/generate in editor feature switchable the same way it is done for playmode build/generate. And will add a button to create chunks at current camera position on demand.
     
    Last edited: Oct 17, 2016
    MrIconic likes this.
  21. Shockwolf

    Shockwolf

    Joined:
    Oct 11, 2016
    Posts:
    12
    Hello,

    I'm interested in purchasing something like this. I'm after something similar to what the game "7 Days to Die" has in terms of being able to mine and build with the terrain as a first person perspective player and this looks pretty similar.

    Are the scripts easily accessible/open source and commented, so I can edit them or pinch code to make it work with other assets/systems? Like for example getting the voxeland brush to be integrated with the characters inventory and correspond with appropriate equipped item. So like, if they equip dirt can I script the brush to place dirt and if the player equips say, a pickaxe, they can then remove terrain.

    Also, is it possible to get the terrain generator to generate random caves here and there?

    And when setting up more blocks and/or custom blocks, will they be included in the random generated terrain?

    Thanks.
     
    Ahdaymz likes this.
  22. TravisE

    TravisE

    Joined:
    Dec 11, 2013
    Posts:
    1
    First and foremost, thanks for such an awesome asset! The default textures look fantastic, would you consider including more? They are very professional looking!

    On a side note, for those who've mentioned that when creating a new block, it was always stone, same for me, when they wanted grass; I took a quick stab at the code and changed one line of code in the VoxelandController.cs file, roughly at line 130 and I changed:

    land.SetBlocks(coord, (byte)land.selected, extend:0, spherify:false, mode:editMode);

    To:

    land.SetBlocks(coord, (byte)selectedTool, extend:0, spherify:false, mode:editMode);

    Note that this doesn't work for the trees.
     
  23. Blackbox514

    Blackbox514

    Joined:
    Apr 8, 2016
    Posts:
    19
    Any news regarding the mac retina bug with the cursor offset?

    Can you point me to a source file I could modify the cursor offsets myself?

    Thanks.
     
  24. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    5,072
    edit: Yes, it does appear to be working in the scene, now that I know what to do. :)
     
    Last edited: Oct 18, 2016
  25. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    5,072
    Now that it's working for me I have a couple of questions.

    Is there a way to speed up the workflow? Selecting a single block and clicking to add one at a time is quite time consuming. Is there a way to say place a primitive in the scene (cube, sphere, cone, cylinder, etc), position them, and them "fill them" with the selected voxel type?
     
  26. MakeGames2

    MakeGames2

    Joined:
    May 23, 2016
    Posts:
    82
    I know there's supposed to be some functions you can use, check at the bottom of the docs page under Most useful scripting functions: http://www.denispahunov.ru/voxeland/doc.html
     
  27. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,680
    You can increase the brush size, it will paint cube, or, if Spherify is turned on, sphere stamps.

    Blackbox514, VoxelandTerran.cs, lines 1067-1070 inclusive, instead of
    Code (CSharp):
    1.             //finding aiming ray
    2.             Vector2 mousePos = Event.current.mousePosition;
    3.             mousePos.y = Screen.height - mousePos.y - 40;
    4.             aimRay = UnityEditor.SceneView.lastActiveSceneView.camera.ScreenPointToRay(mousePos);
    should be
    Code (CSharp):
    1.             //finding aiming ray
    2.             Vector2 mousePos = Event.current.mousePosition;
    3.             mousePos = new Vector2(mousePos.x/sceneview.camera.pixelWidth, 1-mousePos.y/sceneview.camera.pixelHeight);
    4.             aimRay = UnityEditor.SceneView.lastActiveSceneView.camera.ViewportPointToRay(mousePos);
    I have not tested it on retina displays though, so I cannot tell for sure if this works.
     
  28. Reiika

    Reiika

    Joined:
    Jul 18, 2015
    Posts:
    43
    Hey wright,

    Great job on the work done so far, I am curious on the timeframe of the next update with Voxelland, I would love to use it in my project and I am curious to know when we can expect improvements such as the speed of chuck generation and multithreading abilities!
     
  29. Blackbox514

    Blackbox514

    Joined:
    Apr 8, 2016
    Posts:
    19
    Thanks for trying this, but the bad news is that in Editor mode the cursor is still offset by what seems to be the same amount, give or take a few pixels. The good news is that I just noticed that the cursor appears to be working properly in game mode!

    That being said, I did fiddle with the editor mode code snippet you provided and got it to work as follows:
    Code (CSharp):
    1.             //finding aiming ray
    2.             Vector2 mousePos = Event.current.mousePosition;
    3.             aimRay = UnityEditor.SceneView.lastActiveSceneView.camera.ScreenPointToRay(mousePos);
    4.             mousePos = new Vector2(mousePos.x/sceneview.camera.pixelWidth, .5f-mousePos.y/sceneview.camera.pixelHeight);
    5.             mousePos.x *= 2.0f;
    6.             mousePos.y *= 2.0f;
    I can't guarantee the math is bulletproof, but I did test it in fullscreen editor mode as well as in a smaller viewport and it now appears to work as intended on my Macbook Pro Retina. Hopefully this will help you find a proper solution that will work for everyone.

    Cheers!
     
  30. Blackbox514

    Blackbox514

    Joined:
    Apr 8, 2016
    Posts:
    19
    Hi,

    Good job! I'm curious what were your starting values for Chunk size, Area size and Fill size?

    Also, is there anything stopping you from rotating the island along one or more axes?
    [EDIT2] Oops. I just noticed post #891 and Wright says that although you can scale and move a Voxeland object, you can NOT rotate it. Hmmm... I wonder why that is?

    [EDIT] How were you able to make the island "spherical" with the cool lumpy bottom? After fiddling around with the settings and brushes, all I'm able to get is a bumpy squarish napkin shape and am unable to achieve a "boulder" effect. Is there something obvious I'm missing?

    -Y
     
    Last edited: Oct 19, 2016
  31. Ahdaymz

    Ahdaymz

    Joined:
    Oct 18, 2016
    Posts:
    1
    Two questions about my intended application:
    1. Does this tool have functionality to support seed based terrain generation of a fixed (but large) size?
    2. How easy is it to customize the algorithm/s that generate the terrain to design specific features (caves, cliffs, trenches, Unity GameObjects) and control their frequency and positions in the terrain?
    Sorry if these questions have been answered elsewhere. (Is there a thread specific search that I'm missing on these forums?) Thanks in advance for your help.
     
    Nateply likes this.
  32. trd99

    trd99

    Joined:
    Dec 27, 2013
    Posts:
    13
    I was trying to get more than 8 textures to work on the terrain and noticed some odd things happening before reaching the 8 limit in the default shader. So I noticed my 7th texture started to look funky, like it was blended with another. Saw the same for my 8th.

    File is "Standard.shader" from v4.32 directly from the asset store.

    Code (CSharp):
    1.             //albedo
    2.             fixed4 color = GetTriplanarColor(_MainTex, IN.worldPos*_Tile, directions) * IN.uv_Tex1.x;
    3.             fixed4 color2 = GetTriplanarColor(_MainTex2, IN.worldPos*_Tile2, directions) * IN.uv_Tex1.y;
    4.             fixed4 color3 = GetTriplanarColor(_MainTex3, IN.worldPos*_Tile3, directions) * IN.uv2_Tex2.x;
    5.             fixed4 color4 = GetTriplanarColor(_MainTex4, IN.worldPos*_Tile4, directions) * IN.uv2_Tex2.y;
    6.             fixed4 albedo = color*_Color + color2*_Color2 + color3*_Color3 + color4*_Color4; //getting albedo per-channel to use it's alpha in specular
    7.            
    8.             #if _8CH
    9.             fixed4 color5 = GetTriplanarColor(_MainTex5, IN.worldPos*_Tile5, directions) * IN.uv3_Tex3.x;
    10.             fixed4 color6 = GetTriplanarColor(_MainTex6, IN.worldPos*_Tile6, directions) * IN.uv3_Tex3.y;
    11.             fixed4 color7 = GetTriplanarColor(_MainTex5, IN.worldPos*_Tile7, directions) * IN.uv4_Tex4.x;
    12.             fixed4 color8 = GetTriplanarColor(_MainTex6, IN.worldPos*_Tile8, directions) * IN.uv4_Tex4.y;
    13.             albedo += color5*_Color5 + color6*_Color6 + color7*_Color7 + color8*_Color8;
    14.             #endif
    I think that the lines for color7 and color8 should be changed to reflect the desired textures. I am admittedly weak on shaders.
     
  33. MrIconic

    MrIconic

    Joined:
    Apr 5, 2013
    Posts:
    182
    Have you encountered this happened?

    I think it happens around the "Glen" generator areas.



     
  34. RangePlusOne

    RangePlusOne

    Joined:
    Dec 6, 2014
    Posts:
    123
    I'm also encountering problems with the terrain having some super black areas/spots? Looking for any tips or suggestions on how to fix... I've tried baking, but the baking never finishes. Please assist! Thanks.

     
  35. SkandYxyz

    SkandYxyz

    Joined:
    Mar 13, 2015
    Posts:
    48
    Hey,

    first, Voxeland is a great voxel terrain engine itself and especially because it is maintained furthermore ( I hope ;) ).The only thing that bothers me at the moment is the behaviour you can see in blueberry's image above. You can see steps when it comes to nearly flat terrain. I tryed to tesselate and smooth it with rtp and also scaled the terrain to half, but the steps remain. It would be cool, if the mesh would be applied smoother around the voxels. Is this possible?

    Thx
     
  36. Shockwolf

    Shockwolf

    Joined:
    Oct 11, 2016
    Posts:
    12
    @Wright,

    Over 2 days, I've just spent many hours trawling through this forum trying to find my answers. I can see that many questions have been asked and answered many times over and over again. I truly think we would all benefit from a FAQ? Yourself especially! :) I'm suggesting you edit/place it in your original post on the first page, so that we can all see what's been asked and answered. That should prevent this forum from bloating up with any more unnecessary repetitive posts and save people like me that actually took the time to trawl through it, many hours of our lives, when we could be developing... and so could you instead of answering the same questions. Just a suggestion. :)

    So from what I can gather, this is not a suitable terrain tool if we want to make an in game destructible/building/mining environment like Minecraft or 7 Days to Die. I get this impression because of the following (Correct me if I am wrong on these):

    · It cannot Generate Caves or anything Subterranean for that matter.

    · Generation is completely random and does not have any configurable algorithms, which rules out strategic placement of patches of Ore, just as one example.

    · Performance Issues plague the Game Mode when generating/loading and unloading and editing the world.

    · Is limited to 8 textures/terrain block types per area/chunk.

    I get the impression that your intentions for Voxeland was to only be a Voxel based terrain crafting tool for Devs to create static terrains, rather than generating in-game proper Voxel concave and convex environments that includes things like caves and overhangs?

    Even so Voxeland still a very impressive project. Well done.

    Regards,

    SW
     
  37. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,680
    I think it will take a couple of months.

    Blackbox514, thnaks for the hint with mouse pointer positioning!

    It can generate seed based terrain - both limited and infinite, but for working with large terrains it's better use the infinite mode, limiting player's movement with scripts or colliders.

    As Shockwolf already mentioned, Voxeland is mostly a terrain engine, so it has not got a lot of features for land generation. I've got the other asset that is focused on that called MapMagic, and I plan to integrate both assets together to bring MM generate features to Voxeland.

    Do you mean a terrace look? Note that Voxeland has a block structure - same as Minecraft, and terraces is the only way to create height gradients.

    This is caused by ambient occlusion emulation. You turn it off in settings - or try increasing fade value.

    Yes, I suppose you are right. I think I'll attend to it soon.
     
    Shockwolf likes this.
  38. RangePlusOne

    RangePlusOne

    Joined:
    Dec 6, 2014
    Posts:
    123
    Not to sound like a tooootal newbie, where do I see that? I'm looking in all the menu options and windows? Any tips would be really appreciated.
     
  39. MrIconic

    MrIconic

    Joined:
    Apr 5, 2013
    Posts:
    182
    Do you mean a terrace look? Note that Voxeland has a block structure - same as Minecraft, and terraces is the only way to create height gradients.[/QUOTE]

    Oh. Was hoping to get an effect similar to the noise mountain/certain hills. They're really smooth. So it looks weird when hills have an extreme terrace effect.
     
    Last edited: Oct 25, 2016
  40. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,680
    Hey, wait a minute: what is the reason to modify mousePos when the aimRay is already calculated? Will it work the same way without the last three lines?

    RangePlusOne, here it is:
    AmbientOcclusion.gif
     
    RangePlusOne likes this.
  41. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    2,524
    @Wright you still haven't replied to my question: how do we do navigation on your voxel terrain when it's being changed?
    You are not planning to support astar from your voxel structure so you must have a solution for that.
     
  42. Blackbox514

    Blackbox514

    Joined:
    Apr 8, 2016
    Posts:
    19
    Oops, I forgot to include the line below which was a duplicate of the line where aimRay was calculated above. Here is the snippet in all it's glory.

    Code (CSharp):
    1.             //finding aiming ray
    2.             Vector2 mousePos = Event.current.mousePosition;
    3.  
    4.             mousePos = new Vector2(mousePos.x/sceneview.camera.pixelWidth, .5f-mousePos.y/sceneview.camera.pixelHeight);
    5.             mousePos.x *= 2.0f;
    6.             mousePos.y *= 2.0f;
    7.            
    8.             aimRay = UnityEditor.SceneView.lastActiveSceneView.camera.ViewportPointToRay(mousePos);
    9.            
    10.             //setting current camera position as aiming ray origin
    11.             aimRay.origin = UnityEditor.SceneView.lastActiveSceneView.camera.transform.position;
     
  43. RangePlusOne

    RangePlusOne

    Joined:
    Dec 6, 2014
    Posts:
    123
  44. MrIconic

    MrIconic

    Joined:
    Apr 5, 2013
    Posts:
    182
    Is there any further Voxeland updates or is there no more until the Voxeland-MapMagic merge?

    I did find a difference in performance when I did the following things:

    Note: My hardware is maybe mid-range so that could also cause a performance difference that is less visible for others.

    (Editor)
    If I have the voxeland terrain selected while I'm moving (and the script enabled) the performance is as low as ever possible. As in almost unusable while and soon after moving short distances.

    If the voxeland terrain is not selected and I move it is a lot better. Not perfect, but it's no longer unusable. (I think it might have something to do with the GUI updating the counter? Dunno, just saw something in profiler.)

    If I disable the "Voxeland Terrain (Script)" attached to the "Voxeland" object the performance is relatively perfect. I wish I could figure out how to have that performance without disabling the script. (I saw the same performance as with post mesh conversion just with unloaded areas ex. broken terrain stitchings)
     
    Last edited: Oct 28, 2016
  45. Wright

    Wright

    Joined:
    Feb 26, 2013
    Posts:
    1,680
    laurentlavigne, Voxeland does not has a built-in pathfinding system. In my own Voxeland-based project I'm using the simple pathfinding actions that can get around some obstacles, but surely cannot find an exit from a maze.

    Blackbox514, it seems that I've sorted that out - this should work both on pc and macbooks pro:
    Code (CSharp):
    1. //finding aiming ray
    2. Vector2 mousePos = Event.current.mousePosition;
    3. mousePos = new Vector2(mousePos.x/sceneview.camera.pixelWidth, mousePos.y/sceneview.camera.pixelHeight);
    4. #if UNITY_5_4_OR_NEWER    
    5. mousePos *= EditorGUIUtility.pixelsPerPoint;
    6. #endif
    7. mousePos.y = 1 - mousePos.y;
    8. aimRay = UnityEditor.SceneView.lastActiveSceneView.camera.ViewportPointToRay(mousePos);
    9.  
    Could you please check if this code works?

    Blueberry, probably I will release a beta version of Voxeland5 that could be downloaded by all Voxeland users. Inter alia, it will have a greatly increased performance.

    If you disable Voxeland object you will turn off it's chunk generating, so I guess this is the thing that reduce performance. Try wait for generating all of the chunks after the playmode start, it will take some time but after the chunks are generated the performance should be the same as if Voxeland component is turned off.
     
  46. RangePlusOne

    RangePlusOne

    Joined:
    Dec 6, 2014
    Posts:
    123
    Hey Wright, I made this quick lil video to show my problem. Any ideas?
     
  47. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    5,072
    The demo terrain is borked - it's missing the data object. create a new terrain, and the on the old terrain, select the data from the new terrain, and delete the new terrain.
     
    RangePlusOne likes this.
  48. RangePlusOne

    RangePlusOne

    Joined:
    Dec 6, 2014
    Posts:
    123
    Thanks!! Though the controller is still messed, I can't move in the demo scene :( However I can use my Realistic FPS prefab, edit in game, shoot the ground and edit as I go. It's much faster than what it was before. Now if I could change textures on the fly that would be great!
     
  49. Ascensi

    Ascensi

    Joined:
    Sep 7, 2013
    Posts:
    579
    @Wright is there still an obj exporter somewhere or was that only in an older Voxeland? I don't need to export the map...although it would be awesome if it created a big splat texture.

    Also is there some method you can add/upgrade for erosion for the higher settings that can make terraces, then overhangs, holes cut into sides of cliffs and with even higher settings would penetrate and make caves?
     

    Attached Files:

    Last edited: Oct 31, 2016
  50. magicbananna

    magicbananna

    Joined:
    May 9, 2013
    Posts:
    21
    Basically for that mate I Used a large sphere then made it smaller for detail. I swapped bertween large and big with both cube and sphere.
     
unityunity