Search Unity

[uTerrains] Ultimate Terrains - Voxel terrain engine

Discussion in 'Assets and Asset Store' started by Amandin-E, Feb 4, 2016.

  1. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    Thanks for pointing this out! I will definitely look at this.
     
  2. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,294
    So will this work with UNET now?
     
  3. joferjoe

    joferjoe

    Joined:
    Feb 2, 2016
    Posts:
    95
    It could always work with any networking solution

    You just send the json of the edits to everyone playing :)
     
    Amandin-E likes this.
  4. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
  5. nrodemund

    nrodemund

    Joined:
    Sep 15, 2018
    Posts:
    16
    Hi!
    Thanks for the great update! Especially for the greatly increased building speed!

    Some people talk about TextureArrays: actually its easy to use MegaSplat including most features.

    @Amandin-E do you plan to integrate Megasplat Support? Else I can post my mesh processing solution, upgraded to 4.1.

    https://drive.google.com/open?id=187KrFX93zjPLAmp8LVG2P0GyzKHKjbPs (just a screenshot using some default megasplat textures with layering)
     
    Last edited: Oct 22, 2018
    Amandin-E likes this.
  6. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    Thanks for sharing! That would be great if you allow me to include this in the official uTerrains package. Would you agree?
     
  7. nrodemund

    nrodemund

    Joined:
    Sep 15, 2018
    Posts:
    16
    Yes, I'll send it to you this weekend, just need to improve some details
     
    Amandin-E likes this.
  8. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    Ok, thanks!
     
  9. Cywizz

    Cywizz

    Joined:
    Oct 5, 2017
    Posts:
    17
    Hi,
    Does anyone perhaps know of any reason why the asset: A* Pathfinding Project Pro might not work with UT, or of any issues there might be?
    I already invested some time (and money) into A* on normal unity terrains but I now need voxel terrains.
    Thanks!
     
  10. joferjoe

    joferjoe

    Joined:
    Feb 2, 2016
    Posts:
    95
    Ive been trying to get A* pathfinding projects point graph to work with it, but the stutter on scan is really annoying and because i want to use infinate terrains i cant think how to do without rescan every voxel unit movement o_O
     
  11. Cywizz

    Cywizz

    Joined:
    Oct 5, 2017
    Posts:
    17
    Thanks @joferjoe, that is my concern also, however I will have an finite terrain (large)

    I haven't tried it myself yet, but I see that A* does allow you to rescan portions of an area using Bounds, so you don't need to run a full scan every time you change the terrain, so that might help.

    I also see that they have a graph type called Recast, which basically voxalize the terrain and uses that as a navmesh. It will be interesting to see if you can somehow reuse the underlining UT voxel data points to those used by the recast graph somehow? (Just grasping at straws here)
     
  12. joferjoe

    joferjoe

    Joined:
    Feb 2, 2016
    Posts:
    95
    Ooo they both sounds like great ideas :D
     
  13. joferjoe

    joferjoe

    Joined:
    Feb 2, 2016
    Posts:
    95
    I just had a go at recasting and it doesnt seem to even register on the terrain :oops:

    Dunno what im doing wrong but i was really excited for that potentially working o_O
     
  14. Cywizz

    Cywizz

    Joined:
    Oct 5, 2017
    Posts:
    17
    I do not see any reason that it should not work, but I do appreciate you trying @joferjoe.
    I will give it some time and make a decision after doing more research.

    @Amandin-E , this could be a nice feature for UT going forward...integrate the opensource Recast into your asset. It is written in C++ at the moment, but imagine if you can provide a generated navmesh in realtime for the developer to use with your world...just saying ;)
     
    Amandin-E likes this.
  15. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    I agree pathfinder is an important feature.
    I’ll get a look at Recast. I’m also wondering if the Unity’s navmesh can be updated incrementally? If that’s possible that would be a good candidate too as it comes with Unity out of the box.

    As a fallback (or in the meantime) i could probably add a basic A* voxel pathfinder. I’ve already done this by the past on another project and that was quite easy. However it remains basic and miss some important features such as obstacle avoidance.

    Right now I’m focusing on improving the workflow of biomes to make them easier to use (especially for non-coders).
    The pathfinder won’t be in the next update, but this is definitely on the top of the roadmap.
     
    Razmot likes this.
  16. Cywizz

    Cywizz

    Joined:
    Oct 5, 2017
    Posts:
    17
    It does not look like it, based on this. It does rebuild the portion but it compare the source data to make the change...which seems slow to me. I suppose the build in navmesh "might" work with UT finite terrain, depending on the area size but it does lack lower level customization available to you...this is the reason I went for A* Project as you have many options. I believe you might also have options where you create a navmesh in a radius around the player/npc which might be better than a full world scan.

    But, I will research further and play around, thanks for the feedback @Amandin-E!
     
  17. joferjoe

    joferjoe

    Joined:
    Feb 2, 2016
    Posts:
    95
    I cant figure out why the recaster isnt working
    It seems to work fine on anything with a collider, but just ignores all of the terrain o_O
    It seems the perfect tool for the job if i could just get it to detect the floor :confused:
     
  18. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    Are you sure it waits for the terrain to be built? And did you enabled colliders for all LODs?
    Also keep in mind that the pathfinding won’t be very accurate on lower lods (far away) if it just look at the meshes.
     
  19. joferjoe

    joferjoe

    Joined:
    Feb 2, 2016
    Posts:
    95
    im hitting scan after the terrain is built

    ill have another go to check i enabled colliders but im sure i did
     
  20. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    Also chunks are on their own layer (the one defined in global settings). Maybe this is important?
     
  21. joferjoe

    joferjoe

    Joined:
    Feb 2, 2016
    Posts:
    95
    I cant remember where the enable / disable collisions check box is, i thought it was in the global settings but i cant see it o_O
    upload_2018-10-25_16-29-15.png
     
  22. joferjoe

    joferjoe

    Joined:
    Feb 2, 2016
    Posts:
    95
    i cant find the toggle but it must have colliders because i just put a rigid body on the surface and it didnt fall through :)

    and i set the layer to be the same as the graph layer mask and no luck either o_O
     
  23. joferjoe

    joferjoe

    Joined:
    Feb 2, 2016
    Posts:
    95
    upload_2018-10-25_16-39-38.png
    it seems to just ignore it o_O
     
  24. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    Collider enabling isn’t a toggle, it a slider determining which LODs should generate colliders. I can see yours is 4 so that’s good.

    This is so weird it is ignoring it. I mean, they are just normal mesh colliders. Does it scans mesh colliders or only basic shapes (would be very limiting)?
     
  25. Cywizz

    Cywizz

    Joined:
    Oct 5, 2017
    Posts:
    17
    @joferjoe I would check the layer also, as A* uses a layer mask...in your image above I see it is the layer called Terrain...maybe check?

    Try also their Layer grid as that would be my second graph type that will work for voxel terrains, but again, all theoretical as I can't test it myself yet...might be slower though. That is why it would make 100% sense to somehow share the terrain and navmesh data (save on double memory essentially)
     
    Amandin-E likes this.
  26. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    BTW, just to give some fresh news:
    New biome workflow is on the rails. First, 2D generators won’t be global anymore but will belong to their own biome. This allows for better isolation and cleaner configuration. Consequently, IBiomeSelector interface changed a bit.

    There will still be the existing Biome Editor window to configure custom biomes, but there will also be some biome presets with specific editor GUI so they will be much easier to configure. Presets will be for example “Mountains”, “Floating Islands”, etc.

    As always, it’s gonna be very extensible and YOU will be able to create your own presets by implementing some BiomePreset abstract class.

    I hope to see one day someone (other than me) selling some biome presets on the Asset Store! (a bit like Gaia stamps)
    That would be amazing!

    Right after that, I will integrate MegaSplat/MicroSplat thanks to @nrodemund work. Thanks a lot for sharing this!
     
  27. joferjoe

    joferjoe

    Joined:
    Feb 2, 2016
    Posts:
    95
    Im really excited it just keeps getting better and better :D
     
    Amandin-E likes this.
  28. joferjoe

    joferjoe

    Joined:
    Feb 2, 2016
    Posts:
    95
    @Cywizz i toggled all layers on, im not sure why its being weird o_O
     
  29. joferjoe

    joferjoe

    Joined:
    Feb 2, 2016
    Posts:
    95
    @Amandin-E if you do decide to add dynamic path finding to the asset

    By any chance could you sell it as a separate asset so we could maybe use it in other stuff? :D

    There's so many situations where this would be super useful :)
     
  30. nuonical

    nuonical

    Joined:
    Feb 28, 2015
    Posts:
    46
    @Amandin-E Recently picked up uTerrains and having a lot of fun with it. Nice work!

    Is there an easy way to choose which Biome to use when the scene first loads? I tried setting the biome selector at runtime like this :

    Code (CSharp):
    1.  
    2.  
    3.     void Start () {
    4.         terrain = GetComponent<UltimateTerrain>();
    5.  
    6.         gmc = GetComponent<GeneratorModulesComponent>();
    7.         gmc.SetBiomeSelector(new FlatBiomeSelectorSerializable().GetType());
    8.  
    9.         if (terrain.IsStarted) {
    10.             terrain.Pause();
    11.         }
    12.  
    13.         terrain.Reset();
    14.     }
    15.      
    Unfortunately the terrain doesn't reload properly. If I invoke the reset a second or so after it works ok, but this doesn't seem to be the proper way to do this.

    I'm basically trying to pass a variable like "flat" or "mountainous" to my scene and change how the terrain generates based on that variable. Any advice here would be appreciated. Thanks!
     
  31. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    That’s a good idea actually. Just keep in mind it will probably be voxel-based (not mesh-based).

    Thanks for buying! And thanks for the kind words.

    I can’t test it right now but i think it should work if you just do this in Awake instead of Start.
     
  32. joferjoe

    joferjoe

    Joined:
    Feb 2, 2016
    Posts:
    95
  33. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    Who said voxel-based A* pathfinding?

    voxel-pathfinder.png

    Still a lot to do, I don't know if it will be ready for the next update... but it's definitely coming ;)
     
  34. nuonical

    nuonical

    Joined:
    Feb 28, 2015
    Posts:
    46
    Was able to get this working, thanks.
     
    Amandin-E likes this.
  35. Cywizz

    Cywizz

    Joined:
    Oct 5, 2017
    Posts:
    17
    Wow @Amandin-E that was quick! Really interested to see where you take this.
    Are you using the same underlining data source for both pathfinding and voxels? This will save me a lot of memory if I do not have to use a second dedicated path finding asset!

    I also assume that you will update the "navmesh" in realtime as the user change the environment?
     
  36. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    The current implementation is actually very simple. It does not use any in-memory data structure. It just generates the voxels it needs on the fly. It is optimized to compute as few voxels as possible to it's actually fast. The enormous advantage is that there is no "navmesh" that needs to be updated. It is purely dynamic, and consequently it will naturally take into account the tunnels you may dig for example.

    Oh, and it works in 3D (flying agents) but it may be slower.

    I'm still at the beginning of this, but it should not be long to get something releasable. I will provide simple stupid agents that follow the path, but as I said earlier, there probably won't be obstacle avoidance (including any object on the terrain) in the first version. Of course, anyone with programming skills will be able to implement his own agents in the mean time.
     
  37. joferjoe

    joferjoe

    Joined:
    Feb 2, 2016
    Posts:
    95
    @Amandin-E omg you got it working so quick, it looks great :)
    this is perfect thank you so much :D
     
    Amandin-E likes this.
  38. Skellymon

    Skellymon

    Joined:
    Aug 24, 2018
    Posts:
    2
    Hi @Amandin-E I recently purchased your asset and so far its pretty awesome! But I have a question related to the FastNoise plugin. So from my understanding a voxel is only generated at a position if an adjacent voxel has a different sign on it's float value, which is fine for standard perlin or simplex generation but when I try to use SimplexFractal, PerlinFractal, or Cellular generation through FastNoise nothing gets generated. When I output these values it shows that they are only outputting positive values, which results in no voxels. So is there a way around this at all? I've thought about trying to normalize the values outputted to be between -1 and 1 but my couple attempts at that didn't produce very good results. Thanks for the awesome product and I hope you can help me!
     
  39. hlwerschner

    hlwerschner

    Joined:
    Oct 25, 2018
    Posts:
    5
    Hi, I have purchased this asset and follow the documentation for version 4.1 to create a first complete scene. I managed to get a small scene and have added grass but when I should add tress, the docs say that I should add tree object from a standard unity environment package, but for the time now (with version 2018.14f1) I do not see such a package as well as the menu structure seems to have changed from what the docs assume. I also am unable to find a precise documentation of uTerrain which states what type of gameobject is accepted in the scenery -> Trees nodes area under Tree0: ...... field. I seem to be able to insert meshes, armatures (?) and other objects there but : no error messages, just no trees displayed (either in scene or in game play mode). What is causing my problem (except that I am beginner and am weak at guessing out...)
     
  40. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    Thanks for the kind words!
    You’re right about everything. You need to normalize the output to have positive and negative values. It’s not so easy with fractal and cellular noises because values can sometimes be between 0 and 4 for example... Working with noises is really a try-fail-retry process and takes time.

    I'm working on a brand new biome configuration which will hopefully make those tasks easier. BTW, the next version will probably break current way of making biomes so do not spend too much time on this right now!
     
  41. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    Sorry for the outdated doc. I will update it ASAP but many things will be different in the next version so I wanted to wait for it.

    You can actually use any prefab in the trees tab (not necessarily a tree).
    Could you show me your trees tab configuration so I can figure out what is wrong? A screenshot would be perfect.
     
  42. hlwerschner

    hlwerschner

    Joined:
    Oct 25, 2018
    Posts:
    5
    Hi, here is a screen capture of the tree tab. the object "tree02" is taken from the asset "NatureStarter Kit 2" from the asset store. 02-11-_2018_22-58-25.jpg
     
  43. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    This looks good. Have you enabled this tree group in the voxel type(s) on which you want the trees to be spawned?
    You have to select the tree group from the dropdown in voxel type editor.
     
  44. hlwerschner

    hlwerschner

    Joined:
    Oct 25, 2018
    Posts:
    5
    Oh, YES, yes! I have trees and I start to understand more of the working of this software! Thank you very much.
     
    Amandin-E likes this.
  45. Skellymon

    Skellymon

    Joined:
    Aug 24, 2018
    Posts:
    2
    Thanks for the fast response! Is there any ETA on this update?
    It would be awesome if we could custom set the parameters for generating a voxel and setting its type. For example: if the voxel float > 0.5 generate a voxel. I understand if that is just too different to the current workings though.
     
  46. joferjoe

    joferjoe

    Joined:
    Feb 2, 2016
    Posts:
    95
    @Amandin-E hows the path-finding going? :)

    and have you decided if you are releasing as a separate extension asset thing to buy (because id be totally down to give you more money) :D
     
  47. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    Not before the end of the month... probably at the beginning of December. It’s HUGE change, but I think it’s worth it.
    The isovalue will remain at 0, but hopefully it will be easier to work with.

    I had to temporarily stop working on this in order to focus on the new biome configuration system. I will let you know when I’m back at this. And yes i should definitely be able to sell it as a distinct package (which will be less expensive than uTerrains).

    If you want to give me more money I can give you my paypal ahah :D (just joking)
     
    Mohamed-Anis likes this.
  48. joferjoe

    joferjoe

    Joined:
    Feb 2, 2016
    Posts:
    95
    excellent, im really excited for everything :D
     
    Amandin-E likes this.
  49. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    451
    Looks like some big changes are coming...

    node-based-voxel-terrain.png

    This is still the beginning, but it already works and is already very powerful, both in terms of user experience and in terms of performance ;)

    I can already feel how faster this is going to be to achieve what you want. Those who know MapMagic should quickly understand what's going on here BTW.

    You'll be also happy to learn that this way of configuring the biomes allows Ultimate Terrains to automatically optimize the generation flow. Consequently, terrain generation is even faster than before (about 10%).

    As an example, you may have noticed that there are blue nodes and green nodes. A node is blue when its output only depends on X,Z coordinates (aka 2D generator). A node is green when its output depends on X,Y,Z coordinates (aka 3D generators). Ultimate Terrains automatically determines which nodes are blue and which nodes are green.
    Now here is the interesting thing: behind the scene, Ultimate Terrains will be smart enough to compute 2D values only once per X,Z coordinates and cache the result just before it goes in a 3D node. This saves a lot of computation time and again, it's all auto-magic!

    One more thing: hot-reloading has been amazingly improved. You will be able to visualise your configuration changes almost in real-time (well, of course it depends on the complexity of your terrain).
    Just change the frequency or any other parameter of your whatever-noise and see the result right away, in the scene view!

    I still have a lot to do, but the most difficult has been done. Now it's just about improving it.
     
    Razmot likes this.
  50. joferjoe

    joferjoe

    Joined:
    Feb 2, 2016
    Posts:
    95
    This looks great im really excited :D

    Also ive been thinking recently that it might be nice to export the finite terrains as a mesh and load it up in blender and add detail to the cliffs and stuff by hand

    I understand you have a lot on your plate atm, but by any chance do you have any tips on how i could do this?

    Ive never tried to export anything from unity im not even sure if its possible o_O
     
    Last edited: Nov 10, 2018
    P_Jong and Amandin-E like this.