Effects ‐ BRDF - ow-mods/outer-wilds-unity-wiki GitHub Wiki
BRDF is a special material type that is used for crystal-like materials (glass, geodes, etc).
Texture
Above is the 128x128 BRDF texture for the anglerfish eggs. The video goes over what parts of the texture correspond to what in an intuitive way, but I will reiterate here.
The x axis is the angle between the surface and the camera (left is facing away from camera, middle is perpendicular to camera, right is facing towards camera).
The y axis is the angle between the surface and the light (top is facing towards light, middle is perpendicular to light, bottom is facing away from light).
You can see how the bottom right has red in it to look like the light shines through only when you are looking head-on at the surface. You can also see how there's a spot in the middle that only shows when the surface is perpendicular to both the light and the camera.
The entire left half of the texture is unused because you can't see stuff facing away from the camera. I'm not sure why they did it this way.
[!IMPORTANT] Make sure
Advanced > Read/Write Enabled
is checked
[!IMPORTANT] Uncheck
Advanced > Generate Mip Maps
to prevent weird pixelated edges.
[!IMPORTANT] The texture size needs to be 128x128 so it is the same size as the base game BRDF textures (although I guess you could also resize all of the base game ones too)
Usage
In the BRDF folder, there is a registry. You assign the texture and specular color there and click the reload button there. You can also use Visuals > Reload BRDFs
at the top.
To actually use this registry, add the BRDF Manager component to any GameObject and assign the registry there before reloading. This GameObject can be also be loaded in game via a prefab to apply your BRDFs to the game.