My aim is to create an easy to use, decal compatible shader for Blender to help achieve consistent quality and looks for ships, with as little painting work as possible.
The main idea is to enable a substance painter-like workflow, where masks are used to blend between layers of different materials, like base metal, paint and such. These materials are intended to provide a good tiled base textures with some aspects controllable with additional masks (scratchiness for example).
I think, if we ever PBR, most maks could be combined into the RGBA channels of a single image to optimize a bit. The combinig part can be done automagically with the Compositor in blender.
The shader works realtime in eevee, so in theory it could work similarly in-game if a nice PBR rendering implementation comes around.
The wip can be found at users/noz/shading-test.blend
Elements:
[x] Base node group for blending between the different materials.
[x] Two different hull metals/materials. (two should be enough I think.)
[x] A coat of paint. The mask for this controls, how weathered down the paint is.
[ ] Pattern mask, which controls the color of the paint layer.
[x] Glow to define glowing parts of the hull. Headlights, indicator lights, etc.
[ ] Grime to add dirt, rust and such to the surface.
[ ] Some parts would need different materials.
[ ] Transparent surfaces - need an additional control for transparency
[ ] Radiators in the future will hopefully be dynamic.
[x] Decal materials
[ ] Marking decal material
Currently the node tree looks like this:
The right-most node group just blends them together with mix shaders, based on the masks.
The other nodegroup chops up the pattern and applies the colors that is passed to the coating material.
The materials/shader that need to be created:
Two different hull metals/materials. (two should be enough I think.).
[x] Procedural or semi-procedural scratching, with the possibility to control the scratchiness with a mask/slider. Possibly with an additional input from the weathering mask.
[ ] A selection of hull materials (aluminium, titanium, steel, ceramic, etc)
[ ] Procedural or semi-procedural rust/oxidation. Possible inputs are AO (cavity bake), and even the scratchiness and weathering masks. Because paint doesn't rust, and the metals tend to rust most where they are damaged. The rust/oxidation looks should depend on the base metal.
[x] A control for quality? How nicely it is made.
A coat of paint. The mask for this controls, how weathered down the paint is. This can be made dynamic (based on ship damage and age/last repair time) with a threshold-like slider and a properly blended, smooth mask.
[x] The same scratchiness from above, ideally controlled by the same mask
Pattern mask, which controls the color of the paint layer. Works similar to the current pattern implementation in the game: four levels of gray are used to set the base color and the three pattern colors. When creating patterns, it is important to aim not to leap up or down more than one level, because it can create a pixel thick line of the in-between color, due to aliasing.
Glow to define glowing parts of the hull. Headlights, indicator lights, etc.
[x] Weathering could have some impact, and the grime map should have a lot (dirt on the light)
Grime to add dirt, rust and such to the surface. Further separating them to different materials (rust, dirt, burn marks) might be useful. They could benefit from being dynamic, controlled by a value storing, how long the ship haven't been cleaned.
[x] Procedural or semi-procedural dirt. AO (cavity) input, and the scratchiness, and even the rust map inputs might be useful, since dirt tend to collect in those spots most. It desaturates the colors underneath as well.
[ ] Procedural or semi-procedural burn marks. Should have an Age slider to control the amount on th ship. This is mostly for the parts exposed to and around thrusters.
A compositor based workflow should also be possible to aid in baking out the texture maps for the current material implementation (Diffuse, Specular, Pattern, Glow, Normal), and even for the hopeful PBR one.
Some parts would need different materials.
[ ] Transparent surfaces - need an additional control for transparency. Cockpits mostly.
[x] Radiators in the future will hopefully be dynamic. The more heat they need to get rid of, the more they glow. Also, they won't have any paint applied, and most likely won't rust or collect dirt. But might have burn marks eventually.
[x] Decal materials will need an UV copy form the model they are on, to apply all those things.
[x] Marking decal materials won't need the metal part.
[x] Some might use the patterns, some might have a fixed color.
My aim is to create an easy to use, decal compatible shader for Blender to help achieve consistent quality and looks for ships, with as little painting work as possible. The main idea is to enable a substance painter-like workflow, where masks are used to blend between layers of different materials, like base metal, paint and such. These materials are intended to provide a good tiled base textures with some aspects controllable with additional masks (scratchiness for example). I think, if we ever PBR, most maks could be combined into the RGBA channels of a single image to optimize a bit. The combinig part can be done automagically with the Compositor in blender. The shader works realtime in eevee, so in theory it could work similarly in-game if a nice PBR rendering implementation comes around. The wip can be found at users/noz/shading-test.blend
Elements:
Currently the node tree looks like this: The right-most node group just blends them together with mix shaders, based on the masks. The other nodegroup chops up the pattern and applies the colors that is passed to the coating material.
The materials/shader that need to be created:
Procedural or semi-procedural rust/oxidation. Possible inputs are AO (cavity bake), and even the scratchiness and weathering masks. Because paint doesn't rust, and the metals tend to rust most where they are damaged. The rust/oxidation looks should depend on the base metal.A control for quality? How nicely it is made.Some parts would need different materials.