Dirt, mud on glass/transparent

Hi Guys!

Jees I’ve been trying for the last couple of days to do something that should be so damn easy, but just can’t get my head around it! I’ve search online, but none of the tuts are that relivent, nor 2.5 orientated.

All I want to do is add a dirt texture to a glass/transparent material, i.e like dirt on a car windscreen - so that some of the glass is transparent and the rest masked with a dirt and bump texture. I’ve tried stencils and alphas, but I just can’t set it up right.

Andrew Price had a tut on adding condensation to a glass window, but this isn’t the kind of effect I’m after.

Anyone out there that can explain this (in reasonable detail), or point me to a tutorial somewhere on how it’s done? You’d think this topic would come up often as glass is rarely clean.

Cheers in advance, Jay :slight_smile:

Well I guess either nobody knows, or it’s just too easy a question to answer. I sussed it out in the end :slight_smile:

For the noobs that don’t know…

  1. Set up a material that is transparent, either ZTrans or Raytrace (which ever you require).
  2. Create a texture in Gimp, Photoshop etc of a texture that has the dirt texture and an area for the alpha (transparent) area, Make sure that the first background layer is removed and then save as a PNG.
  3. On your new material add a new texture and in the “Image” tab check ‘Premultimply’ to smooth off the anti-aliasing
  4. On the “Influence” tab check Colour and Alpha, leaving both at the default 1.0.
    Leave everything else as default and you should have the dirty glass texture, simple!
  5. For a bump map/Normal map, you may need to modify the original texture in Gimp/Photoshop and make the texture flat (without the alpha), change the texture to just white/grey/black by desaturating and maybe just darken some of the more brighter spots so they don’t look too bumpy. Load this new png into another texture slot on the same material and un-check Colour and select Normal and adjust to suit.

Only took my several days of stress, I don’t know what I was thinkin! :wink: