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

ats color map ULTRA shader [RELEASED]

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

  1. Alexander-Perrin

    Alexander-Perrin

    Joined:
    Sep 6, 2012
    Posts:
    4
    Will antialiasing be supported with the shader at some stage?
     
  2. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,899
    i am not sure what you mean, but it is fully supported right now.
    lars
     
  3. Karlbovsky

    Karlbovsky

    Joined:
    Jul 11, 2012
    Posts:
    231
    Hallo Lars,

    this is going to be a double "post" cause i wrote in the wrong topic(the free version one),sorry 'bout that.

    i bought yesterday the Ultra Version(great Terrain shader,finally we got one!!)but still loving the free one 'cause is faster to use in some sits.

    Anyway,i'v got questions,looot of questions:

    1)(free version) I noticed that i have to Vertically Flip the splatmap too,not only the heightMap.
    Is that correct,or ther's something wrong with my splatMap?
    2)(Ultra version)I'm not sure i got it right .If i use the Unity4 shader,the only script i'v to put on the
    terrain is the BaseTerrainDistance one,right?
    But if is so,i have no idea how to set up the bunch of settings that shows up with the Material.

    ok,i'll stop here for now:D
    Thanks,
    keep up the good work!!
    Beastie.
     
  4. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,899
    i guess you are right… get in terrain normal and color map just as they are, splat map and height map have to be flipped.

    well, it worked that way, but it seams that with the latest update of unity something has changed as far as the material setup for terrains is concerned.
    i will have a look into this. meanwhile you should have a look at jzela’s post on page 9 of this thread.

    lars
     
  5. toby29

    toby29

    Joined:
    Sep 8, 2012
    Posts:
    15
    Thanks Jzela, has solved the problem, will post some pictures when the environment is complete :)
     
  6. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,899
    fine.
    i have just updated to unity 4.1.1. and havethe same problem there.
    it’s simply a bug in the editor… bug filed!

    lars
     
  7. Karlbovsky

    Karlbovsky

    Joined:
    Jul 11, 2012
    Posts:
    231
    Ok,vielen dank!!

    Today i'v got some time to spend on..

    ..waiting for some update..:)

    Stef.
     
  8. LokiDavison

    LokiDavison

    Joined:
    Jan 13, 2013
    Posts:
    41
    Here is the screenshot as promised, with a project in DX11 mode, using the ultra shader as a material, nothing else loaded in the project, at all and using the example scene and textures: $ultra_error.jpg Lighting is still broken.
     
  9. kazman

    kazman

    Joined:
    Mar 21, 2013
    Posts:
    1
    Why can't a video be made on how to use this ATS Colormap Shader? I have PAID for it why not support it with a simple tutorial on how to use it!
     
  10. nike971

    nike971

    Joined:
    Mar 17, 2013
    Posts:
    12
    YES Please a video tutorial!!!:D
     
  11. nike971

    nike971

    Joined:
    Mar 17, 2013
    Posts:
    12
    Hi Lars and guys,

    I tried to tiling my textures but nothing work. I yet tried to make a play but I don't have any refreshing of the tilling. Only the tiling in the terrain paint menu work. Please say me if I lost to do something....:confused:
     
  12. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,899
    hi loki,
    please let me know if switching to dx9 fixes your problem.
    if not i think it is not a dx11 issue.

    lars
     
  13. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,899
    hi nike,
    tiling is controlled within the terrain paint menu – except for the tiling of detail texture 5 and 6 which is set up via the script.
    this (usually) works in the editor without any need to hit play...
    so: where have you tried to change the tiling?

    lars
     
  14. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,899
    hi kazman,

    there have been several requests for a video tutorial, but unfortunately i am not able to do one.
    nevertheless i will work on an improved step by step instruction.

    lars
     
  15. RideTheT

    RideTheT

    Joined:
    Jun 11, 2012
    Posts:
    23
    Hey Lars, I've just started using this shader and I'm happy with the results so far, but I'm having problems in DX11 mode.

    In the demo scene the performance is the same until I add a skinned mesh renderer, then it gets a lot worse.
    Below is the difference between DX9(?) and DX11 mode.

    $dx10.JPG $dx11.JPG


    Any ideas?

    Thanks.
     
  16. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,899
    nope, but how should the skinned mesh renderer effect the color map shader?
    just try it without the terrain. does the frame rate drop also in this case?

    lars
     
  17. malessandro

    malessandro

    Joined:
    Mar 23, 2013
    Posts:
    7
    Hello,

    I moved from CryEngine to Unity 4.1 (Free Version) and found your shader would be a great addition. I just purchased the ULTRA Version of your shader and found the following Error Warnings in the Console after clicking on the shader:

    Shader warning in 'Terrain/Terrain Colormap Ultra': Program 'vert_surf', implicit truncation of vector type (compiling for d3d11) at line 54

    (just picking one line for search purposes)

    $Error.jpg

    EDIT: http://picpaste.de/pics/Error.1364159140.jpg (might make more sense ;)

    Any help is much appreciated :)

    alessandro
     
  18. RideTheT

    RideTheT

    Joined:
    Jun 11, 2012
    Posts:
    23
    No there's no drop without the terrain, but there's also no drop when using a terrain without the shader so I have no idea haha.
     
  19. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,899
    hi alessandro,

    the shader does not support dx11 out of the box, but alextelford has published a littel tweak which makes it compile:
    i hope this will fix your problems,

    lars
     
  20. malessandro

    malessandro

    Joined:
    Mar 23, 2013
    Posts:
    7
    Hi lars,

    could you point me out to a specific line in the shader script since Im no programmer. I found the line in the "normal" shader (Unity 3.x) but not in the shader vor Unity 4 which I found in the "Package for Unity 4" folder.

    alessandro
     
  21. RideTheT

    RideTheT

    Joined:
    Jun 11, 2012
    Posts:
    23
    Paste it in after line 86.
     
  22. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,899

    which one?
     
  23. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,899
    ok guys,

    i did my best on producing a step by step tutorial for setting up the shader.
    it is my first video ever published to youtube…

    [video=youtube_share;qJpb1mrdrso]http://youtu.be/qJpb1mrdrso

    i hope this will help. just let me know.

    lars
     
  24. malessandro

    malessandro

    Joined:
    Mar 23, 2013
    Posts:
    7
    Thanks lars Ride. I could fix it :)

    Great tutorial btw, lars. That's much of a help.
     
  25. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,899
    i am glad that you could fix your problems and enjoyed the the video,

    lars
     
  26. toby29

    toby29

    Joined:
    Sep 8, 2012
    Posts:
    15
    Hi Lars,
    Just a quick question for the Alpha channel of the 1st splat map in your example that comes with the Ultra shader it is blacked out,
    In mine currently I have a Black and white alpha mask, does this apply the 4th detail texture through the splat map or is this just used as a decal in the second splat that you paint yourself? I'm unsure and would just like to clarify this, thanks
     
  27. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,899
    hi toby,

    if your 1st splatmap uses all 4 channels it will control the distribution of the lower 4 detail textures.
    so the alpha channel controls texture no 4.
    i have not used it in the demo splat map as it is a bit difficult to generate it manually in photoshop to make it fit the constraints: r + g + a = 1.0
    for this reason detail texture 4 only appears as decal in the demo – but of course it can be painted as 4th texture using regular texture blending.

    but you should not use the alpha for anything like masking.

    lars
     
  28. toby29

    toby29

    Joined:
    Sep 8, 2012
    Posts:
    15
    Hi Lars,
    Thank you very much for the prompt reply :)
    this leads me onto another question how do you get your r+g+b = 1 in photoshop?
    $Terrain_Splat_PS_001.jpg
    I notice that your example of a splat in the project has less difference in colours to my splat map, your RGB are more pure colour.
    Mine seems to have yellows and pinks and not such a pure red green blue colour, hence the textures are blended more in my terrain, is this due to the RGB not = 1?
     
  29. nike971

    nike971

    Joined:
    Mar 17, 2013
    Posts:
    12

    Thanks Lars very helpful video!!
     
  30. nike971

    nike971

    Joined:
    Mar 17, 2013
    Posts:
    12
    Hi toby

    You generate your splat map in World machine?
     
  31. zangad

    zangad

    Joined:
    Nov 17, 2012
    Posts:
    355
    Thank you for the video. I would have never, ever figured all that out on my own. I finally got everything working in the free version of the colormap shader. Maybe once I'm ready, I'll revisit the ultra version again with this video at hand.

    Thanks again! :)
     
  32. horse

    horse

    Joined:
    Jun 17, 2009
    Posts:
    19
    Hi
    The terrain shader is great,
    Does this pack come with the blend script?

    I have vertex painted my meshes and placed them on the terrain. is there any additional steps to get the vertex blending discussed on page 5 of this tread to work?

    Thanks lars
     
    Last edited: Mar 26, 2013
  33. toby29

    toby29

    Joined:
    Sep 8, 2012
    Posts:
    15
    I've followed Wender's Tut to create all the masks for grass rock etc in World machine and Mudbox, then compiled my splat in Photoshop by extracting the flow Red channel, Grass Green then Blue Rock from the masks extracted from world machine then put them together on a new file in Photoshop to create the splat you are seeing
     
  34. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,899
    i simply use solid colors (red/green/blue) and paint them on 3 separate layers: one for red, one for green and one for blue.
    doing so will never lead to invalid colors like yellow or pink.


    lars
     
  35. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,899
    unfortunately not.
    i have stopped working on the blend script/shader but might pick it up again.

    lars
     
  36. malessandro

    malessandro

    Joined:
    Mar 23, 2013
    Posts:
    7

    Hey lars,

    first off: I appreciate your effort in doing all this :)

    I created a 32 bit rgba splatmap and figured that the texture slots for the terrain details will assign the added texture in the same scheme (correct me if I'm wrong): Slot 1 = R, Slot 2 = G, Slot 3 = B ... but for Slot 4, which would be alpha I guess, I'm not sure how to use it properly.

    If I assign a black debug texture to the first 3 Slots and a red debug texture to the 4th slot all the terrain is overlayed by the red texture. This is true for a rgba texture without alpha as well as for a rgba texture with alpha where just the "alpha area" would be "cut out" from the red overlay.

    How does someone use the alpha channel properly?

    Another question:

    You are using a second terrain in the video to paint more details on the terrain. Does a second terrain cost much computing ressources or doesnt it matter? Could I use a second terrain with its own splatmap just like assigning textures like I did with the first?

    And maybe thats the point where It would be clever to combine your shader with Tom's Terrain Tools?

    Lots of questions, I know :D

    Thanks a lot in advance.

    alessandro
     
  37. toby29

    toby29

    Joined:
    Sep 8, 2012
    Posts:
    15
    Thank you Lars :) I did try to go about doing it this way but ended up using World machine to output the Flow, Grass and rock masks to a Colour Generator and compiled them in Photoshop
     
  38. malessandro

    malessandro

    Joined:
    Mar 23, 2013
    Posts:
    7
    Did you try 'Select Slope's connected to the 'Channel Combiner' in World Machine? It works well for me.#

    EDIT: I think your workaround works better :D
     
    Last edited: Mar 26, 2013
  39. horse

    horse

    Joined:
    Jun 17, 2009
    Posts:
    19
    could you share it in its current state?
     
  40. malessandro

    malessandro

    Joined:
    Mar 23, 2013
    Posts:
    7
  41. toby29

    toby29

    Joined:
    Sep 8, 2012
    Posts:
    15
    I connected the height fields from the erosion and coastal overlay macro to separate colour generators.
    R = Flow Map, G = Grass Rock Mask, then for Blue, connect Grass rock mask to an inverter then to colour generator.
    Then output each R G B to bitmap outputs with alphas of bitmaps attached to the individual height fields then compiled in Photoshop and this is the result I have had from the extraction
    $RGB_Channel_Splat_WM_002.jpg
    This method I have used has been alongside Wendas tut's for the Cry engine
     
    Last edited: Mar 26, 2013
  42. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,899
    correct

    if red shows up your alpha channel should be white = 1...
    that is the default setting of unity if there isn’t any alpha channel.
    if you want to import a rgba splat map where the alpha channel is not simply black you will have to make sure that there is no color (rgb) where there is white in your alpha channel.
    i guess you can simply copy the alpha channel as layer on top of your layer set, invert it, then choose "muliply" as blend mode.

    read the documentation! ;-)
    you only need the second terrain to paint textures 5 and 6 and the decals. after having done so you can simply deactivate the second terrain (no rendering cost at all) or even delete it from the hierarchy (NOT from the project tab – unless you haven’t exported its second splatmap)


    lars
     
  43. malessandro

    malessandro

    Joined:
    Mar 23, 2013
    Posts:
    7
    'Color Generator' seems to work very well. But you lost me at "... bitmap outputs with alphas of bitmaps attached to the individual heught fields" :)

    Could you get into more detail on that? Or attach a screenshot?

    Right now I would combine the 3 bitmap outputs to a single bitmap in photoshop. Is there a workaround to add a 4th color maybe in the alpha or so? I try to get a splatmap which contains beach, grass, rocks and flow map.
     
    Last edited: Mar 26, 2013
  44. horse

    horse

    Joined:
    Jun 17, 2009
    Posts:
    19
    Sorry, i should be more specific.

    Lars, would you mind sharing the mesh blend script in its current state so i can try it out?

    Thanks
     
  45. zangad

    zangad

    Joined:
    Nov 17, 2012
    Posts:
    355
    I'm also interested in the mesh blending. It looks like it would be a great terrain tool. Would love to see it picked back up.
     
  46. toby29

    toby29

    Joined:
    Sep 8, 2012
    Posts:
    15
    With regards to the bitmap output in world machine you have one input which is RGB Input which you connect your green color generator to then the other input for the bitmap output is alpha which I connect for the Flow map height field to the bitmap output alpha input
    $WM_001.JPG
    I have tried to use a 4th colour also for the texture but according to Lars he says it is difficult to use a forth and get the R+G+B = 1 but can be used to paint with the texture, look at my previous post, hope that helps
     
  47. toby29

    toby29

    Joined:
    Sep 8, 2012
    Posts:
    15
    -with regards to the combined detail texture normals, do the detail textures have to be of the same tiling size?

    In my current scene each detail texture has a different tiling size, so for combined normal 34 the detail texture for slot 3 is tiled by 20 and detail texture for slot 4 by 8, does this mean that my combined normal will not fit to the texture?
    do the Tiled x y values of my combined normal have to be the same as the detail texture?
    any help would be greatly appreciated thanks? :)
     
  48. larsbertram1

    larsbertram1

    Joined:
    Oct 7, 2008
    Posts:
    6,899
    the tiling of each detail texture can be adjusted individually but the related normal map will use the same tiling as the detail texture.

    nevertheless – let’s say you have:
    - layer0 = ground: tiling 10
    - layer1 = grass: tiling 8
    then you will get on the combined normal maps:
    - layer0 normal = ground normal: tiling 10
    - layer1 normal = grass normal: tiling 8

    the only restriction is the size: both normal maps combined into one have to have the same size, whereas the detail textures can have different sizes.
    so in case you work with different resolution on your detail textures the related normal map might get a lower resolution as the detail map.

    lars
     
  49. fouldsc

    fouldsc

    Joined:
    Mar 29, 2013
    Posts:
    4
    Hi,
    Just looking into this and it looks great, read the whole thread and I am wondering if anyone has tried it on iOS and what the performance is like ?
     
  50. China_Wakes

    China_Wakes

    Joined:
    Nov 18, 2012
    Posts:
    3
    I purchased yesterday spent the better bulk of today getting to grips with it and I must say...it ain't half bad. I did have some major issues at first but reading this thread and Googling ironed most of them out. I'm working on a 4096+1 x 4096+1 WM file with a height ceiling of 2500 metres, to be imported into Unity 4.1.

    For $10 it's a sneeze. Incidentally, what about updates for proven purchasers? Just thought I'd ask.


    EDIT: Oh well, perhaps not then.

    $fail.jpg
     
    Last edited: Apr 1, 2013