Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Will Unity 4 have new Terrain Features?!

Discussion in 'General Discussion' started by brilliantgames, Jun 18, 2012.

  1. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,770
    Predicting the future is hard, as we have learned ourselves multiple times.

    But yes, we are aware that our terrain engine tools are a bit, well, 2007.
     
  2. botumys

    botumys

    Joined:
    Apr 16, 2009
    Posts:
    707
    Even there is no big changes in 4.0 for the terrain system, it would be great to work a bit on "small" modifications:

    - Brush settings : keep settings associate to the tool used.
    ex:
    - I use a brush size of 3 and opacity 5 in the raise/lower tool
    -I switch to paint textures tool, set brush size to 10 and opacity to 100
    -When returning to raise/lower tool, it could be great to retrieve old values (3 and 5)

    Brushes images
    add a pick file texture to set a custom brush shape.

    Brushes tools
    Give the possibility to rotate the brush.

    Drag drop based sculpting tool
    Click on the terrain with left mouse button and change height by moving the mouse up and down. Finish the action by releasing the mouse button.

    Slope tool
    Click to set first position on the terrain, without releasing the mouse button, drag a line to a second position, when releasing mouse button, unity create a slope from point A to point B.

    Change the opacity influence in raise and lower tool
    By sculpting a lot of terrains, I know that when you want to be precise, you have to set opacity value to 1 or 2, I never used 100%. For
    me the range value is not set properly.

    Give the possibility to use bigger brush size
    Sometimes 100% is not enough, to raise a part of the world a bit, it's hard to do that with actual max brush size.
     
  3. TylerPerry

    TylerPerry

    Joined:
    May 29, 2011
    Posts:
    5,577
    Should post it in the WIP section :)
     
  4. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    No but I'm one of those who read every single post on the now 1000+ thread including comments from Aras and others who know it. But I might need to word stuff more lawyer style leaving enough interpretation room to be 100% accurate in being unprecise ;)

    and I agree, that DX11 rendering is there is nice :)
    How much it changes will have to be seen at least out of my view though for those not into shader development and scientific math if the 'out of the box magic' does not make it into 4.0, cause Unity 3.5 already has HDR rendering and alike, thats not new with DX11, just likely 'smoother' and with less headache.
    The tradeoff is that what we have now (and will keep getting in 4.0 through fallback to my understanding) is that it works on OSX too, not just on a Win Vista system+ with a DX11 card (which my GTX 280 in my desktop for example isn't while my Radeon 6k series gpu in my mbp is of no use either as Apple is not on OpenGL 4 either and Unity does not seem to be interested fight the nightmare of vendor specific extensions to get something halfway working on OSX 10.7 + OpenGL 3.2)

    To me as tech nerdie with a CUDA history I'm looking much more into the informations related compute shader usability, would be a reason to push the overdue desktop upgrade towards a GTX 670
     
    Last edited: Jun 20, 2012
  5. janpec

    janpec

    Joined:
    Jul 16, 2010
    Posts:
    3,520

    If you are developing terrain for mobile games you shouldnt worry too much. You have all you need, this thread is for sure meant more or less for PC development only. For IOS terrain you can easily use custom made mesh, actually it is far cheaper becouse you have full control to create less detailed terrain, for texturing you can use vertex shader painter from Asset store, which works without any problems and allows 4 different textures. Since you are on IOS i believe you will use really small number of trees which can all be positioned by hand.
    The real problem is that none of this can be used for some huge outdoor scenes on PC.


    Since this is DX11 related, i am wondering does renderer (visually) changes anything if using DX11? Without DX11 shaders are there any improvement on lighting or colors, or is this already different area? What is rendering speed gain when using DX11 in %?
     
  6. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,770
    Well, if you keep on using the same shaders, then DX11 better render exactly the same colors as on DX9 or OpenGL. Otherwise the DX11 rendering is wrong.
     
  7. jc_lvngstn

    jc_lvngstn

    Joined:
    Jul 19, 2006
    Posts:
    1,508
    How will dx11 benefit the terrain engine?
    If it somehow improves performance, thats good news.
    But, will we still need to roll our own for more advanced terrain features?
     
  8. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Haha, interesting point. :p
     
  9. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    DX11 in HAWX 2 (c.2010) should start 34 seconds in.



    or better still...



    drool!

    Aras you have your work cut out for you, good luck!
     
    Last edited: Jun 20, 2012
  10. lmbarns

    lmbarns

    Joined:
    Jul 14, 2011
    Posts:
    1,628
  11. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
    His later one is amazing especially when he zooms out of the planet.

    Mind you I did manage to make this with Unity 3.5.

     
  12. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    One time I got bored and started making the continent of Africa/Europe with the unity terrain editor..

     
  13. Florian Schmoldt

    Florian Schmoldt

    Joined:
    Jun 19, 2012
    Posts:
    18
  14. Frednaar

    Frednaar

    Joined:
    Apr 18, 2010
    Posts:
    153
    for creating terrains in Unity you can also use Grome Editor
    http://www.quadsoftware.com/

    In the tutorials there's an Unity export sample you can download and test
     
  15. Florian Schmoldt

    Florian Schmoldt

    Joined:
    Jun 19, 2012
    Posts:
    18
    Thanks. I'll give it a try. So far I'm quite happy with GeoControl and even managed to carry some flows, snow etc into a custom splatmap via terrain edge
    Looks pretty cool so far but the total lack of foreground detail is disapointing.

    I've tried a couple of 3rd party normal map terrain shaders but most of them failed to recreate the missing terrain tangent in the shader ...if I got that right. I'm not a tech guy :)
    My only question would be, if there will be a tangent in, at least 4.x, to make one of those hacks a stable solution for the normal map issue.
    I think that question aims at Aras?
     
  16. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,770
    Whoa whoa, why the large font? :)

    Anyway. I think it should be possible to do those "terrain normal mapping hacks" in 3.x without any "missing tangent" errors. If some of the shaders you've tried don't do it properly, that does not mean it can't be done.

    What will come in the whole 4.x line is hard to predict, and I don't want to promise anything (because S*** always happens). But yes, we are aware that terrain normal mapping is a highly wanted feature.
     
  17. Florian Schmoldt

    Florian Schmoldt

    Joined:
    Jun 19, 2012
    Posts:
    18
    Sorry, I didn't want to shout at you. Just make sure, you don't miss it :) Thanks a lot for the answer.

    Yes, I've already seen a couple of small, working examples and tried scripts and replacement shaders. I guess they wouldn't have been released, if it can't be done at all but there was always the point where it "falls apart".
    If not on a tech level, visual glitches appeard like a huge difference to the basemap or the normals disappeared (with dual lightmapping). Its a fun experiment but I dont trust them enough to integrate them in a production pipeline.

    After I took a look at the Unity Details Thread, I can totally understand why UT gets careful with promises...or what people think, promises are :D
    When I read about Unity4, I was expecting at least that "small" step but I'm a pro of making S*** happen as well and understand what you mean.
    Anyway, glad that UT still cares about the terrain :)
     
  18. Florian Schmoldt

    Florian Schmoldt

    Joined:
    Jun 19, 2012
    Posts:
    18
  19. Chaoss

    Chaoss

    Joined:
    Jul 8, 2011
    Posts:
    327
    Haven't had time to catch up on the last 5 days worth of replies, but just to chime in I believe the terrain engine should get some attention for 4x release, how about making normal mapped terrains a pro only feature?
     
  20. jc_lvngstn

    jc_lvngstn

    Joined:
    Jul 19, 2006
    Posts:
    1,508
    Just fleshing out the documentation from time to time would do wonders :\
     
  21. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Prayers answered everyone. :)
    "Graphics Features
    Terrain: Normal map custom shader support for Terrain. Added built-in shader Nature/Terrain/Bumped Specular; added "normal map" texture slot to terrain splat maps; added Material field under terrain settings."

    :D
     
  22. pkid

    pkid

    Joined:
    Jul 10, 2009
    Posts:
    201
    So now that there can be a custom shader I wonder if substances can be used on terrain?
     
  23. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Who knows. :)
     
  24. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,203
    Doesn't look like it would work, as there is just one material. But the previous substance terrain (free on the asset store) should still work. I'll try that tomorrow when I get some free time.
     
  25. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Good stuff.
     
  26. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Wait, you said 'one material'. You can add a bump/normal map to as many of your terrain textures as you want yes?
     
  27. Jaimi

    Jaimi

    Joined:
    Jan 10, 2009
    Posts:
    6,203
    I was just talking about using substances for terrains. That seems to still require the previously mentioned asset. Bumpmapping on terrain works great, and each texture has it's own bump map, just like you would expect. There is only one material assigned, and it uses a special terrain shader. The material doesn't define the textures, just the shader. The "Add Texture" dialog for the terrain has an additional field for the bumpmap.
     
    Last edited: Aug 23, 2012
  28. brilliantgames

    brilliantgames

    Joined:
    Jan 7, 2012
    Posts:
    1,937
    Great. :) So it uses bump maps not normals? I've never really been able to tell much visual difference between the two anyway, so it prob doesn't matter.
     
  29. tatoforever

    tatoforever

    Joined:
    Apr 16, 2009
    Posts:
    4,364
    It have been announced in the conference that Unity4 will have normal maps on terrain. If you per-ordered Unity4 you can start playing with.
    The way it works is simple, each texture layer have an additional slot for normal maps but also you can override that and provide your own materials using any shader (not just tied to the default bumped specular) like parallax or whatever you like!
    Maybe Aras can jump in and give more additional details that i probably missed. ;)
     
  30. janpec

    janpec

    Joined:
    Jul 16, 2010
    Posts:
    3,520
    That is really great. Excellent actually. However i will still stick to larsbertrams shader if this new technic does not allow using main color map.
     
  31. TylerPerry

    TylerPerry

    Joined:
    May 29, 2011
    Posts:
    5,577
    Is it a pro only feature?
     
  32. FlorianSchmoldt

    FlorianSchmoldt

    Joined:
    Jul 2, 2012
    Posts:
    334
    hmm... I was trying to "directional lightmap" my terrain but it freezes somewhere in the middle of the "exporting to beast"-dialog.
    Anyone shares the experience ?
     
  33. Deleted User

    Deleted User

    Guest

    I just converted my shader to the U4 terrain type, and it works well, although it has some of the same drawbacks (from a shader writer's point of view) as U3 terrain, inasmuch as it does not export tangents, so you have to calculate(estimate) them yourself. Nonetheless, here's U4 terrain with parallax occlusion mapping and depth blending :D
     
  34. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    doubt it as it is nothing 'pro worthy'

    but there was no statement towards one or the other side.
     
  35. pvloon

    pvloon

    Joined:
    Oct 5, 2011
    Posts:
    591
    (I got lucky and have a unity 4 basic version running)

    Works on basic :)
     
  36. Aras

    Aras

    Unity Technologies

    Joined:
    Nov 7, 2005
    Posts:
    4,770
    Any details?

    That is correct, terrain mesh does not have tangents. Is that an actual problem though? Calculating them is only one cross product in the vertex shader; my guess is that should be much, much cheaper than reading tangent from the memory.
     
  37. Deleted User

    Deleted User

    Guest

    I've been estimating them as U&V increasing positively along the mesh (ie (1,0,1)), then calculating the bitangent from that and the normal, then recalculating the tangent from the bitangent and normal. I need the entire tangent matrix to get the view direction in tangent space for parallax occlusion mapping. I was getting some discontinuities on slopes, the further the terrain was away from the viewer.

    I'm probably making this sound a lot more complicated than I need to, though, and I'm really happy that the material retains its (non-standard) values happily in and out of play mode(as in it would keep them while playing, but reset some them when it stopped), which was the main problem I was having with hacking it into the U3 terrain.

    Edit: and yes, I was just talking about having to recalculate the tangents when I was talking about drawbacks, so other terrain shader writers would know. I didn't mean it pejoratively - I think it's brilliant that we can now add materials.
     
    Last edited by a moderator: Aug 28, 2012
  38. Marco-Sperling

    Marco-Sperling

    Joined:
    Mar 5, 2012
    Posts:
    620