Search Unity

  1. Calling all beginners! Join the FPS Beginners Mods Challenge until December 13.
    Dismiss Notice
  2. It's Cyber Week at the Asset Store!
    Dismiss Notice

ats color map ULTRA shader [RELEASED]

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

  1. catfink

    catfink

    Joined:
    May 23, 2015
    Posts:
    133
    Can you add an option to the script to allow the splatmap to be re-imported and updated, I know this can be done just by updating the generated material Control0 texture but it took me a while to find the splatmap as it isn't mentioned in the docs as far as I could see.

    upload_2016-9-24_13-27-59.png
     
  2. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,320
    i will take taht into consideration :)
     
    catfink likes this.
  3. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    376
    Is there a way to achieve color map from detail colors of layers like RTP?

    Also it's not work with Unity 5.5 b3 anymore. here is the error.
     
    Last edited: Sep 24, 2016
  4. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,320
    you have to assign the color map painting tool. in its onspector you will find the button "create color map" which lets you create and save a color map generated form the details and splats.

    5.5. is out of scope right now. and the error only affects the path blend shader, not the terrain shader.
    you may try to make the shader work in 5.5. by editing lines 85 - 93 so they look like this:
    // d.boxMax[0] = unity_SpecCube0_BoxMax;
    // d.boxMin[0] = unity_SpecCube0_BoxMin;
    // d.probePosition[0] = unity_SpecCube0_ProbePosition;
    d.probeHDR[0] = unity_SpecCube0_HDR;

    // d.boxMax[1] = unity_SpecCube1_BoxMax;
    // d.boxMin[1] = unity_SpecCube1_BoxMin;
    // d.probePosition[1] = unity_SpecCube1_ProbePosition;
    d.probeHDR[1] = unity_SpecCube1_HDR;

    but i haven't tested that...
     
    sanketprabhu and Crossway like this.
  5. Sarudan

    Sarudan

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

    I have everything set up fine, but the colormap painting tool isn't working properly for me. I have the brush size set at one, but the brush is enormous, and snaps to huge grid points (we have no grid tools running that might conflict either).

    Is this a known issue? it makes painting the colormap impossible.

    EDIT: Just worked out the issue... one of the artists had set the base texture resolution of the terrain to 16. Setting it to 2048 has fixed the issue.
     
    Last edited: Sep 25, 2016
  6. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,320
    no, it is not. it is assumed to just work fine...
    do you have some more info for me?
     
  7. Crossway

    Crossway

    Joined:
    May 24, 2016
    Posts:
    376
    Thanks, if we have 25 tiled terrains should we create 25 materials too? cause each material can contain 1 tessellation map.
     
  8. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,320
    yes, for now each terrain would need its own material.
     
  9. catfink

    catfink

    Joined:
    May 23, 2015
    Posts:
    133
    I need some help, I'm trying to manually update the splatmap for the shader and I just can't work out how I get it to use my new splatmap. I thought I could update the control0 texture (posted above) but whatever I do it won't assign a new map and just ignores any splatmap I try to drag in. I must be missing some step but I just can't work it out.
     
  10. catfink

    catfink

    Joined:
    May 23, 2015
    Posts:
    133
    I found a solution, I still have ats 2.5 and the splatmap apply in that works perfectly :)
     
  11. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,320
  12. eaque

    eaque

    Joined:
    Aug 20, 2014
    Posts:
    596
    Hi all,

    I just bought it and when i combine 2 normals (tex1/text2) one of them become pinky (text1) and the combined texture looks like the main diffuse text1. And in game this gives an ugly result!
    Do you know what could be the problem?

    thanks in advance!
     
  13. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,320
    that sounds as if you were using version 2.5, right?
    but to be honest: i have never heard of a problem like this before... if both texture assigned to the script are regular normal maps everything just should work fine.
    maybe you can attach some screen shots from the editor?
    lars
     
  14. eaque

    eaque

    Joined:
    Aug 20, 2014
    Posts:
    596
    Many thanks for your prompt reply:
    check below the 2first normals before i combine them upload_2016-10-1_23-47-38.png

    and here after combined:the result is just like the sand diffuse
    upload_2016-10-1_23-49-34.png
     
  15. eaque

    eaque

    Joined:
    Aug 20, 2014
    Posts:
    596
    By the way even changing the settings i still have a very shining bump effect, how can i get rid of it?
    I'm using Unity 4.6.9
    Maybe it's a noob question, sorry about that


    upload_2016-10-1_23-54-59.png
     
  16. eaque

    eaque

    Joined:
    Aug 20, 2014
    Posts:
    596
    Just a thought...i created the sand normal Inside unity......Maybe it comes from that?
     
  17. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,320
    it is not...
    and your screen shoots looks absolutely disturbing:
    it looks as if the script was changing the input textures!? just have a look at your 2nd screen shoot: input normal has changed!?
    i have never encountered that problem nor have i heard about that before.
    so there is not much i can say right now.
    please check your texture namings: are normal and albedo names unique?
    are normal texture set to be read/write enabled? they do not have to but that would make it easier for the script...

    this is such a unique and weird problem that in case we can nor solve it fast i would recommend to simply combine the textures manually using photoshop, gimp or whatever software you have at your hand.

    sorry about that.
    lars
     
  18. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,320
    ah, may be... try to create it using xnormal, crazy bump or anything else as the script most likely uses the original asset (which is not a normal...)
     
  19. eaque

    eaque

    Joined:
    Aug 20, 2014
    Posts:
    596
    I tried to rename the textures but no result! I will try making the normal outside Unity!
    Can you tell me how to reduce the shiny effect ?
    upload_2016-10-2_0-15-50.png

    Thanks again for your very fast support!
     
  20. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,320
    unfortunately unity's new brdf tends to make everything pretty shiny...
    lowering "shininess" to 0.0 may give you true lambert lighting though (only direct lighting).
     
  21. eaque

    eaque

    Joined:
    Aug 20, 2014
    Posts:
    596
    You were right! I did the normal with GImp and it's good now!
    Thank you very much.

    Now i'm still fighting with the bump effect as i use a directionnal light with a custom script for daycycle!
     
  22. eaque

    eaque

    Joined:
    Aug 20, 2014
    Posts:
    596
    Your shader is very impressive!
    To reduce the shiny effect i lowered specular power and color!! Perfect!!!!
    Tomorrow i'll get into Blending meshes on terrain!!!
    Have a good night!
     
  23. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,320
    do not forget to leave a comment on the asset store :)
     
  24. Soul-Challenger

    Soul-Challenger

    Joined:
    Dec 30, 2010
    Posts:
    152
    I guess night time doesn't do this excellent shader justice. More pictures coming soon...

     
    ftejada, docsavage and Baldinoboy like this.
  25. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,320
    wow!
     
  26. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,322
    That is awesome man!
     
  27. exploitedtaken

    exploitedtaken

    Joined:
    Feb 25, 2014
    Posts:
    19
    Can't you just change this asset's name? It's not only colormap after all. It's great terrain shader like relief terrain pack. Not "Colormap Ultra Terrain Shader" but "Advanced Terrain Shader" maybe? (I know it's ATS) :p
     
    hopeful likes this.
  28. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,320
    i take that as a compliment, thanks :)
     
    hopeful likes this.
  29. Soul-Challenger

    Soul-Challenger

    Joined:
    Dec 30, 2010
    Posts:
    152
    Awesome shader!
    ValleyTestB1.jpg
     
  30. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,320
    it getting better and better!
     
  31. Riaan-Walters

    Riaan-Walters

    Joined:
    Apr 11, 2014
    Posts:
    36
    Hi There,

    Currently stuck with an issue that the terrain remains completely black (editor and built app)

    The only fix we found so far was to click on the terrain with the colormap script attached, this seems to activate the material somehow.

    I thought this might be a unity bug, but the key is that it ONLY works when the ColorMapUltra component is expanded (and thus triggering OnInspectorGUI, only this fixes it for some reason)

    Beyond this, it works like a charm.

    Any thoughts?
     
  32. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,320
    which version of the cmu shader do you use? 2.5 or 3.0?
    which version of unity do you use? dx11, dx9 opengl?

    lars
     
  33. Riaan-Walters

    Riaan-Walters

    Joined:
    Apr 11, 2014
    Posts:
    36
    Apologies for the lack of information

    Build : Window X86
    Unity : 5.4.2f2
    CMU : 3.0
    DX9 & DX11 (switching makes no difference)

    Not sure if this matters but here are my terrain settings:
    Size : 4000x4000
    Height : 2000
    Heightmap Resolution : 1025
    Detail Resolution : 1024
    Control Texture Resolution : 1024
    Base Texture Resolution : 512
    http://imgur.com/z3Ry5ar

    The Colormap settings are displayed bellow (perhaps you see something)
    http://imgur.com/NhBrquR
    Screenshot with problem http://imgur.com/Cbgar4e
    Screenshot without problem http://imgur.com/SD1mQY4
    Only difference was expanding the component so that the editor triggers
    (Deliberately did not post it as images here, don't want to post bad images on such a fantastic product) A gallery with all the above images can be seen here http://imgur.com/a/E5l3R

    Other Assets that (to my knowledge) could perhaps cause trouble
    MapMagic
    Tenkoku

    I am aware that unity 5 seems to have a black terrain bug, but I was unable to place the link between that issue and the fact that expanding your editor fixes it
     
    Last edited: Nov 6, 2016
  34. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,320
    my first guess: you have forgotten to save the created texture arrays – but only updated them in the editor!?
    edit: your screenshoot of the cmu settings clearly shows that you have forgotten to safe the texture arrays as their slots only show up an icon – but no file name :)
    use "Update Array" to get a quick preview in the editor. then always hit "Safe Array" too.



    lars
     
  35. Riaan-Walters

    Riaan-Walters

    Joined:
    Apr 11, 2014
    Posts:
    36
    Hi Lars,

    Thank you for your response,

    Unfortunately it was not that simple, here is a new screenshot, with the saved arrays and newly create and assigned material http://imgur.com/zg6fR6Z
     
  36. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,320
    how does the material itself look like?
    just click on the assigned material in the cmu editor and make it show up in the inspector.
     
  37. Riaan-Walters

    Riaan-Walters

    Joined:
    Apr 11, 2014
    Posts:
    36
  38. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,320
    hmm, your average colors look pretty strange (all grayscale?).
    but that should not make the terrain show up in pure black.
    so when exactly does it happen? if you enter play mode?
    what happens if you drag the material to e.g. a simple sphere? is is black too?
     
  39. Riaan-Walters

    Riaan-Walters

    Joined:
    Apr 11, 2014
    Posts:
    36
    The average colors are simply so it does not apply more color to a colored texture (the textures for grass for example are already green, adding a color here makes it multiply the colors)

    As soon as the scene is loaded ,take note that there is no camera available directly afterwards, the camera is loaded around 10 seconds later (after the loading screen), same goes for a built version and for the editor

    I tested a sphere, and indeed it shows the same behavior (good one by the way, did not think of testing it this way).

    I'll mess around with more settings tomorrow, if i find something i'll let you know what it ended up being.
     
  40. AdamGoodrich

    AdamGoodrich

    Joined:
    Feb 12, 2013
    Posts:
    3,646
    Hey Lars,

    Am playing with your latest, and added snow to my terrain.. but its giving me weirdness.. do you have any suggestions ?

    Grab 20161108183815 w1920h1029 x0y82z197r12.jpg

    I started with a standard unity terrain.

    Cheers,
    Adam.
     
  41. Soul-Challenger

    Soul-Challenger

    Joined:
    Dec 30, 2010
    Posts:
    152
    Really like the height-based splat blending! Works great even on my 4x4km test terrain with 2048 Control Texture resolution :)

     
    hopeful likes this.
  42. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,320
    hi adam,
    do you mean the "dark snow" on top of the maintains?
    have you added the Lux dynamic weather script and added a proper snow texture?
    that would be my first guess.
    otherwise you might go through alebedo, normal specular and smoothness to find what is wrong.
    maybe a normal?
     
  43. nickpettit

    nickpettit

    Joined:
    Dec 31, 2013
    Posts:
    33
    Hi @larsbertram1,

    I'm considering purchasing this asset to help optimize my terrain in an open-world PS VR project. I've very close to a solid 90fps and the alpha blending between textures on Unity's standard terrain shader drops my framerate by about 10 frames when heavily blended areas take up a large portion of the screen (i.e. looking directly at the ground).

    A few questions for you:
    • In what ways is this shader more performant than the built-in Unity terrain shader? I don't really know much about either shader. :)
    • Can this shader be used with Unity's standard Terrain system? Or do I need to use my own static terrain meshes?
    • Will this shader work with single-pass stereo? I don't see why it wouldn't, but I thought I'd ask.
    Thanks so much!
    Nick
     
  44. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,320
    hmm, it offers a lot more possibilities... so v3.0. is not faster but much nicer.
    yes.
    i have never tested this, sorry.
     
  45. davide445

    davide445

    Joined:
    Mar 25, 2015
    Posts:
    138
    I suppose this was asked dozen of times, but without thread search feature in the forum I can't find the answer: it's tested working with TerrainComposer 2? I suppose yes since this generate standard terrains, but.
     
  46. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,320
    i haven't done that. but i suppose it should work.
    i do not think that terrain composer supports using the shader while creating the terrain (as it would have to constantly update the texture arrays etc.) but you can use a standard built in shader while creating and texturing the terrain and then finally switch to cmu.
     
    davide445 likes this.
  47. sanketprabhu

    sanketprabhu

    Joined:
    Feb 23, 2016
    Posts:
    6
    You are pro man...It works for me..Thanks:)
     
  48. sanketprabhu

    sanketprabhu

    Joined:
    Feb 23, 2016
    Posts:
    6
    In Unity 5.5 release version also, there are some problem with shaders:
    Here is the solution: Just replace
    //d.boxMax[0]=unity_SpecCube0_BoxMax;
    //d.boxMin[0]=unity_SpecCube0_BoxMin;
    //d.probePosition[0]=unity_SpecCube0_ProbePosition;
    //d.probeHDR[0]=unity_SpecCube0_HDR;
    d.probeHDR[0] = unity_SpecCube0_HDR;
    d.probeHDR[1] = unity_SpecCube1_HDR;
    //d.boxMax[1]=unity_SpecCube1_BoxMax;
    //d.boxMin[1]=unity_SpecCube1_BoxMin;
    //d.probePosition[1]=unity_SpecCube1_ProbePosition;
    //d.probeHDR[1]=unity_SpecCube1_HDR;
     
  49. Kolyasisan

    Kolyasisan

    Joined:
    Feb 2, 2015
    Posts:
    268
    Just bought it and I can't figure out why everything speculates so much. Demo scenes work fine and all the settings are the same, yet it is very shiny. Tried to toggle everything to no avail. Can someone help me?
     

    Attached Files:

  50. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    5,320
    hmm – a lot of people compialn about unity's new ggx based brdf, which makes things much more shiny.
    but that looks very shiny.
    i would recommend to go through the different deferred preview modes in the scene view like smoothness and specular to see how your gbuffers look like.