Search Unity

ats color map ULTRA shader [RELEASED]

Discussion in 'Assets and Asset Store' started by larsbertram1, Oct 17, 2012.

  1. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    OK, thanks. I'll give it a try.
     
  2. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Just FYI, I tried the demo scene of ats Colormap Ultra and the only lighting model that worked for me was pre-computed realtime GI. All baked lighting modes showed some strange artifacts on the terrain (like dark squares) around the mesh blended objects. And even in pre-computed realtime GI it only appeared correctly when in play mode. Just looking at the game window showed artifacts that magically disappeared when in run mode.
     
  3. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    sorry, i did not see your answer until now.
    that is expected :) the demo scene – or better the mesh blending objects in the demo scene – are prepared for static batching which only jumps in when you are in play mode.
    none batched objects would need differently baked normals and tangents which is also supported by the scripts.
     
  4. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    large scale snow and water distribution unfortunately needed me to add some more extras in order to minimize tiling artifacts but it should be pretty much done now.
    if you want to find out more about it's feature you may have a look at the current documentation.

    terrian_snow.jpg
     
  5. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    as it got lost during the roll back here it comes once again:

    a simple gaia terrain using the upcomming cmu v3 shader.
    Bildschirmfoto 2016-07-08 um 15.03.02.png
     
    mwituni and Baldinoboy like this.
  6. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Looks nice. What is cmu and what platforms does it work on?
     
  7. hopeful

    hopeful

    Joined:
    Nov 20, 2013
    Posts:
    5,686
    cmu v3 = ats Color Map Ultra v3, I'm guessing. :)
     
  8. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    d'oh. I suppose you are right.
     
  9. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    yes: cmu is my abbreviation for ats colormap ultra terrain shader – which is a long one.
    platforms will be pc (dx11 only), mac and linux (openGLcore), ps4 and xbox one.
     
  10. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Oh, so this is the one that will require shader model 5?
     
  11. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    the shader uses texture arrays.
    so from the unity docs:
    https://docs.unity3d.com/540/Documentation/Manual/SL-TextureArrays.html

    Platform Support
    Texture arrays need to be supported by the underlying graphics API and the GPU. They are available on:

    • Direct3D 11/12 (Windows, Xbox One)
    • OpenGL Core (Mac OS X, Linux)
    • Metal (iOS, Mac OS X)
    • OpenGL ES 3.0 (Android, iOS, WebGL 2.0)
    • PlayStation 4
    Other platforms do not support texture arrays (Direct3D 9, OpenGL ES 2.0 or WebGL 1.0). Use SystemInfo.supports2DArrayTextures to determine texture array support at runtime.
     
    moure likes this.
  12. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    hi there,
    as beta testers of version 3.0 have either been pleased or very quite i have uploaded version 3 to asset store today.
    i hope it gets approved soon.
     
  13. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,526
    Awesome Lars! Hope if gets accepted quick.
     
  14. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    well, the update will take some more time as this is the answer from the asset store team to my submission:

    'Colormap Ultra Terrain Shader 3.0' has been declined.

    We ask that you include offline documentation in your package in the format of .pdf, txt or rtf. It is okay to have more extensive online documentation but the offline documentation should include enough instruction for the user to understand the basics of the package.

    Unfortunately we cannot accept submissions containing assets published to the Unity Asset Store by another author even if you have obtained that author's permission. You can include an explanation of what other assets are needed, a link to the asset, and instructions on how to integrate the two packages, but you cannot include the package itself.

    We are concerned about the level of your professional appearance online. We ask that you provide a link to a professional portfolio site to show your experience on your publisher page. This is beneficial to establish yourself as a trustworthy seller to your user base.
    If you're a student or a start up publisher and don't have a ready website yet, please provide a Linkedin profile, or Github account.

    We ask that you populate your publisher page with information reflecting your experience/credentials as an artist or programmer as it will increase your professional appearance on the Asset Store.
     
  15. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Cookie cutter answer for a lack of a pdf, then. Oh well :D
     
  16. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
  17. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,526
    hopeful likes this.
  18. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    thanks a lot!
     
    Baldinoboy likes this.
  19. Sarudan

    Sarudan

    Joined:
    May 21, 2011
    Posts:
    65
    Hi Lars,

    I'm having a small issue after bringing CMU 3 into our project. Everything looks fine in edit mode, but as soon as I press Play, the terrain goes all dark, and remains dark after exiting play mode. Changing any of the terrain settings immediately causes it to go back to normal (e.g. moving the splat distance slider, or any of the other sliders).

    Any thoughts? This is the only hitch that is stopping me from switching over fully from RTP.
     
  20. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,526
    Did you save the texture arrays created for that terrain?
     
  21. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    right now baldinoby's answer is the only one i can think of: cmu 3 is material driven therefore it simply should not break – unless you haven't saved the texture arrays but only updated them.
     
  22. coffeefery

    coffeefery

    Joined:
    Apr 10, 2014
    Posts:
    21
    Someone commented that cmu v3 can be used with Unity 5.3.4. Can someone confirm that? I'm currently using Unity 5.3.4f1 but would like to have the height based blending capability. Thanks.
     
  23. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    unfortunately it can not. it needs unity 5.4 as it uses texture arrays.
     
  24. Sarudan

    Sarudan

    Joined:
    May 21, 2011
    Posts:
    65
    Ok I'll give that a go - I'm fairly sure I only updated them.

    Thanks Baldinoboy
     
  25. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,526
    No problem. Let us know if that did it.
     
  26. Barliesque

    Barliesque

    Joined:
    Jan 12, 2014
    Posts:
    128
    I've been hunting through this thread to try to clarify whether CMU is suitable for mobile -- with or without all of its features. I see Texture Arrays do work on mobile, but maybe something else (tesselation, I'd guess) rules out use on mobile. So my question: Is there a mobile version of CMU?
     
  27. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    there is no dedicated mobile version of cmu.
    version 2.5. should work on modern devices. it simply needs shader model 3.0.
    version 3.0 needs OpenGLES3 (shader model 3.5). and you can switch between parallax mapping (fast) and tessellation (slow).

    lars
     
  28. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    well, it should do. you have to assign at least 4 detail texture but not more than 8.
    then the script should automatically pick up your textures and prepare the needed texture arrays.
    i have never experienced anything else...
     
    Crossway likes this.
  29. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    509
    Thanks.
    How should I create tessellation maps?

    Also all my textures are same size and same format but I have errors on all texture arrays that it's not fit in size!!!!!!!!!!!!
     
    Last edited: Aug 30, 2016
  30. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    there are no tessellation maps. do you mean height maps?
    these can be created using e.g. crazy bump or xnormal.

    then they most likely are not the same size and format. please check your import settings.
     
    Crossway likes this.
  31. PiAnkh

    PiAnkh

    Joined:
    Apr 20, 2013
    Posts:
    126
    Hi Lars,

    I have just brought your terrain shader and am doing a bit of experimentation.

    I am wondering if it is possible to use the nonLOD terrain shader on a mesh? I see that it doesn't use the splat maps on the terrain itself but splatmaps saved out from another terrain.
    If that is possible it could provide a solution for large terrains which are not so efficient in unity.
    Exporting the large terrain to a mesh which can be optimised to a much reduced polycount, and then applying the nonLOD terrain shader.

    Would that work?

    thanks
    Ronan
     
  32. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    509
    I mean this.
     
  33. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    oh, sorry.
    from the documentation:

    Only available if you use the tessellation shader.
    Create Lets you generate and assign a Terrain Height Normal Map.
    You will have to hit this button whenever you make any changes to the heightmap.
    If no Terrain Height Normal Map is assigned the shader will fall back and not overwrite the terrain’s geometry and normals.
    This is handled correctly in editor by the Color Map Ultra script. You will have to handle it at runtime enabling/disabling the materials keyword “_TERRAIN_NORMAL_MAP” and setting the shader’s property “_FarTessellation” to 0.0 or 1.0.​
     
    Crossway likes this.
  34. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    it should.
    please keep in mind that your uvs have to be mapped to the 0-1 range.
    you do not need tangents – although you could comment the part in the vertex shader which calculates the tangents if your mesh comes with proper ones.
     
  35. moure

    moure

    Joined:
    Aug 18, 2013
    Posts:
    184
    Hi lars!

    I have a tiled mesh terrain, set up with lods per tile (attached image)
    All tiles combined are mapped on the 0-1 uv range, so that i will be able to have a global normal map. I was wondering if your shader can be used in a situation like mine(having the same material on all tiles and getting advantage of the global normal map for additional detail especially on far tiles).
    Cheers

    BTW the inbuilt lod system is not so useful for a tiled mesh terrain (especially since the lower lods can't be lightmapped) so if i decide to continue with such a solution i will probably need a custom distance based lod system.
     

    Attached Files:

  36. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    if uv space is like in the picture attached i would say yes.
    Bildschirmfoto 2016-08-30 um 19.15.23.png
     
    moure likes this.
  37. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    509
    Is there anyway to kill all specular on the map? my direction light amount is 3.0 and I have a heavily white specular on the sun direction path.
     
    Last edited: Aug 30, 2016
  38. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    you have to respect pbs... or have to hack the shader to write o.specular = 0.
     
    Crossway likes this.
  39. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    509
    I respect PBR rules but this much of specular on the ground isn't realistic.
     
  40. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    well, that is unity's brdf.
     
  41. doublegumbo

    doublegumbo

    Joined:
    Oct 24, 2013
    Posts:
    53
    trying to use the alpha channel to cut holes in the terrain. Unfortunately, this is happening:

    nasty terrain.png

    any suggestions as to what I can do here without having to switch away from deferred rendering?

    thanks!
     
  42. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    seems to be a problem with the camera and its clearing flags.
     
  43. Kusras

    Kusras

    Joined:
    Jul 9, 2015
    Posts:
    134
    Hi I am having a problem with grass/textures under sharp angles (specificly if sun is behind camera and I am looking uphill), Then all textures get much brighter, and also a grass, I am sending a grass, it is more visible.

    This is normal colored:


    And there is strange brightness adjustment:


    Do you have any idea how to solve this problem? I tried to change all values and nothing affect it.... As I said also e.g. mountains shines so much. So i believe it is some kind of material specularity. Also terrain specularity color in material is always set to some value and cannot be changed. It is my main suspect.
     
  44. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    hi kusras,
    the color map ultra shader does not render the grass placed on top of the terrain.
    so which shader do you use for grass? the built in one?
    terrain textures however will receive strong specular highlights at grazing angles due to physically based shading and the fresnel effect.

    lars
     
  45. Kusras

    Kusras

    Joined:
    Jul 9, 2015
    Posts:
    134
    Well when I googled about my problem I hit this. And in connection that under same angle your textures shine absolutely same I thought it somehow is affected by material of terrain. So sorry, if there is no connection between material and how grass is then rendered. But still I would like to reduce that effect if it is possible.
    Yes I am using default grass ( I used https://www.assetstore.unity3d.com/en/#!/content/36335 before with same result)

    Here is Shinning rock:
     
    Last edited: Sep 7, 2016
  46. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    hi kusras,

    you screen shoot doesn't looks as if you were using linear colorspace but gamma.
    please check this and switch to linear (if possible) as this is a key to physically based rendering.

    as far as reducing specular reflections at grazing angles is concerned:
    - check your smoothness first: should be rather small
    - check your specular color value for the rock texture: should be rather dark
    if these values look fine to you there is not much about that you can do in unity < 5.4. except from switching back the BRDF from GGX to BlinnPhong.
    in case you use unity 5.4. you could set the specular color to pure black which would give you "real" lambert lighting -> no specular reflections at all.

    lars
     
  47. PiAnkh

    PiAnkh

    Joined:
    Apr 20, 2013
    Posts:
    126
    Does Colormap Ultra allow the addition of a terrain normal map? That can make quite a difference to how the terrain looks. Without it it tends to looks rather flat at a distance.
     
  48. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    right now this feature is disabled in 2.5 (due to texture limits). version 3.0 supports it if tessellation is enabled.
    but version 3.0 will add far distance normals based on the perlin noise texture in any case.
     
  49. Kusras

    Kusras

    Joined:
    Jul 9, 2015
    Posts:
    134
    Hi thank you for your answer I found that it was caused by lux grass shader. If I deleted and reload default grass shader (sorry) It is correct in that brightness problem for grass.
    I am using 5.4, but changing specular color in ats shader (terrain specular color property) it does not affect it any way.

    Yes I am using gamma, I know everywhere writes it is better to have linear, but it does not have natural colours and specualrity at first, And absolutely have no clue how to fix it - everywhere writes it takes some time to fix it, but results are worth of it, but never writes how to fix it. So I used to gamma as it does not look broken.
     
  50. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,902
    well, it looks broken i think.
    oh! in case you use the lux grass shader and deferred shading you have to make sure that you have assigned the lux deferred lighting shader. then everything should look fine. unity's built in grass shader is forward only = expensive.
    you have to tweak the specular color values per layer too.