Search Unity

  1. Click here to see what's on sale for the "Best of Super Sale" on the Asset Store
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

[uTerrains] Ultimate Terrains - Voxel terrain engine

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

  1. OutCyder

    OutCyder

    Joined:
    Mar 19, 2009
    Posts:
    2,178
    OK... so I'll remain waiting for v.4 and see what comes out :)
     
    Amandin-E likes this.
  2. joferjoe

    joferjoe

    Joined:
    Feb 2, 2016
    Posts:
    95
    looking forward to v4 release, how long do you think wait will be roughly now? :D
     
    Amandin-E likes this.
  3. Tegleg

    Tegleg

    Joined:
    Jun 10, 2013
    Posts:
    65
    awesome thank you
     
    Amandin-E likes this.
  4. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    436
    Hard to say. Probably a few more weeks. I know this can seem like a lot to wait, but I do all I can :)
     
  5. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    436
    Some fresh news.
    V4 is almost there. Should be sent for review next week or week after next week.

    It will bring strong performance improvements again, a brand new editor GUI, an improved editor tool as well as some new operations. Haven’t had time to improve biome editor yet.

    After v4, I plan to try to port some part of the algorithm on the GPU to gain performance again. This will be a lot of work but could bring some new opportunities ;)
     
    digiross likes this.
  6. joferjoe

    joferjoe

    Joined:
    Feb 2, 2016
    Posts:
    95
    exciting :D
     
    Amandin-E likes this.
  7. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    436
    Some details about the new Smooth and Sharpen operations.
    I’m glad with the result (will upload some gif to show you). It’s really looking good. However it comes at a cost: I’m using kernel box blur and kernel sharpen to achieve this which requires to compute neighbor voxels of each voxel. This is a lot and will definitely impact performance if over used. To avoid too big negative impact I introduced a parameter to adjust the accuracy of the smoothing/sharpening. It allows me to compute less voxels by compensating with trilinear interpolation. A bit technical, but that might be interesting to some of you.

    In a few words: use these operations carefully :)
     
  8. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    436
    Oh, and what if I tell you that the “mountains” scene now generates the whole terrain in ~1.6s on my MacBook Pro 2014 instead of ~4.8s with version 3.2? (final build, no debug)

    Looks like it’s 3 times faster, isn’t it? :)

    And if we ignore the time taken by initialization to keep only the time taken by pure terrain generation, then it’s 0.8s in v4 and 1.6s in v3.2.

    Looks like even generation by itself is twice as fast ;)
     
    DJ_Design and digiross like this.
  9. OutCyder

    OutCyder

    Joined:
    Mar 19, 2009
    Posts:
    2,178
    Mhhhh this sounds so sweeeeeeet :p:p:p
     
    Amandin-E likes this.
  10. DJ_Design

    DJ_Design

    Joined:
    Mar 14, 2013
    Posts:
    71
    Would it be possible to squeeze in some more combiner examples? i noticed you decided to remove the 2.5d scene or maybe it was never in to begin with, but ya excited to see the performance enhancements :)
     
  11. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    436
    Yes, as several people ask me for this, I will include some new combiners and selectors with example scenes. This will probably affect the release date but it looks like it’s really needed.
     
    DJ_Design likes this.
  12. NightcoreLV

    NightcoreLV

    Joined:
    Feb 26, 2014
    Posts:
    34
  13. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    436
  14. DiscoFever

    DiscoFever

    Joined:
    Nov 16, 2014
    Posts:
    286
    Can I use uTerrain to create low poly style like Astroneer terrains ? Thanks !
     
  15. DJ_Design

    DJ_Design

    Joined:
    Mar 14, 2013
    Posts:
    71
    From what ive seen it's really just dependent on your skills with shaders and scripting modules to work into the pre existing framework, havint played that game but judging by a quick google search it does not seem completely out of the ordinary generation wise.. flat shading should be not a big problem if this isint your first project- then again dev might have better insight.
     
    Amandin-E likes this.
  16. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    436
    As @DJ_Design said, it’s a matter of shader. Ultimate Terrains let’s you use your own materials so if you have some shader for it then that should be good.
     
  17. DiscoFever

    DiscoFever

    Joined:
    Nov 16, 2014
    Posts:
    286
    Thank you both for the answer; i was thinking of using vertex color not textures or shaders. Can you possibly do it ?
     
  18. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    436
    I think you misunderstand the role of a material/shader. Nothing can be rendered without one. That being said, a shader can be very simple and just use vertex colors to render polygons. That’s probably what you want. Such shader is not included in uTerrains but that might not be hard to find one on the internet or on the Asset Store.
     
  19. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    436
    Hi everybody,

    The v4 is almost ready. Just finishing the tests and polishing.

    I will start to update the documentation as soon as I will upload the new version for review, but keep in mind it might not be entirely finished the day the v4 will be out.

    As I said before, there are some breaking changes so get ready to update your scripts. In particular, operations have been reworked. The update of your scripts shouldn’t be long nor difficult, but mandatory.
     
  20. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    436
    Glad to announce version 4.0 has been submitted and is now pending for review! ;)


    Breaking Changes:
    • using doubles instead of floats almost everywhere. As a consequence, I2DGenerator, I3DGenerator, IBiomeSelector and IFinalCombiner interfaces have changed.
    • IOperation interface has changed. YOU WILL HAVE TO UPDATE YOUR OWN SCRIPTS IF YOU ARE COMING FROM VERSION 3.
    • 'Voxel' is now a struct instead of a class. Be careful depending on how you were using it in your own scripts.
    • All previous Operations are deprecated. This includes DigCube, AddCube, DigSphere and AddSphere. They will still be loadable but you should not use them anymore. Use new AxisAlignedCube and Sphere operations instead.
    • Dual Contouring is now performed more rigorously. It preserves sharp angles a lot better, but it might change the look of your terrains compared to older version.

    Fixes:
    • Pool leak leading to useless GC allocation.
    • Tons of minor bugs.

    Improvements:
    • Completely reworked editor GUI.
    • Brand new operations such as Sphere, Smooth, Sharpen, Paint, Additive Sphere, Axis-aligned Cube, Capsule, Cylinder and Parallelepiped.
    • Brand new Terrain Tool Editor to edit the terrain within the scene view as a normal terrain. It is now really efficient and user-friendly.
    • "Hot Reload" button in the Biome tab to quickly see how changes in biome configuration affect the look of your terrain. This is faster than re-generating the terrain from scratch.
    • Globally faster. In particular, the init time has been dramatically reduced.
     
    JBR-games likes this.
  21. RAgnarFrayer

    RAgnarFrayer

    Joined:
    Jul 9, 2017
    Posts:
    6
    Hi there :)

    You mentioned, that with update 4.0 comes transition from floats to doubles and it will be more suitable for planets or similar shapes.

    I would be very interested in some demo or guide/tutorial or piece of code that would accomplish it :)
     
    Last edited: Oct 8, 2018
  22. joferjoe

    joferjoe

    Joined:
    Feb 2, 2016
    Posts:
    95
    im excited :)
     
    Amandin-E likes this.
  23. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    436
    V4 is available on the Asset Store. Happy update! :)

    The "doubles instead of floats" thing allow to handle infinite worlds more easily. As a consequence, making entire universes should be easier. The next update (v4.1) will focus on fix eventual bugs and adding more biomes/generators. I will probably make a planet scene ;)
     
  24. RAgnarFrayer

    RAgnarFrayer

    Joined:
    Jul 9, 2017
    Posts:
    6
    Thank you! :)
     
  25. joferjoe

    joferjoe

    Joined:
    Feb 2, 2016
    Posts:
    95
    ooo planet scene sounds hype :)
     
    Amandin-E likes this.
  26. ProtoPoly

    ProtoPoly

    Joined:
    Jan 5, 2014
    Posts:
    32
    Ultimate Terrains V4 is out, check the asset store.
     
  27. ProtoPoly

    ProtoPoly

    Joined:
    Jan 5, 2014
    Posts:
    32
  28. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    436
  29. Elfinnik159

    Elfinnik159

    Joined:
    Feb 24, 2013
    Posts:
    110
    Hi!
    I have a landscape (500x500, not infinite) that needs to be destructible. I use UT, but distant LODs look very bad, as I build walls that are two voxels thick. I removed the LOD, increased the distance to 10, and it helped. But when I increase the distance to 14, or the vertical distance to 4, strong lags begin when I just move (do not edit).
    How to fix it?
    (scene:flat, v 4.0)
    upload_2018-10-10_17-21-18.png
    Thx
     
  30. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    436
    I tried on my laptop (MacBook Pro mid-2014) with v4.0 and I don't have this issue, so I need more information to help you:
    1. Could you tell me more about your hardware configuration?
    2. What values do you have for "Max ms/frame" and "Max post-building / frame" settings in Global Settings?
    3. Is it better if you disable cache (set "Max LOD with cache" to 0 in Global Settings)?
    4. Does it still happen if you run it from a final build (no debug and no dev mode). Not from Unity's editor.
    5. Finally, could you tell me more about those spikes in the profiler (please PM me with some screenshots showing the details on one of the spikes in the profiler)?

    EDIT: even with "Infinite terrain" enabled, I don't have the issue.
     
  31. Elfinnik159

    Elfinnik159

    Joined:
    Feb 24, 2013
    Posts:
    110
    i7 3770
    16 GB RAM
    GTX 1060 6GB

    2) I tried different: from 3 to 12
    3) No it didn't help
    4) Yes
    5)
    upload_2018-10-10_17-53-55.png
    upload_2018-10-10_17-55-18.png
    upload_2018-10-10_17-58-12.png
     
  32. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    436
    This is really weird. My hardware is a lot worse than yours and your settings looks good, so I don't see why this is happening to you.
    Please, let's continue this conversation in PM to exchange data/builds/packages more easily.
     
  33. Elfinnik159

    Elfinnik159

    Joined:
    Feb 24, 2013
    Posts:
    110
    Continuing to study UT, I came across a problem (maybe a bug, or something I don’t understand): (screenshot)
    upload_2018-10-10_20-35-7.png
    to repeat the bug, you need to: create a medium/large cube, select a small sphere, turn on the dig, start digging. After 3-4 iterations, the cube will either be fully restored, or a bug will appear, as in the screenshot.

    The problem with the standard settings. Repeated everywhere (editor / build)

    UPD:I tried to soften the cube, then repeat the "digging" and got this:
    upload_2018-10-10_20-40-42.png

    UPD 2:
    The same problem if:
    dig up a big cube, start building small ones
    dig up a big sphere, start building small ones
     
    Last edited: Oct 10, 2018
  34. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    436
    @Elfinnik159 thanks for the feedback, this is definitely a bug. I had this bug when I was testing the v4 alpha, and I thought I fixed it but it looks like there are some cases where it's still there. Just disable "Auto-merge operations" and this should be fixed. If you are using PlayerBuilder script, find the line where it adds operations to the OperationsManager and pass "false" as second argument.
     
    Elfinnik159 likes this.
  35. Elfinnik159

    Elfinnik159

    Joined:
    Feb 24, 2013
    Posts:
    110
    Yes, it looks like it helped, thanks
     
    Amandin-E likes this.
  36. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    436
    Good. I will upload the fix asap (v4.1).
     
  37. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    436
    Alright, I've just fixed this one, but figured out there is also a bug related to operations loading (from files). I'm going to fix this as well of course.
     
  38. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    436
    V4.1 will be uploaded at the beginning of next week.

    It will:
    - fix a bug where operations are badly merged
    - fix a bug where operations are loaded multiple times
    - fix a bug when terrain generation is interrupted from the editor tool
    - improve FPS control by ensuring some stuff done on the main thread doesn’t take more than a configurable amount of ms
    - improve handling of specific case where Max LOD count = 1 and terrain is finite (it doesn’t need to be dynamic except for operations)
     
  39. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    436
    V4.1 is now pending for review ;)
     
    DJ_Design likes this.
  40. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    436
    V4.1 is now available. Happy update!
     
    joferjoe and Mohamed-Anis like this.
  41. joferjoe

    joferjoe

    Joined:
    Feb 2, 2016
    Posts:
    95
    I was just thinking last night, this assets come such a long way its so lovely now :D

    the only thing voxel farm really has over this asset now is texture arrays

    And being able to add estimated versions of meshes into the voxel world

    And that costs $300 a year (thousands if you want source code access)

    I know theyre 2 huge features, but if you could manage either one of them i imagine a lot of the small companies that use it would start to jump ship to avoid the yearly fees :)

    (The texture array stuff would probably be the biggest since the biggest limitation to crazy builds and having stuff like ore buried under ground atm is being limited to 4 textures) :D
     
  42. Mohamed-Anis

    Mohamed-Anis

    Joined:
    Jun 14, 2013
    Posts:
    82
    One thing I remember seeing in Voxel Farm is being able to shoot down the foundation of a structure and see the structure falling as in this video:


    And yeah.. having more textures will be nice :)
     
  43. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    436
    Thanks! I feel the same actually. I’m really happy with all the improvements that have been done this year and I’m even happier to see I’m not the only one!

    You mean the ability to have more than 4 or 5 different textures? Could you tell me more about this feature?

    What do you mean by version of meshes? And what is it used for?


    Yes, physics on voxels are quite impressive in Voxelfarm. This is definitely something I’d like to do, but I’m not sure this is doable on the cpu. So first I may have to rewrite a lot of code for the gpu which will take a lot of time, but we’ll see!
     
  44. joferjoe

    joferjoe

    Joined:
    Feb 2, 2016
    Posts:
    95
    @Amandin-E If i remember right they just used texture arrays in the shader and must of had some way of storing the texture id in the voxel data :D

    maybe a nice hack would be to use the vertex colors as you are, but snap their values to ints for texturearray ids? :D

    and i dunno how they do the model to voxel stuff, it feels like magic, but it works great :D

    the models have to be closed so i think its just how the sphere / cube stuff works but using the mesh shape instead

    they turn out simpler then the original model so i think theres some averaging or simplifying geometry happening, or maybe it the voxel density or something?

    could be wrong on all of these assumptions :oops:

    if you did go down the texture path, it would be great if you exposed the logic for determining what type a voxel is for us so we could do cool stuff like "if we shoot a rock we can indent and color with rock indent texture" for example :)

     
  45. joferjoe

    joferjoe

    Joined:
    Feb 2, 2016
    Posts:
    95
    @Amandin-E If i wanted to use the infinate terrain option, what would you recommend doing for the path finding?
     
  46. joferjoe

    joferjoe

    Joined:
    Feb 2, 2016
    Posts:
    95
    I know you can Terrain.Converter.VoxelToUnityPosition to get the closest voxel position from worldspace

    But is there a way to get the size of voxel unit so i can space things by it myself?

    Im gona try and create a grid around my player but i cant find the function :oops:

    Edit: is it (Terrain.Params.SizeXVoxel) (and y and z)?
     
    Last edited: Oct 17, 2018
  47. Snouto

    Snouto

    Joined:
    May 27, 2013
    Posts:
    9
    Hi. I'm considering purchasing this asset but one quick question: is it possible to create worlds that are viewable from the horizontal aspect?
    Take your image here:



    Is it possible to represent this world as if it was a complete cube of voxels, such that if I wanted I could rotate the camera to be looking directly at the Z or X axis (so essentially looking at this world from it's sides) and see the mountains through to the ground rendered in voxels?

    Most solutions I've seen will render nothing when doing this, but I'm looking for a solution that will create a section of world like in the image that can be viewed side-on too, almost as if it had just been cut out of the ground and stuck on a table. Is this possible?

    Thanks :)
     
  48. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    436
    Thanks. First I need to improve my skills on writing shaders (I'm really a beginner on this topic) or find someone who is ready to help.

    Actually someone already got quite good results https://uterrains.com/question/generating-from-mesh/
    I will contact him to see if he agrees to share its work in a way or another. If not, I'll do it myself but that will obviously take a lot more time. In all cases, it prove us that this is doable :)

    That's a very interesting and important question. For now there is nothing built-in. I see two possibilities:
    1. Use NavMesh and figure out how to update it dynamically. I think this is not trivial, but would probably be the most powerful as you could then use all the Nav stuff of Unity.
    2. Or I can add some voxel-A*-path-finding, which I know isn't very complicated and gives good results, but remains very basic (no obstacle avoidance and so on).
    I will definitely make something about this.

    Yes, exactly! :)

    @Snouto I think I see what you want to do, but I'm not sure. Could you make some quick draw/fake screenshot so I can have a better idea of what you'd want?
     
  49. Amandin-E

    Amandin-E

    Joined:
    Feb 4, 2015
    Posts:
    436
    BTW, here is a screenshot of the new demo scene I'm working on (for the playable demo of Ultimate Terrains).

    04.jpg
     
    DJ_Design likes this.
  50. joferjoe

    joferjoe

    Joined:
    Feb 2, 2016
    Posts:
    95
    Amandin-E likes this.
unityunity