foul_hawk
(foul hawk)
October 26, 2016, 10:16pm
4
AlphaComposite is actually very slightly faster to render than ordinary alpha blending because it uses one fewer blend operations, it just adds an extra step to your content pipeline to premultiply the alpha channel into the color. It is also a strict superset of alpha blending and additive, letting you use both in a single material depending on the content of the alpha channel.
Forward shading is quite expensive. It should be used only when you want detailed realtime lighting on your translucent surfaces, like shining a flashlight on them. Other modes use light probes which are far cheaper to compute but do not capture small scale changes in lighting. To get specularity, you need to use reflection capture probes and use static lights.
Thanks for the quick reply! It hadn’t occurred to me to use static lighting.
It looks like it works for the Surface TranslucencyVolume, although the static specularity is definitely a lot less convincing than the realtime stuff on the Forward Shading and Alpha Composite spheres. The use cases I’m thinking about are stuff like jet cockpits, car windows, etc.
Alpha composite is way to go to all pbr transparent surface shading. Good example is very thin and clean glass. You really need to make difference between transmission and reflections. Opacity fakes transmission but without alpha composite it’s also dulls down specularity. Water is also material that need very special care.
Basic principle to make transparent surfaces is to start with fresnel. Fresnel tells ratio of reflection and refraction. Reflection is easier to get correct. Planar reflections, SSR, reflection probes, combinations of these usually work well enough. Refraction is harder. You somehow should calculate thickness of volume that refraction ray travels. You then multiply this by density(absorption + scattering. These should be chromatic) of volume. This is used as beer-lambert law states.
e^(-distance*density)
Then you have Transmission rgb value. This is then used as multiplier for refraction ray results. You usually can take offset scene color sample and hope for the best. If using scene color is not possible you can average transmission value and take inverse of it and put that to opacity.
For inscatter from transparent material you need to approximate even more. Just always remember to multiply this with fresnel output.
I think I follow–so for transparent type materials I should start with Alpha Composite and then work on emulating the physical characteristics of the material?