Going to type up some words about cockpit stuff
The Hellion cockpit for the prototype was a mess. Incredibly complex materials, insanely high resolution normalmaps, using up to 5 uv channels for some meshes. We reached the level of detail we wanted but it was just a too complex and vram slurping setup for use in Battlescape.
FACE WEIGHTED VERTEX NORMALS AND DECALS
Previously I've talked about dropping normal maps for hardsurface meshes to keep vram usage down. To make up for not using normal maps we're using a combination of face weighted vertex normals (FWVN from now on) and detail decals. In the following image you can see that using FWVN we can have rounded corners with no normal maps.
To get back little detail doodads/greebles/nurnies we either have to model them in or apply a decal to the surface. Depending on the size and importance of a detail part it might be better to model them instead of using a decal.
The decals are placed with a simple mesh and a special material applied. The performance is high since no special rendering setup is required. Its just a material rendered last in the render queue with a slight offset and blending. No projection math needed.
And here is a picture of them in engine. You'll notice the seam decal having some lighting errors when it goes over the ridge on the top part. This is due to the vertex normals of the decal mesh not being in sync with the base mesh. Something to keep in mind when placing them!
We're a small team with a small budget. Using an asset creation process that saves time and is easy to use is a huge boon for us. Creating large unique textures and HP/LP meshes for everything is something we'd prefer to avoid.
For the cockpits (and maybe other things, we'll have to test) we're using a detail texturing setup similar to what DICE used for Starwars: Battlefront. Its a neat trick that allows us to pack all detail texture info into a single RGBA image.
Instead of using a mask texture where each channel determines the blend power per detail layer, we're using a single channel in an image for the mask. This mask is multiplied by the number of detail layers -1 and used as the index into a texture array.
The detail textures are quite simple. You store the two normal channels required in RG, diffuse alteration in B and roughness alteration in A. In the material the diffuse and roughness are blended with the Photoshop linear light blend mode. This allows the detail texture to brighten and darken which keeps the average value the same. Using a multiply blend mode would be faster but would always darken the values.
I create the detail textures in Substance Designer. It helps balancing all the values to make the detail texture effect just powerful enough.
The per asset textures can be reasonably low res. At minimum we need basecolour, -roughness, -metallic, -ao and -mask. 7 channels in total so we just need two textures. This leaves one channel unused. It could be used for transparency or emissive depending on material needs.
Here are two images showing detail texture turned off and on. There are 5 detail layers, 4 generic surface detail layers and one weave layer used as a border.
The mask system does have a downside. You can't smootly blend between detail textures and in the above image you can notice a border between the detail and weave layers on the left 3 patches. It is possible to use the unused per asset texture channel as a blend factor between two detail textures and the cost of some performance. Something I'll have to experiment with.
Here is a pic of the cockpit texturing job wip.
Overall I think this setup will allow us to good quality level for the time we can spend on the cockpits. On to making more detail textures and decal details. Yay!