Search Unity

ats color map ULTRA shader [RELEASED]

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

  1. Paddington_Bear

    Paddington_Bear

    Joined:
    Dec 9, 2012
    Posts:
    274
    Hi @larsbertram1,

    I stumbled accross this thread today which is just as well, I tend to steer clear of the asset store.

    Your solution has broadly what I'm after for a presentation I'm working on for the 2018 cycle, of course I have to ask that damn question: "Are you planning HDRP support?"

    If not, are you planning an alternative for the HDRP in the near future?

    Appreciate it, keep up the great work!
     
  2. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    actually it is not on the list. but this might change...
     
    Paddington_Bear likes this.
  3. Redrag

    Redrag

    Joined:
    Apr 27, 2014
    Posts:
    181

    I'm on 5.4.3f1 - just not quite the right time to move forward..
     
  4. Bodyclock

    Bodyclock

    Joined:
    May 8, 2018
    Posts:
    172
    Hi, I wondered if I could use your shader with Map Magic to assign a global colour map to procedurally generated terrain? The case is I have a 5km x 5km terrain with a 2k heightmap generated in World Machine that I will use to generate 1k tiles in MM. I also have a 4k colour map generated in WM that I would like to use as a base colour map. Is there a way to apply this to the whole potential terrain rather than each individual tile similar to the raw input node so that MM knows what part of the colour map to apply to what part of the generated terrain?
     
  5. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    sorry, i have not looked into map magic so far. so i am not familiar with any of its features.
     
  6. clagrens

    clagrens

    Joined:
    May 19, 2017
    Posts:
    96
    I make terrain and add CMU to it. But I can not generate splat map from existing terrain.
    So it loses the terrain detail.
    upload_2019-2-24_14-17-8.png
    upload_2019-2-24_14-17-19.png
    Nothing happens after I press " Export Splat Maps" button.
    2017.4.18
     
  7. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    oh, you have to assign your terrain's splat maps manually to the cmu material.
    export splat maps only writes out the splat maps to your disc.
     
  8. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    hi there,

    cmu has just been update to version 4.0 which now fully supports Unity 2018.3+ including instancing support for both the parallax and the tessellation shader.
    performance has been increased and the editor has slightly be revamped.

    i hope you enjoy,
    lars

     
  9. Baldinoboy

    Baldinoboy

    Joined:
    Apr 14, 2012
    Posts:
    1,526
    Awesome! CMU is still my favorite terrain shader so thanks for the update @larsbertram1!
     
    hopeful likes this.
  10. Redrag

    Redrag

    Joined:
    Apr 27, 2014
    Posts:
    181
    Hi - could you tell me how I upgrade from V2.5. Do I need to buy V4? And what is the upgrade path like - will everything break?
     
  11. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    there is the possibility to upgrade to 4.0 for 7$.
    some features are dropped in 4.0 like terrain blending. so these will break.
    regarding the terrain itself 4.0 works totally different. you may use your current colormap and detail textures of course. but you will have to setup your terrain material using the new editor. this should be a task of several minutes.
     
    JBR-games likes this.
  12. williampire

    williampire

    Joined:
    Jul 24, 2018
    Posts:
    9
    Is this asset able to hide tiling issues on terrains?
     
  13. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    yes, to a certain degree at less. it supports multi uv tiling. on then you have the colormap,
     
  14. KarloE

    KarloE

    Joined:
    Aug 26, 2013
    Posts:
    175
    So I just put this in the project and I have a problem, while underwater (lux water - you might remember me from my overcloud compatibility problem), when looking at the terrain, I see some weird white flickering from time to time:

    https://gyazo.com/7a21a8d9f77d0153a97539250766b2d3

    http://prntscr.com/oqnd1e

    I just dragged the terrain from the demo scene and barely changed any parameters. What could be wrong?
     
  15. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    tessellated terrain? if so: these always create micro cracks.
    but i can barely see anything on your video/screen shot.
     
  16. joshua_42

    joshua_42

    Joined:
    Jun 23, 2016
    Posts:
    104
    Hello,

    Does your shader work with meshes or just Unity terrain? And can it be used on spherical meshes (planets)?
    Cheers!
     
  17. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    i only tested it with terrains. but it should work with custom meshes too. although it does not support uvs.
    it does not as it does not support uvs.
     
  18. KarloE

    KarloE

    Joined:
    Aug 26, 2013
    Posts:
    175
    Nope. Parallax. It's barely visible because its a gif, here is a video, im underwater going towards the terrain:
    https://i.gyazo.com/09e441509272c8591840c54678117ffd.mp4
    http://prntscr.com/orakto - very hard to actually pinpoint it but its like white noise and its very apparent when playing

    This is terrain setup:
    http://prntscr.com/orakc5
    http://prntscr.com/orakh1
     
  19. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    as you use parallax the terrain should not cause any cracks.
    or do they go away if you assign the standard terrain shaders?!

    i guess it is the water volume (if gerstner waves and tessellation are enabled). i spent a lot of time to minimize any cracks but could not fully get rid of these :(
    it is the price we have to pay if we want to have particles underwater: we have to split the entire underwater into 1) underwater surface and 2) underwater post – and the mask which distinguish between both may contain some little cracks caused by tessellation.
    if there is a crack the skybox will show through. so you may reduce the artifact by darkening the the sky according to depth below the surface.

    have you checke the ocean demo?
    have you tried to simply swap the terrain shader?

    Bildschirmfoto 2019-08-11 um 23.15.31.png
     
    Last edited: Aug 11, 2019
  20. KarloE

    KarloE

    Joined:
    Aug 26, 2013
    Posts:
    175
    You are right, it is that seems so. When I disable gerstner it doesnt happen anymore, and if I switch terrain shading it keeps happening. Hmm that sux a bit. I guess I will have to change sky color or lower/lerp out gerstner waves once underwater. Not sure.

    But why does it happen only with the terrain? Shouldn't it happen without it as well, if that is to blame?
     
  21. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    it may always happen. but it does not happen in the ocean demo.
     
  22. KarloE

    KarloE

    Joined:
    Aug 26, 2013
    Posts:
    175
    Since this is something obviously connected to Lux Water, ill continue discussion there not to clutter here.
     
  23. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    i would kill for this shader to work on opengl 2. At least the wet shader one so I can do water puddles or small lakes with it. They look fantastic but the shader doesn't run on mobile opengl2 now :(
     
  24. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
  25. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
  26. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    most of its features should work with opengles 2.
     
  27. KarloE

    KarloE

    Joined:
    Aug 26, 2013
    Posts:
    175
    @larsbertram1 I started writing a long post detailing my problem, but then I tried to import CMU to an empty project and it happened there as well, so seems like CMU is not working properly in Unity 2019.2.2f1

    This is what happens when you turn around in the editor:
    https://i.gyazo.com/b5f7414b24413d3e1a47969bbdb28e3c.mp4

    This is what happens in play mode:
    https://i.gyazo.com/d43e664bfaa9f4ad42c8c5e9b03a60c0.mp4

    Spotlight only registers at a certain angle:
    https://i.gyazo.com/4ae8016e2c32713de650a6c15d0c2750.mp4

    Can you help us out making it work? In Unity 2019.1.11f1 it works fine.
     
  28. KarloE

    KarloE

    Joined:
    Aug 26, 2013
    Posts:
    175
  29. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    thanks for reporting. i will have a look into it.
     
  30. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    some conflicts with keywords... rendering will be fine if you enable instancing on the terrain or check "Enable Height Normal Map" in the CMU inspector.
    I will submit a bug fix today.
     
  31. KarloE

    KarloE

    Joined:
    Aug 26, 2013
    Posts:
    175
    @larsbertram1

    Hey, so I still got the problem, here is what happens with enable height normal on:
    https://i.gyazo.com/8976823280dcf2989c3fbb202c0937e6.mp4

    Please note:

    I originally had 2019.1.11f1 and the demo scene didnt work there even when I enabled height normal. But it did fix itself like that in the CMU 2019.2.9f1 test I had. So I upgraded the project to 2019.2.9f1, and what happened is that it did work for the demo scene, however my own terrain still behaved bad, as you can see in the gif up there.

    So, TLDR:

    1. Enabling height maps or terrain instancing doesnt work for 2019.1.11f1.

    2. My terrain is still broken on 2019.2.9.f1 with enabling those things, even though demo terrain works.

    Any ideas?

    Thank you for the super fast response!
     
  32. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    nope.
    i checked it using unity 2019.2.6. there enabling instancing just worked.
    but unity changed a lot of keywords recently...
    i will send you a package with the changes i made so you can check it out.
    comes as pm.
     
  33. KarloE

    KarloE

    Joined:
    Aug 26, 2013
    Posts:
    175
    Awesome, its a deal. :) Ill test it asap once you send it and get back to you.
     
  34. KarloE

    KarloE

    Joined:
    Aug 26, 2013
    Posts:
    175
    Everything has been resolved, awesome support as always! :)
     
  35. KarloE

    KarloE

    Joined:
    Aug 26, 2013
    Posts:
    175
  36. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    i think it should work... is wetness acttivated?
    otherwise it would be a bug.
     
  37. KarloE

    KarloE

    Joined:
    Aug 26, 2013
    Posts:
    175
    @larsbertram1 Wetness is not activated. (global water settings is set to None, I think you mean that?)

    Color setting doesnt work either and it seems to me that specular actually changes the color, not sure:
    https://i.gyazo.com/e1f7a528e3258969d82850758fa5e6a3.mp4

    Ill be waiting for the fix in that case. :)

    EDIT: On my other scene and the terrain, seems like the specular color and color setting works, but acts a bit weird as it doesnt give out the proper coloring. The smoothness doesn't work still:

    https://i.gyazo.com/c54baaafc49f8d12d19d5cb7ac61ac3d.mp4
     
  38. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    all but smoothness should work.
     
  39. KarloE

    KarloE

    Joined:
    Aug 26, 2013
    Posts:
    175
  40. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    i think you misunderstand the concept of "colors" in this case:
    colors are no "tint" colors – like usual.
    colors here are "average colors" which are needed to do best blending with the colormap.

    for this reason you have the "grab" button which will get the average color from the texture.

    you tint the textures using the color map.
     
  41. KarloE

    KarloE

    Joined:
    Aug 26, 2013
    Posts:
    175
    Ohh! Ok, sorry about that, I assumed its tint! Then its all fine, just smoothness doesn't work. Do you have any estimate on a fix for that?

    Thanks for the explanation, Ill re-read the docs I skipped that somehow! :)
     
  42. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    ha, i ran into the same trap as you :)
    smoothness is "Ø Smoothness" is "average smoothness".
    from the docs:

    Alpha stores the average Smoothness which is used beyond the splatting distance if you have assigned a color map. In case no color map is assigned smoothness is taken from the built in base map alpha channel.​

    so if you want to change the smoothness you actually have to edit the texture and update the texture array.
     
  43. KarloE

    KarloE

    Joined:
    Aug 26, 2013
    Posts:
    175
    Got it! :) Ill try it out asap.
     
  44. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,296
    Regarding smoothness, maybe as feature request somehow make it possible to override smoothness per layer?
    I'd love to change smoothness at splat seams so they'd be less shiny, but I'm no artist unfortunately.
     
  45. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    well, nowadays most people use textures from megascans or allegorythmic. so smothness should be pretty fine.
    otherwise – quickly editing your texture in photoshop and updating the texture array is a quite fast process and lifts some work from the shader :)
     
    xVergilx likes this.
  46. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,296
    Got a weird issue when I try to add layer + paint it, it displays as complete white:
    upload_2019-10-21_12-13-24.png
    I've tried updating atlases it didn't changed anything.

    Any idea what can be causing this? Different terrain work just fine.
    Atlas also displays layer correctly when I select it in the project view.
     
    Last edited: Oct 21, 2019
  47. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,296
    Re-creating material again fixed the issue.
     
  48. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,296
    Got another problem. Bakery's point lights aren't baked to the lightmap with the CMU.
    Is there something that can be done? Other meshes baked just fine, as well as direct / sky light.

    Point lights simply do not affect terrain.
     
    Last edited: Oct 24, 2019
  49. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,900
    which shader do you use: parallax or tessellation?
     
  50. xVergilx

    xVergilx

    Joined:
    Dec 22, 2014
    Posts:
    3,296
    Parallax one