Search Unity

  1. Unity 2020.1 has been released.
    Dismiss Notice
  2. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

[RELEASED] Rust, Dust and Layers Shader Pack

Discussion in 'Assets and Asset Store' started by Thunderbyte, Apr 4, 2018.

  1. Thunderbyte

    Thunderbyte

    Joined:
    Aug 28, 2015
    Posts:
    84
    This is a pack of shaders that allow for easy material blending and layering of multiple surface types.
    Sometimes you don't need separate materials for meshes. You also don't need to rebake all your textures for a small change to a specific surface type.
    By blending materials, you can have full realtime control over multiple surface types with just 1 draw call.

    These shaders allow you to quickly add configurable rust and dirt or any type of material as a layer on top your surfaces, either procedurally or by using configurable masks.

    They can be used to quickly give depth and character to your scenes or to generate variations/skins for your props with very little effort.

    HD and LW render pipeline shaders are included in the package.
    Store Link






    Screenshot 1.png
    Screenshot 2.png
    Screenshot 4.png
    Screenshot 3.png
    Screenshot 7b.png
     
    Last edited: Apr 13, 2020
    Artaani, Mauri and Brian-Ryer like this.
  2. ThermodynamicsMakesMeHot

    ThermodynamicsMakesMeHot

    Joined:
    Feb 14, 2015
    Posts:
    222
    These look like a nice easy way to make thinks look more apocalyptic with models already having rather than having to buy specific ones. Would you have any examples how it would look for say a house or shed?

    Couple questions...First, what makes it so big: Size: 565.9 MB is pretty huge just to add an shader but I assume it's due to all the demo examples maybe? Next question would be does it work well on mobile?

    Thank you.
     
  3. Thunderbyte

    Thunderbyte

    Joined:
    Aug 28, 2015
    Posts:
    84
    The way it works is you paint your rust/dust/material masks the way you'd paint smoothness or metalness for example, and the shaders hook onto the masks and allow you to manipulate them.

    The shaders give you the option to add rust and dust procedurally without specific masks, but of course, masks will give you the best results since you can specify exactly how and where everything should be.

    The shaders and editor code weigh less 600kb, everything else comes from the demo scenes (mostly textures).

    I added youtube links to the first post. You can see how some of the shaders work. I made the mask textures used there by simply painting the corners and the hard edges for the rust. For the dust I painted all over the models but mostly the in cavities.

    If you have a house model available, I could demo it and post here.
     
    Last edited: Apr 4, 2018
  4. ThermodynamicsMakesMeHot

    ThermodynamicsMakesMeHot

    Joined:
    Feb 14, 2015
    Posts:
    222
    I am interested in the procedurally generated part with supplying the rust textures and doing it all by code rather than an art program. I am going to check these videos out later. I would love to see the difference as to what your speaking of "Procedurally vs Masks". I am far more at home in a IDE then an art program.

    With regards to a house...may I direct you to this package: WasteLand Lite -> Currently using the full package in a Project and would be very interested to see how this would work on some of those models.

    I totally understand it will always look better with texture masks but if it still looks reasonable good to scruff up buildings and whatnot I already have than it's going to be a must have tool for me.

    I have tried to do similar things with other ShaderPacks but it takes me so long :). I would much rather buy a premade shader :)

    Thank you very much for all the information and replies. If you happen to have time and can show off what it can do with that kit above I would be very happy to see what the results would be.
     
  5. Thunderbyte

    Thunderbyte

    Joined:
    Aug 28, 2015
    Posts:
    84
    I quickly threw around an example with a building facade :


    And added some dust/moss to one of the walls of that package. I used the existing model/textures/UVs.

    wasteland wall.png
     
  6. ThermodynamicsMakesMeHot

    ThermodynamicsMakesMeHot

    Joined:
    Feb 14, 2015
    Posts:
    222
    Thank you. I really like this and I know it will add that extra flare to make things look all the better. It looks really good.
     
  7. Thunderbyte

    Thunderbyte

    Joined:
    Aug 28, 2015
    Posts:
    84
    Glad to hear that :)
     
  8. Thunderbyte

    Thunderbyte

    Joined:
    Aug 28, 2015
    Posts:
    84
    Update : Reduced the package size by about half. Downloading/updating are now less tedious.
     
  9. Thunderbyte

    Thunderbyte

    Joined:
    Aug 28, 2015
    Posts:
    84
    Added a faster version of the shaders. Useful for low spec targets and mobile.
    Update is live !
     
  10. Thunderbyte

    Thunderbyte

    Joined:
    Aug 28, 2015
    Posts:
    84
    Update :
    Added control settings to the blending mask for all shaders.
     
  11. Artaani

    Artaani

    Joined:
    Aug 5, 2012
    Posts:
    418
    Hello, it looks amazing! Seems like a revolution in creation of weared objects.
    I have a couple of questions:

    1. Is UV required? The shader will work it the mesh have no UV? I mean if UV value for all vertices will be 0 0.
    2. Will it work in case if a mesh have intersections? Look an example below.

    2018-12-20 19_30_11-Window.png
    Note that first mesh consist of 3 cubes basically, while the second mesh does not have any faces inside.
    The shader for the first mesh will work as good as for the second mesh?
     
  12. Thunderbyte

    Thunderbyte

    Joined:
    Aug 28, 2015
    Posts:
    84
    Hi,
    1. You can get away with messy UVs if you only use the procedural methods, ie. you can control how much dust there's on the top side of the mesh, the dust mask, the rust, tiling, contrast, levels, etc. And if your UVs are not too bad, you can get somewhat good results even if the UV shells are overlapping.
    If you want really good dust/rust patterns (in the crevasses, edge wear, scratches etc.), you need to paint a mask and feed it to the shaders. Then you can get greater control over everything. In that case, you definitely need proper UVs.
    However, if all your vertices have a (0, 0) UV coordinate none of the methods will work unfortunately.

    2. If you have good UVs, intersecting meshes are not a problem.
     
    Last edited: Dec 13, 2019
    Artaani likes this.
  13. iddqd

    iddqd

    Joined:
    Apr 14, 2012
    Posts:
    425
    Looks great, bookmarked.
     
  14. milox777

    milox777

    Joined:
    Sep 23, 2012
    Posts:
    118
    Does this work with LWRP?
     
  15. Thunderbyte

    Thunderbyte

    Joined:
    Aug 28, 2015
    Posts:
    84
    Hey milox,
    Compatibility with LWRP will come in a future update.
     
    milox777 likes this.
  16. atomicjoe

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    829
    Hi!
    Does this shader place the rust on the edges and creases automatically?
    I mean, in the tank and car examples, the rust and wear is localized on the edges and creases of the models.
    Do this shader detect this edges and creases procedurally or does it need a manually made mask texture for that?
    Thanks.
     
  17. Thunderbyte

    Thunderbyte

    Joined:
    Aug 28, 2015
    Posts:
    84
    No it doesn't do that. if you want it to be localized, you have paint a mask texture and the shader will let you spread it more or less and adjust its intensity. The blue tank in the screenshot uses that method.

    If you need the rust/dust to be applied evenly over the mesh you don't need a mask. You can still control how much it's spread and how intense it is. The red tank uses that method.
     
    atomicjoe likes this.
  18. Thunderbyte

    Thunderbyte

    Joined:
    Aug 28, 2015
    Posts:
    84
    Update :
    Added a script that randomizes the intensity and contrast of masks while preserving batching. Works with Coating2Layers and Coating3Layers.

    Tank variations.png
     
    milox777 likes this.
  19. Goblox

    Goblox

    Joined:
    Nov 3, 2012
    Posts:
    178
    How much trouble do you suppose it would be to get to a point where this could be be used with something like "Mesh Baker"? Seems like the next logical step.
     
  20. Thunderbyte

    Thunderbyte

    Joined:
    Aug 28, 2015
    Posts:
    84
    If your meshes are using the same shader, Mesh baker can easily merge and create atlases for you.
    It will figure out the usual texture properties like color, normal etc. But you have to give it the names of the texture masks so that it can make an atlas out of them (in the MB's texture baker, under "custom shader property names").
     
  21. Goblox

    Goblox

    Joined:
    Nov 3, 2012
    Posts:
    178
    Crazy Question, Probably already answered somewhere:
    Any chance of getting one or two more layers? ...possibly in a pro version?
     
  22. Thunderbyte

    Thunderbyte

    Joined:
    Aug 28, 2015
    Posts:
    84
    If you use a 3 three layer shader for example, and batch the geometry and textures, you still have access to the same 3 layers.
    The layers are provided by the shader and are not affected by the baking process.
     
  23. tytul_roboczy

    tytul_roboczy

    Joined:
    Jun 10, 2015
    Posts:
    1
    Hi Thunderbyte! I've got a question. I'm using Standard2Layers LWRP and every time I click play in editor all materials with this shader changes checkbox Use vertex Color to on. It's annoying because I want to use Material Mask control. Any solve for this?
     
  24. Thunderbyte

    Thunderbyte

    Joined:
    Aug 28, 2015
    Posts:
    84
    As you said, it's really annoying to deal with. Sorry about that.
    I just fixed it and the update should be live soon.
    If you don't want to wait, shoot me an email and I'll send you the update.
     
  25. alihamie

    alihamie

    Joined:
    Jun 18, 2015
    Posts:
    6
    Hi Thunderbyte ! this asset is really impressive. Is there LWRP support for it yet ? Do you have a version without the demo scenes ? My slow internet wouldn't let me download 200mb.
     
  26. Thunderbyte

    Thunderbyte

    Joined:
    Aug 28, 2015
    Posts:
    84
    Hi alihamie,
    LWRP is already supported.
    Regarding the package size, email me and I'll send you a shader only package (a ~900kb file).
     
    Last edited: Mar 14, 2020
  27. SirMal666

    SirMal666

    Joined:
    Apr 21, 2020
    Posts:
    3
    Hello!
    Your shader look very cool on the asset store.
    I am considering buying it. I first would like to make sure I understand how this shader works to see if it could work for my project.

    So from my understanding, you say there are 2 ways to use this shader:
    • Procedural
    • Using a Mask
    Here are my questions:
    1. Is the procedural way world position or will the object always look the same?
    2. So does that mean you don't need a normal map to make this work on a object?
    3. The mask is a grayscale image or is it a color image?
    4. Do you have to make a mask for each layer or do they all use the same mask?
    5. What resolution must the mask be? (Thinking of textures memory budget for games)
    Hoping to hear from you soon.
    Keep up the good work and thanks in advance for the answer!
    Have a nice day! :)
     
  28. Thunderbyte

    Thunderbyte

    Joined:
    Aug 28, 2015
    Posts:
    84
    Without a mask the shaders allow you to apply rust evenly across the mesh. You have a main rust and a secondary one that you can adjust with a slider. This procedural rust uses the default rust mask (Red channel for main rust, blue for the secondary), and you can use your own mask if you want a different look. Then you can control the amount and contrast of that rust.
    You need to have reasonably good UVs though, and overlapping UVs are not a problem for this approach.

    This type of rust is used on the red tank on this screenshot :
    Screenshot 4.png

    On the dust side, without a mask, there's a top/down dust feature and you can control how much of it there is and how far it extends.

    Then you can use masks to determine exactly where the rust/dust are and control that mask's intensity and contrast. This approach is used on the blue tank on the screenshot above.

    You can always adjust the influence of your mask map and let the shaders go from fully driven by the mask map to fully procedural or anything in between (adjustable per rust/dust layer).

    So to answer you questions :

    1- the procedural rust is in mesh space, procedural dust is in world space.

    2- You don't need a normal map. The rust normal will work without it and you can remove that too if you like.

    3- Masks are grayscales packed in channels. The usual pattern is Metallic(in the red channel), Rust(green), dust (blue), smoothness (alpha). You can hover the specific mask map and the tool-tip will show you the format. I try to pack textures as much as possible to save memory.

    4- Each layer has its own mask map but you can reuse the same mask maps if your UVs allow it. The layers in the tanks in the screenshot above share the same mask maps for example.

    5- Usually 1k-2k are fine, 4k is a pain to load/stream from disk, but really, it depends on the target platform, how much texture data you have and how often you manage to reuse your textures.
     
    SirMal666 likes this.
  29. TrueJollyRoger

    TrueJollyRoger

    Joined:
    Dec 23, 2017
    Posts:
    7
    Hello,
    could you please advice what could it be. I suspect it something very simple as usual for very persistent issues.
    All materials with a shaders from this pack are "pink" and don't want to upgrade to Universal pipeline with "material was not upgraded. There's no upgrader to convert". error.
    Updated Unity to 2020.1.1f1, reloaded assets, didn't help.
     
    Last edited: Aug 7, 2020 at 8:21 PM
  30. Thunderbyte

    Thunderbyte

    Joined:
    Aug 28, 2015
    Posts:
    84
    In the "shaders" folder there's a "URP Shaders" package. Double click to decompress it. You need to use those shaders. They all end with URP.
    There is also HDRP and LWRP packages for the respective render pipelines.
     
  31. TrueJollyRoger

    TrueJollyRoger

    Joined:
    Dec 23, 2017
    Posts:
    7
    Thank you! For some magic reason I installed 1.4 version instead of 1.5, so didn't get this pack.
    Worked like a charm!
     
  32. Thunderbyte

    Thunderbyte

    Joined:
    Aug 28, 2015
    Posts:
    84
    Awesome !
    Let me know if you have any issues.
     
unityunity