Search Unity

[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:
    110
    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
  2. ThermodynamicsMakesMeHot

    ThermodynamicsMakesMeHot

    Joined:
    Feb 14, 2015
    Posts:
    224
    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:
    110
    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:
    224
    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:
    110
    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:
    224
    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:
    110
    Glad to hear that :)
     
  8. Thunderbyte

    Thunderbyte

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

    Thunderbyte

    Joined:
    Aug 28, 2015
    Posts:
    110
    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:
    110
    Update :
    Added control settings to the blending mask for all shaders.
     
  11. Artaani

    Artaani

    Joined:
    Aug 5, 2012
    Posts:
    423
    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:
    110
    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:
    501
    Looks great, bookmarked.
     
  14. milox777

    milox777

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

    Thunderbyte

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

    atomicjoe

    Joined:
    Apr 10, 2013
    Posts:
    1,869
    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:
    110
    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:
    110
    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:
    110
    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:
    110
    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:
    110
    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:
    7
    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:
    110
    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:
    110
    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:
    9
    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
  30. Thunderbyte

    Thunderbyte

    Joined:
    Aug 28, 2015
    Posts:
    110
    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:
    9
    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:
    110
    Awesome !
    Let me know if you have any issues.
     
  33. rboerdijk

    rboerdijk

    Joined:
    Aug 4, 2018
    Posts:
    96
    Hello,
    I was wondering, there is a standardDirt, but no StandardRust shader?
    Testing with a spacegame, and since the Procedural dust is worldspace-based and spaceships turn in all kind of directions, it doesn't make sense to have Dirt (at least not procedural) in that usecase (so no use doing any calculations related to dust).
     
  34. Thunderbyte

    Thunderbyte

    Joined:
    Aug 28, 2015
    Posts:
    110
    hi,
    Are you in a situation where you only need the rust and not the dust ?
     
  35. rboerdijk

    rboerdijk

    Joined:
    Aug 4, 2018
    Posts:
    96
    Yes

     
  36. Thunderbyte

    Thunderbyte

    Joined:
    Aug 28, 2015
    Posts:
    110
    I'll try to add it asap.
     
    rboerdijk likes this.
  37. rboerdijk

    rboerdijk

    Joined:
    Aug 4, 2018
    Posts:
    96
    Thanks for adding support for that, that will be really convenient. Don't stress yourself out, it's not really urgent because I can just use the RustDirt URP shader and ignore the dirt for now.

    Also.. you really should mention ase-support on your storepage, that would have been a huge plus. Right now I assumed it would be some hardcore shader, but seeing the graph and to be able to make modifications is great! For fun tried adding ao-support, and that wasn't that difficult. Definitely going to take a closer look at how it works (not much experience with shaders).
     
  38. Thunderbyte

    Thunderbyte

    Joined:
    Aug 28, 2015
    Posts:
    110
    You're right about ase, thank you !
    I initially wrote the shaders by hand but then moved everything to shader forge and then amplify shader upon user suggestions.
    Modification is pretty straight forward. Just tweak the graph and if you've added properties, you'd need to add them to the displayed properties in the shader GUI (just like in the provided GUI scripts).
     
  39. C_R_M

    C_R_M

    Joined:
    Dec 1, 2017
    Posts:
    4
    Hello there, if your buying this asset and using unity 2020 + and HDRP 10.x + you will need to modify the HDRP shaders manually to make them work due to some breaking changes introduced to HDRP 10.x package

    `GetDecalSurfaceData` and `ApplyDecalToSurfaceData` are now taking an extra parameter.

    The only normal info I found close by was `normalTS`, Thunderbyte will have to confirm if that's the correct parameter to use, the shader seems to work fine though :).

    Change code to:

    DecalSurfaceData decalSurfaceData = GetDecalSurfaceData( posInput, normalTS, surfaceDescription.Alpha );
    ApplyDecalToSurfaceData( decalSurfaceData, normalTS, surfaceData );



    Same with `LightLoop`, the output is now different.

    Change code to:

    LightLoopOutput lightLoopOutput;

    LightLoop(V, posInput, preLightData, bsdfData, builtinData, featureFlags, lightLoopOutput);

    diffuseLighting = lightLoopOutput.diffuseLighting;
    specularLighting = lightLoopOutput.specularLighting;
     
  40. Thunderbyte

    Thunderbyte

    Joined:
    Aug 28, 2015
    Posts:
    110
    Thank you for your input.
    I'll push an update as soon as possible.
     
    C_R_M likes this.
  41. Husmanmusic

    Husmanmusic

    Joined:
    Apr 6, 2020
    Posts:
    4
    Hi, For some reason I can't update to 1.6. It only allows me to download 1.4. Which doesn't have the URP package. Could you help me out? Thanks in advance!
     
  42. Thunderbyte

    Thunderbyte

    Joined:
    Aug 28, 2015
    Posts:
    110
    Hi,
    What version of unity are you using ?
     
  43. Husmanmusic

    Husmanmusic

    Joined:
    Apr 6, 2020
    Posts:
    4
    Hi, I'm using Unity 2019.3.8f1
     
  44. Thunderbyte

    Thunderbyte

    Joined:
    Aug 28, 2015
    Posts:
    110
    You need at least version 2019.3.12f1 for the later version.
    Can you update unity ? If you not, i'll send the shaders to you by email.
    Please let me know.
     
  45. Thunderbyte

    Thunderbyte

    Joined:
    Aug 28, 2015
    Posts:
    110
    Check your email box.
    Let me know if you still have issues.
     
  46. rafaelbarretobra

    rafaelbarretobra

    Joined:
    Aug 5, 2015
    Posts:
    11
    Hello Thunderbyte, just bought the shaders, looking good. I'm having trouble though figuring out the layers. I made a model and brought it to Unity, but the 2layers shader seems only to be throwing layer 2 on the model. How did you separate the wheels of the tank to layer 1 and the shell to layer 2?
     
  47. Thunderbyte

    Thunderbyte

    Joined:
    Aug 28, 2015
    Posts:
    110
    Hey Rafael,
    For the 2 layer shader, whatever is red in the mask (or in vertex colors) selects for layer 2, everything that is not red is layer 1.
    For 3 layer shaders, the masking is as follows :
    • red selects Layer 2
    • green selects layer 3
    • everything else selects layer 1
    if you temporarily uncheck "use vertex colors" on the shader's inspector to reveal the "Material Mask", you can hover it and the tooltip will tell how the layers are selected.
     
  48. C_R_M

    C_R_M

    Joined:
    Dec 1, 2017
    Posts:
    4
    Hello, Thunderbyte,
    Quick question, can I achieve full transparency with any of the HDRP shaders?
    Mucking around with the alpha on any layers does not seem to do anything.
    The use case is that I am trying to fade in/out an object.
     
  49. Thunderbyte

    Thunderbyte

    Joined:
    Aug 28, 2015
    Posts:
    110
    Currently the alpha is used to control masks the masks. But transparency is an interesting use case.
    I'll try to add it this weekend.
     
  50. C_R_M

    C_R_M

    Joined:
    Dec 1, 2017
    Posts:
    4
    Oh wow, ok.
    Looking forward to it, thanks :D