• jorymo@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      9
      ·
      16 days ago

      Thanks, I’ve been trying out a different process recently! It involves setting a multiply layer over the whole thing and doing the light sources as their own layers, instead of painting the shading directly onto each layer, if that makes sense

      • AdrianTheFrog@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        9 days ago

        Makes sense, for naive, completely diffuse lighting (not reflective) the result is just the sum of base color * light visiblity * cos(angle between surface and light) for every light

        And then for light bounces just repeat that many times, but considering every surface as a light

        In the general case, for a more complicated material, the resulting brightness on a surface can be pretty much any arbitrary function of wavelength, the angle the light comes in, and the angle of the observer (called a BRDF). As long as it’s not putting out more light than it’s getting in, it’s probably possible. These functions can get especially complicated when there’s multiple thin layers, imagine a brushed metal surface with a layer of oxidization, a clear coating, some dirt, and some dust. Even for a single position on the surface, each of those reacts so differently to different input and output angles that no simple functions will represent the surface well. For CGI in films, they usually will layer many simpler BRDFs together, but that’s slow for games, which usually try to approximate surfaces in a single one.