Search Unity

Suggestions for Unity3D Terrain Tech

Discussion in 'General Discussion' started by chadchat, Oct 6, 2011.

  1. chadchat

    chadchat

    Joined:
    Apr 5, 2008
    Posts:
    154
    While using Unity3D as a Terrain Editor over the past 3 years I've collected some thoughts on how the workflow could be improved. It's just basic stuff, nothing too elaborate. I like using unity3D a lot, and some aspects of the Terrain tech are very flexible and good, however it's a forgotten corner of the engine that really needs some attention.

    I work as an Environment Artist in the games industry, and have also taught landscape creation courses at several Universities using Unity3D, so I have some experience in this area.

    I know some of these things have been mentioned in other threads, but I wanted to throw down what I had (I sent a version of this to Aras P almost a year ago after meeting with him at Unite10 to discuss Terrains, but never heard anything of it). I haven't mentioned things like normal/spec Terrain shaders because I'm guessing we'll see them in 3.5. But who knows..!?

    Also I see that some of these ideas are addressed in the new Terrain Mapper plugin, which is great to see, though honestly the type of things I'm mentioning here should be standard with Unity3D, especially if there is a triple AAA push~



    Flatten Brush:
    In my opinion the main thing missing here is a Flatten Brush. The sculpting potential afforded by heightmaps is limited of course being constrained to the vertical axis, however a Flatten Brush caters for a surprising degree of sculpting possibilities, and works hand in hand with a standard raise-lower brush to enable the sculpting of ramps, and therefore winding paths and forms with harder edges. It is currently nearly impossible to sculpt a ramp in Unity3D, so making a road or path is very difficult, and you have very limited control over the forms of mountains and such.

    The Flatten Brush you find in 3D sculpting apps like ZBrush adapts to local normals and in that way are a little different to what you’d have inside Unity3D, but they are essentially the same thing. Vertices are pushed or pulled towards the mid-point of the brush, which has a variable soft border falloff. It is fundamentally different from the current Paint Height Brush in that the height is determined by the position of the brush and is constantly updated as you move the brush over the terrain. The Paint Height brush is static and is only useful for creating a predetermined height.

    If you keep the Flatten Brush in one location long enough, the area under the brush becomes flat. It’s very simple. However by moving the Flatten Brush along a slope you can adjust the angle of the slope. In this way you can create ramps and adjust the form of any slope in the terrain. It’s really where ‘sculpting’ comes into landscape creation.
    Apart from being able to control the degree of falloff, you should also be able to adjust the strength of the brush so that it has a gentle or immediate effect.

    I currently go to the trouble of sending a version of my Terrain into Zbrush to sculpt things I can't do in Unity3D, but if I had a Flatten Brush I wouldn't have to. Here's an explanation of working a Heightmap in ZBrush if anyone's interested.

    Slope Constrained Texture Painting:
    The Terrain Toolkit provides a way to automatically texture the terrain according to slope parameters however it is an overly complicated and constrained approach that is really only effective for laying down 2 initial textures.
    A much simpler and more powerful solution would be to offer the ability to assign a slope parameter to the standard Paint Texture Brush, allowing you to paint inside or outside given values.

    You could pick the height from the terrain itself as you do when using the Pant Height Brush, or by choosing a value using a slider. You would then choose a falloff value and also choose whether to ignore certain textures (in effect locking them so they are not painted over). Finally you start painting the terrain or, via a button, automatically assign the texture to the whole terrain according to the chosen parameters.

    Most terrains will use 4 to 8 textures. There is no need to attempt to assign all of these at once because it only takes a short time to do it manually in the way that I’ve outlined, and you have more control and can iterate as you work.*
    You can also use the functionality to visualize slopes. So say you’ve sculpted a path up a hill with your Flatten Brush, weaving in amongst trees and rocks. Next choose your path texture and assign the slope value that your character is able to walk within, say 0 - 45%. Now paint where you’ve sculpted the path and you’ll see where the path is too steep for the character because that area sloping beyond 45% won’t be painted - a common problem when creating landscapes that characters can freely roam.

    Texture Lock:
    Being able to lock textures so they are not painted over while painting with another texture is very useful, and as I mentioned is useful when used with slope constraints. One of the uses is to quickly paint textures that follow the edge of an existing texture, such darkening the edges of a dirt path, or laying down some dirt at the base of your rock texture.

    Import Splatmaps:
    I realise Tom's Terrain Tools offers this but it should be a default functionality in Unity3D, and should allow a user to lay down a single splatmap layer on existing painting.

    Constraining Height Brush actions to a Texture:
    By this I mean the Height Brush would only affect the areas where the texture is applied, be it the current Raise / Lower Terrain Brush or a Flatten Brush.

    Using this with the texture that you used to create a path means you could very quickly and easily sink the path down slightly into the ground, without needing to carefully work the whole path at great length.

    Alternatively you could quickly raise a snow texture to give the snow some depth. Same thing applies to a rock texture. Assign the rock texture to your Height Brush and simply paint over your rock texture to raise it and give it form. Suddenly your landscape casts shadows according to it’s rocky formations and starts to look much more naturalistic.

    You can also use this functionality to create lakes, rivers or complex raised man-made areas by painting in the shape you want to sculpt the raising or lowering only that texture.

    Fixing the Usefulness of Parameters:
    A major problem when working with Terrains in Unity3D is that the tool values have not been set in a way that makes them useful. For example the Raise / Lower Height Brush has an Opacity setting of 0-100, however 95% of the time a range of only 1-3 is what you want.

    Brush Parameters That Don't Reset Themselves:
    The previous problem is compounded by the fact that your settings aren’t remembered when you leave the tool! So you are constantly having to reset the Brush’s values during your workflow. Really simple to fix, incredibly annoying to work with.

    User Determined Brush Alphas:
    It makes perfect sense to allow users to create their own greyscale shapes for Height and Painting Brushes, just as you might when working in Photoshop. I would never use the existing ‘Star’ shape, but I would love to be able to use my own ‘Noise’ alphas for example.

    Assigning Detail Placement to a Texture:
    Finally, the ability to assign Grass and details to a given texture to determine it’s placement makes a lot of sense in a typical landscape creation workflow. Roughly speaking, when painting Grass (details) onto the terrain, Environment Artists often start by a painting a certain Grass where a certain ground texture is. ‘The bright green Grass goes where the fresh grass ground texture is, the yellower Grass goes where the dry grass ground texture is’. It would be simple enough to make this an automatic function so that working with Grass is more a case of tweaking it to make it feel more natural, rather than painting it from scratch.*
     
    Last edited: Oct 6, 2011
  2. fffMalzbier

    fffMalzbier

    Joined:
    Jun 14, 2011
    Posts:
    3,276
    Very useful thoughts collection!

    If even the half off your suggestion comes to Unity 4.0 the Unity Terrain is doubling the amount of use.

    In addition i think ,a very big problem is the very bad documentation of the terrain engine.
    To find out how to get scripts working with the Terrain is a pain in the a.. .
     
  3. xxxDjdogxxx

    xxxDjdogxxx

    Joined:
    Mar 28, 2011
    Posts:
    751
    Thanks for your thoughts and suggestion, i will read this after school...!
     
  4. DavidDebnar

    DavidDebnar

    Joined:
    Mar 19, 2011
    Posts:
    115
    *bump* I dont want to let whit thread die! Very nice suggestions :)
     
  5. fremachuca

    fremachuca

    Joined:
    Oct 13, 2010
    Posts:
    26
  6. jc_lvngstn

    jc_lvngstn

    Joined:
    Jul 19, 2006
    Posts:
    1,508
    Have they even mentioned anything about updating the terrain system?
     
  7. fffMalzbier

    fffMalzbier

    Joined:
    Jun 14, 2011
    Posts:
    3,276
    @fremachuca: i watched the presentation and I'm thinking the same as you.

    Why the heck is unity terrain does not support thous things like vector displacement or vector based terrain.
     
  8. HolBol

    HolBol

    Joined:
    Feb 9, 2010
    Posts:
    2,887
    I would watch that video but all i get is a REALLY weird noise coming out of my speakers.
     
  9. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,788
    *Bump
    So this thread won't die, All those above are really a great suggestion I hope Unity Tech read this..... *pray
     
  10. Duskling

    Duskling

    Joined:
    Mar 15, 2011
    Posts:
    1,196
    Unity needs to update their terrain system def.

    Please unity!
     
  11. ivanzu

    ivanzu

    Joined:
    Nov 25, 2010
    Posts:
    2,065
    +1
    I think its a bit hard to use if you want to go in details.
     
  12. artzfx

    artzfx

    Joined:
    Apr 28, 2008
    Posts:
    572
    +1 for OP, great features and workflow suggestions. Owning ZBrush and World Machine 2 I am considering adding them into the workflow to build more precise terrains like golf course, landscaping details etc.
     
  13. Demostenes

    Demostenes

    Joined:
    Sep 10, 2010
    Posts:
    1,106
    Chad wrote...

    All these thoughts can be solved by 3rd party tools and actualy it is nothing critical, you can live without it. There are far more important problems:

    -lack of normal and parallax shaders with proper blending (this can move visual quality 3 classes up) + smarter/faster system for grass (volumetric?), various visual tweaks like what can cast shadows, what is animated, decal system, etc....This must be out of box, not done by various hacks
    -each 4 textures are adding extra pass (performance impact)
    -tool for cutting holes (no, scripts on forum does not solve this)
    -fixing of tree collider related crashes
    -and most importnant one, ability to stream terrain and all assets (dynamic load/unload of all resoureces based on visibility)
     
  14. reissgrant

    reissgrant

    Joined:
    Aug 20, 2009
    Posts:
    726
    I have to agree with most of your points. I think they are making some of those improvements in upcoming releases.
     
  15. MichaelSchenck

    MichaelSchenck

    Joined:
    Sep 23, 2011
    Posts:
    49
    I spent a lot of time trying to create a reasonably good quality prototype forest scene by hand and found that these are very valid points. I like the ideas related to constraining/locking textures and relating detail placement and textures. These and some better tuning of parameters would save a lot of time - especially always adjusting the opacity! I hope there is some improvement with the shaders to make the terrain look better. I see this in other games and it looks really amazing. I would love to achieve something like this screenshot or this screenshot. I know this is 90% amazing art, but it does seem like the ground textures pop - as in bump mapping. Anyone know for sure how this fantastic ground is produced?
     
  16. PrimeDerektive

    PrimeDerektive

    Joined:
    Dec 13, 2009
    Posts:
    3,090
    http://forum.unity3d.com/threads/63282-Bump-maps-for-built-in-terrain

    On topic: Has anyone here ever tried the trial for earthsculptor? It's a fun little program. It almost reminds me of sculptris, but restricted to y axis heightmaps like unity and you can export your terrains. It is waaaay more intuitive than Unity's built-in terrain brushes. I swear I have like 7 terrain applications in my toolbox now.
     
    Last edited: Dec 21, 2011
  17. MichaelSchenck

    MichaelSchenck

    Joined:
    Sep 23, 2011
    Posts:
    49
    @legend411 Thanks for the link. That is exactly what I am looking for.

    Anyone know where to get nice terrain textures with bump maps included? All the ones I have don't include any. Also, is there any process/tool anyone knows of that works say with the color or brightness of the colors to make a cheap bump map from an existing texture? Any pointers would be most welcome.

    Also I noticed this post related to the 3.5 preview:

    http://forum.unity3d.com/threads/116484-3.5-First-Impressions?p=777962&viewfull=1#post777962

    Which is about the possibility/speculation of terrain enhancements in 4.0. Unity folks please review this thread regarding those enhancements, whenever they come. There are some great ideas in here.

    I would like to add another issue to that list. I have had trouble with trees getting in the way in an overhead view. I have found a script for hiding objects between the camera and another point (the player in my case) and tried to make it work with the terrain trees but can't seem to do it. They are different than normal instances. This particular issue is a huge stumbling block and the only way that seems possible is to dynamically edit the terrain constantly which is really inefficient and messy. I haven't even tried to see if this will work. So please take this use case into consideration with any terrain work in the future.
     
  18. PrimeDerektive

    PrimeDerektive

    Joined:
    Dec 13, 2009
    Posts:
    3,090
  19. fffMalzbier

    fffMalzbier

    Joined:
    Jun 14, 2011
    Posts:
    3,276
  20. jc_lvngstn

    jc_lvngstn

    Joined:
    Jul 19, 2006
    Posts:
    1,508
    These don't work on the terrain, do they?
     
  21. janpec

    janpec

    Joined:
    Jul 16, 2010
    Posts:
    3,520
    Yep they do.
     
  22. Zaffer

    Zaffer

    Joined:
    Oct 21, 2010
    Posts:
    266
    Hi,

    I started out in 3D with Unity about a year ago and have spent most of that time working on a detailed terrain -- doing my own sculpting -- making rolling hills, river, lake, etc, making my own grass, flowers, trees, rocks. I thought the terrain engine was fabulous and I have been having a ball with it. But just recently, I found out there is a wider world of terrain engines out there and that Unity needs to work on an upgrade -- that Unity terrain 3x is near the end of its life cycle in fact. Here's a quote from aNTeNNa TrEE in another thread on this forum: http://forum.unity3d.com/threads/116484-3.5-First-Impressions/page3

    I do appreciate the need for a new terrain engine in Unity and I am excited by many of the ideas Chad and others have put forward, but I would like to enter my own plea for backward compatibility. (Also discussed here http://forum.unity3d.com/threads/116484-3.5-First-Impressions/page7). I strongly hope that I won't have to start over with the new terrain engine, whenever it comes out. I hope that Unity will make it possible to at least port the old to the new. Thanks for thinking about this Unity.

    Zaffer
     
  23. PrimeDerektive

    PrimeDerektive

    Joined:
    Dec 13, 2009
    Posts:
    3,090
    Zaffer, the new terrain engine will almost certainly still be heightmap/splatmap based, just with a lot more features. Thats all your terrain really consists of, so I would guess you will ultimately be able to export your heightmap/splatmap and reimport it into the new engine (assuming they don't allow conversion, which I surmise they will, irrespective of what joachim said).
     
  24. Zaffer

    Zaffer

    Joined:
    Oct 21, 2010
    Posts:
    266
    Thanks Legend 411,

    But I am thinking not just about the modeled terrain itself and the splatmap, but about all the time I've spent "landscaping," putting in grass, flowers, trees and rocks. Among other things, I have a stone wall with ivy and weeds growing around it. Hope this all will transfer. Thanks.

    Zaffer
     
  25. PrimeDerektive

    PrimeDerektive

    Joined:
    Dec 13, 2009
    Posts:
    3,090
    Ahh... well, terrain details are really just governed by a distribution map . I would bet you could somehow export the distribution map for each detail mesh, but I'm not sure.
     
  26. jc_lvngstn

    jc_lvngstn

    Joined:
    Jul 19, 2006
    Posts:
    1,508
    I'm concerned with certain api features. These features are almost undocumented, but are critical for certain projects.
     
  27. KRGraphics

    KRGraphics

    Joined:
    Jan 5, 2010
    Posts:
    4,467
    The terrain definitely needs an update...and it forces me to use VUE and export my terrain into Zbrush for detailing, and then to unity as a mesh with my own shaders...and they look TONS better... it is a pain to sculpt plateaus...