Home Unity

Best approach for adding dirt to this large object?

jordank95
polycounter lvl 9
Offline / Send Message
jordank95 polycounter lvl 9
I want to set up a shader that adds in dirt to my asset that uses a trim sheet. What is my best approach here?

RGB Shader? I would have to use a second UV channel. Where can I learn how to do this? Theres no tutorials I can find.

Vertex Paint? I know the way unity handles vertex painting assets is completely roundabout with using Probuilder and Polybrush? Is there another way to do this? Seems a bit much.

Any help would be appreciated here. Im losing my mind. 

Replies

  • Eric Chadwick
    An image would help, hard to understand exactly what you’re wanting to do.

    Is this for a mobile game? Performance is at a premium there, so would have to get crafty with the shader.

    Lots of ways to do dirt mapping. An example of what you have so far, and what you’re aiming towards would help a ton.
  • jordank95
    Offline / Send Message
    jordank95 polycounter lvl 9
    @Eric Chadwick thanks, I wish I could add a pic but its for work and Im not really allowed to. Its a small building though. I have just gone with a trim sheet approach (one clean, one dirty) to add in dirt with vertex painting the building mesh. Then using decals on top of that for other things like leaks and added grime. 

    Though I would absolutely love to be able to set up an RGB mask shader so I can have all this dirt added with masks, but unfortunately I lack a bit of knowledge how to set that up in Unity.
  • Eric Chadwick
    I would use vertex painting for this. Avoids the need for a second UV, and another texture for the mask. Plus it can be unique per building, without adding a new mask texture for each building.

    I haven’t used Unity in a while, but it comes with a shader editor I think. There have to be a lot of tutorials out there for how to wire up a vertex masking shader.

    You would need to add some extra vertices here and there, depending upon how lowres the buildings are. Vertex color is just a linear gradient between two verts, so it could span the whole width of a building if the resolution was low.
Sign In or Register to comment.