Home Technical Talk

PBR: Beat-up metal?

Hello all.
Up till now I've primarily been a programmer, but now I'm trying to take a leap into the world of 3D modeling.
I've been looking a this PBR stuff and it's quite cool. I went ahead and threw together a barrel using Blender, Photoshop CC, and Legacy dDo and I kind of like it.
But.
The metal looks off to me. My issue is that I have no idea what the best way is to grunge up metal in a PBR setup. Right now I've added scratches to the gloss/roughness map but it still doesn't look quite right.
Any pointers?
Here's what my barrel looks like now in Unity (with Lux).

attachment.php?attachmentid=17428&stc=1&d=1400958329

Replies

  • fade1
    Options
    Offline / Send Message
    fade1 polycounter lvl 14
    google a barrel and look at the metal. looks very different to your picture.
    then get a similar base texture. use this as a base roughness texture and mask rust in specular/reflectivity. basically you have to treat rust and metal as two different type of materials...
  • PhobicGunner
  • Brygelsmack
    Options
    Offline / Send Message
    Brygelsmack polycounter lvl 11
    Your best bet is to post your texture flats so people can have a look.
  • PhobicGunner
    Options
    Offline / Send Message
    Hm, might go ahead and redo the barrel textures first.
    For one thing the normals blow goats at the moment. I basically threw something together with photoshop and NVidia tools.
    What I should do is make a highpoly version and bake the normals onto the low poly (plus better/more detailed ambient occlusion). THEN I'll probably rework the textures in dDo and post them when I've finished.
  • Shrike
    Options
    Offline / Send Message
    Shrike interpolator
    work in high resolution, theres no reason to make it harder by using low res, one challenge at a time. Theres stretching and barely enough texels to have any detail on the metal if you want to practice that

    I think what you think at when you say you are missing something, is wear & tear / scratches. The rest is done with just more detailed base metal diff/Spec/gloss
    Try making the convex edges worn off by making them rougher + lighter diffuse (?) with some grungy brushes / erasers.

    the rust is also lacking depth and variation
  • PhobicGunner
    Options
    Offline / Send Message
    Yeah, the rust was auto-generated by dDo. Should just rip it right out and do it myself.
    Try making the convex edges worn off by making them rougher + lighter diffuse with some grungy brushes / erasers.
    Should the metal really have any color in the diffuse, though? I thought that kind of went against PBR.
  • sprunghunt
    Options
    Offline / Send Message
    sprunghunt polycounter
    Should the metal really have any color in the diffuse, though? I thought that kind of went against PBR.

    This depends on what shader model you're using. If you're using the 'metalness' shader model then the diffuse colour of a metal becomes the specular colour - non metals just don't have specular colour.

    for the other shader model there's this handy lookup table from marmoset:

    materialref01.png

    notice that unless the material is extremely shiny it still has a bit of albedo.
  • PhobicGunner
    Options
    Offline / Send Message
    I'm not using the metalness workflow (I'm using Lux, an open source PBR shader framework for Unity)
    So, anywhere that's less shiny should be lighter in the diffuse map then, and darker in the roughness map?
  • sprunghunt
    Options
    Offline / Send Message
    sprunghunt polycounter
    I'm not using the metalness workflow (I'm using Lux, an open source PBR shader framework for Unity)
    So, anywhere that's less shiny should be lighter in the diffuse map then, and darker in the roughness map?


    The lux shader is based off the work of Dontnod entertainment. Here is a post from the tech artist who helped create that shader model of the specular chart that explains what settings to use for different materials:

    http://seblagarde.wordpress.com/2012/04/30/dontnod-specular-and-glossiness-chart/
  • PhobicGunner
    Options
    Offline / Send Message
    Hm, that should come in handy :)
    So I assume my beat-up metal's roughness would occupy the lower part of that chart (somewhere a bit above rusty pennies)?
  • Quack!
    Options
    Offline / Send Message
    Quack! polycounter lvl 17
    While those values are a great starting point, eyeballing the proper values through trial and error will lead to the best result.
  • DevconOne
    Options
    Offline / Send Message
    Yeah, the rust was auto-generated by dDo. Should just rip it right out and do it myself.


    Should the metal really have any color in the diffuse, though? I thought that kind of went against PBR.

    Black as metal base is the purest of the pure that should not occur often in real life. Even if the metal has theoretical a nearly black diffuse, there are so many layers of chemical processes on it in real life that I dont think that its ever truly right (if you are not going for a stilized look)
  • Shrike
    Options
    Offline / Send Message
    Shrike interpolator
    Yeah, the rust was auto-generated by dDo. Should just rip it right out and do it myself.


    Should the metal really have any color in the diffuse, though? I thought that kind of went against PBR.

    Im not 100% sure, but thats what I see from observation on rl objects. The worn edges usually are a lot lighter
    Maybe its just the specular contribution that increases and not the diffuse, but the high roughness makes it appear a lot lighter aswell, as the highlight is very broad. Last time I tested some materials, higher spec seemed to look a lot worse for the worn edges effect over lighter diffuse (+ rougher ofc) but thats not a good sample size to make assumptions upon however.

    but I dont know how metals react on a microfiber base when worn, I guess that depends again on which metal, and is it coated or not, and with what is it coated, an alloy ? etc.
  • stevston89
    Options
    Offline / Send Message
    stevston89 interpolator
    DevconOne wrote: »
    Black as metal base is the purest of the pure that should not occur often in real life. Even if the metal has theoretical a nearly black diffuse, there are so many layers of chemical processes on it in real life that I dont think that its ever truly right (if you are not going for a stilized look)

    I am not sure I would take this advise. Every single resource I see for a reflectance based PBR workflow says to make you metal black in the diffuse. This is with good reason metal doesn't have diffuse reflection it is only specular. Now there are things that sit on top of metal that certainly won't be black. Things like tarnish, rust, oxidation, and dirt, but those things aren't metal so of course they won't react like metal. Unless all of your metal is coated in tarnish or dirt use black for your diffuse.
  • PhobicGunner
    Options
    Offline / Send Message
    stevston89 wrote: »
    Unless all of your metal is coated in tarnish or dirt use black for your diffuse.

    Tarnish/dirt is exactly what I'm going for :)
    This is supposed to be a somewhat old barrel - those metal rings shouldn't exactly be pristine.
  • stevston89
    Options
    Offline / Send Message
    stevston89 interpolator
    Yes, but you don't want the whole thing to be tarnish. You want tarnish building up in some areas and the wear revealing the metal underneath. Any dips or crevices in the metal will have tarnish they doesn't go away, but areas of use won't. Also I think you may be confusing tarnish with cast iron. Cast iron doesn't react like a metal in terms of reflection.

    Here is some ref for tarnished metal:

    il_fullxfull.341514315.jpg

    DSCN5863edited.jpg


    And here is cast iron ref:

    QtrBbl.jpg
  • HarlequiN
    Options
    Offline / Send Message
    HarlequiN polycounter lvl 18
    Wow, been ages since I posted on here, but still.

    The diffuse albedo for metal when using a PBR workflow is black. Always black, but the crap that builds up on it may not be. That said, certain types of tarnish (metal dependent) are still basically just metal that's been tinted - The tarnish or patina is generally too thin a layer to cause a noticeable shift in the diffuse colour, but if you did want one you'd make it very very dark, but the Specular Base Reflectivity would drop, and become tinted slightly differently (the tint color and severity being based on what caused the tarnish in the first place, and the type of metal that is being tarnished - silver shows it quite severely)

    As for dirt or other forms of oxidization or corrosion, such as rust, that's going to replace your material. In the case of dirt it's going to have to be a fair amount to really block the metallic level of the SBR, but it might add some slight color or lightness to the diffuse (unless the dirt itself is black), and it will almost certainly affect the roughness.

    Rust on the other hand replaces the metal rather than coating it, and will result in colour coming through strongly in the Diffuse Albedo, and a rapid (often hard edged) change in the Specular Base Reflectivity. Roughness will also be much higher than the default metal.

    Scratches will effect the roughness, but unless they're big gouges you're not going to get a clear scratch on a relatively small texture (and it would need to be big and deep to bother adding to the normal), just as you can't see a clear scratch in the photo posted by stevston89, except right on the leading edge. Scratches tend to cause a reduction in the roughness when you can see them individually, but an increase when taken as micro detail.

    Generally I just stick to making edge wear a little smoother to catch better highlights (the equivalent of the old technique of painting scratches along there white), and then throw in a couple of major scratches while leaving the rest of it as a slight randomness in the roughness map (grab some random grime texture or contrasty photograph and overlay or multiply it over the roughness at ~5% opacity, you'll still see the difference).

    My advice would be to get the metal correct first though, and then add the layers of gunk and such on top. If the metal doesn't look right clean you'll never get it right dirty. What is the metal? Is it Iron? Is it Steel? If it's steel then it will usually be considerably darker than Iron for these sorts of purposes; Steel, being an alloy, can be mixed many different ways depending on it's application, and as a result has no set Specular Base Reflectivity value. Steel is a mix of iron and carbon though, so the SBR is unlikely to go up (Stainless steel has chromium added, which increases it's relative brightness). Steel is also very slightly blue tinted, as is Cast Iron (if memory serves).

    Hope that helps!
  • EarthQuake
    Options
    Offline / Send Message
    Holy crap its HarlequiN, whats it been, like 5 years?
  • PhobicGunner
    Options
    Offline / Send Message
    OK, tomorrow is modeling day for me (most of the week is programming stuff, but on the weekends I try to improve my art).
    Actually, what I will probably do tomorrow is experiment with just creating PBR materials. Probably slap it on a cube in Unity with Lux rather than worry about a whole model.
    After I can create good-looking materials, I can then work on combining those together into a full texture.

    Thanks for some of the tips. Should be very helpful.
  • HarlequiN
    Options
    Offline / Send Message
    HarlequiN polycounter lvl 18
    Hi EQ! :) Yeah, about 5 years. I get busy and then years have passed, sad really. I blame old age.

    Anyway, I should add a caveat about the diffuse for metals always being black - that's not the case if they're mixed with something that isn't black, obviously. Alloys like that aren't terribly common, but metallic paint and metallic plastics are, and they carry the Diffuse Albedo colour of the non-metalic base. This makes no odds to what you're working on currently Phobic, but it's worth bearing in mind if it ever comes up.
  • EarthQuake
    Options
    Offline / Send Message
    Good to see you're still alive and well. :poly124: You should stop by more often!
  • Quack!
    Options
    Offline / Send Message
    Quack! polycounter lvl 17
    HarlequiN wrote: »
    Hi EQ! :) Yeah, about 5 years. I get busy and then years have passed, sad really. I blame old age.

    Anyway, I should add a caveat about the diffuse for metals always being black - that's not the case if they're mixed with something that isn't black, obviously. Alloys like that aren't terribly common, but metallic paint and metallic plastics are, and they carry the Diffuse Albedo colour of the non-metalic base. This makes no odds to what you're working on currently Phobic, but it's worth bearing in mind if it ever comes up.

    I just want to clarify something here because there could be confusion.

    In Unreal 4, your BaseColor/Diffuse/Albedo shouldn't always be black for metals. UE4 uses the BaseColor/Diffuse/Albedo as the spec color when something is metallic. So technically, the diffuse contribution gets set to black, but the color is transferred to the spec color, so it is still needed.
  • PhobicGunner
    Options
    Offline / Send Message
    Yes, in the metalness workflow you don't really have a separate spec color texture.
    In my case, I do have separate diffuse/spec color textures (not using metalness workflow), therefore my metal albedo IS black.
  • Quack!
    Options
    Offline / Send Message
    Quack! polycounter lvl 17
    Yes, in the metalness workflow you don't really have a separate spec color texture.
    In my case, I do have separate diffuse/spec color textures (not using metalness workflow), therefore my metal albedo IS black.

    Yea, the workflows are slightly different depending on the engine/implementation. Just enough to cause confusion.
  • PhobicGunner
    Options
    Offline / Send Message
    Heh, the programmer in me said that I should create a script to make exporting PBR textures that Lux needs from Photoshop easier.
    It's incredibly rough around the edges - it doesn't preserve the original image (keep a backup), doesn't save things automatically, etc. Basically it assumes your active document is made of three layer groups - Albedo, Specular, and Roughness. It merges those groups, copies them, and pastes them into a new document (except for Roughness, which it pastes into a new Alpha channel).
    From there you can export TIF files or whatever.
    I'm new to the Photoshop API, so once again half an hour of work to save a few minutes of effort... ;)
    // Photoshop script to export Lux-friendly PBR texture sets
    
    var activeDoc = app.activeDocument;
    
    var albedoSet = activeDoc.layerSets.getByName( "Albedo" );
    var roughSet = activeDoc.layerSets.getByName( "Roughness" );
    var specSet = activeDoc.layerSets.getByName( "Specular" );
    
    var docWidth = activeDoc.width;
    var docHeight = activeDoc.height;
    var tempDocument = app.documents.add( docWidth, docHeight );
    tempDocument.name = "temp";
    
    app.activeDocument = activeDoc;
    var albedoLayer = albedoSet.merge();
    albedoLayer.copy( false );
    
    app.activeDocument = tempDocument;
    tempDocument.paste();
    
    app.activeDocument = activeDoc;
    var specLayer = specSet.merge();
    specLayer.copy( false );
    
    app.activeDocument = tempDocument;
    tempDocument.paste();
    
    // then, copy roughness and store in alpha channel
    app.activeDocument = activeDoc;
    var roughLayer = roughSet.merge();
    roughLayer.copy( false );
    
    // new alpha channel
    app.activeDocument = tempDocument;
    var alphaChannel = tempDocument.channels.add();
    alphaChannel.name = "Alpha";
    
    // paste into alpha
    var savedTempChannels = tempDocument.activeChannels;
    tempDocument.activeChannels = [ alphaChannel ];
    tempDocument.paste();
    tempDocument.activeChannels = savedTempChannels;
    
  • PhobicGunner
    Options
    Offline / Send Message
    Also, here's an attempt at a rough iron material.
    http://imgur.com/a/k7C9W

    Tried basically slapping down rough colors for Albedo, Roughness, and Spec based on the DONTNOD chart, then overlaying a metal texture on all three (for albedo, it was almost nonexistant - 3% opacity)
  • PhobicGunner
    Options
    Offline / Send Message
    Working more at it.
    http://imgur.com/a/u0R4a

    At this point I've added some slight dirt(?), and a bit of patina-like stuff. Nearly all of the detail is in the specular and gloss, tiny bit of brown for the dirt in the diffuse.
  • PhobicGunner
    Options
    Offline / Send Message
    Also, if somebody has reference pictures for iron, I'd like those because all I can seem to find on Google Images is pictures of f***ing Iron Man -_-
  • HarlequiN
    Options
    Offline / Send Message
    HarlequiN polycounter lvl 18
    Try doing a search on Iron Surface, Cast Surface, Cast Iron, Iron band, Iron Post, that sort of thing - A search for just Iron gave me more shots of Irons than it did of Iron-Man, but I see your issue :)

    (also, Iron Band of course gave lots of images of Iron Maiden, but there were some real Iron Bands in there too).
Sign In or Register to comment.