Dev news : metals, PTGI convert

Regarding metals, I had a discussion with Capt Tatsu (author of BSL Shader) where he noticed most of the metals I was using were “pure” ones (hardcoded values for pure metals). Thing is, most metallic stuff we’re dealing with on a daily basis aren’t pure, they’re either alloys or they’re weathered, rusty, greasy, dusty, …

The best course of action was to use the standard way of dealing with metals, AKA albedo-based metals (the 255 value instead of hardcoded value for a specific metal). This would yield more consistent results with metals such as the anvil, which is supposedly cast iron. Using the same hardcoded metal value as for the iron block would make the anvil look polished, gleaming, shiny, … which cast iron isn’t.

The idea is then to provide hardcoded metals for very specific cases (iron ore, iron block, iron bars, gold block, bell, …) but albedo-based ones for most of the small metal inserts which can be found on several blocks (tools on smithing table, studs on piston, hinges on doors, …).

Here is an example of the difference between a hardcoded iron anvil and an albedo-based one. Note the iron block in the background which remains pure hardcoded iron :

Albedo-based anvil
Hardcoded iron anvil

PTGI seems to be encoding smoothness differently from other shaders (seems to be using linear) so in the current state Vanillaccurate feels a tad too glossy when using PTGI.
I added an option in the converter to convert that smoothness to linear using pow(2) so don’t hesitate to give it a go and tell me if you think this improves the looks of Vanillaccurate with PTGI !

perceptual smoothness
linear smoothness

One thought on “Dev news : metals, PTGI convert

  1. The big question is the performance improvements , did you noticed any performances issues / improvement between smoothness or linear ?
    Keep the hard work 🙂

Leave a Reply