
Second Life PBR Experiments
Return to Main | Blog
Index
As most people who are into second life
know. Linden Labs, with the help of a Cabal of graphics engineers
they hired and a Husky have overhauled the graphics backbone of Second
Life and added support for modern Physics Based Rendering (PBR) which
produces far more realistic looking light and color interaction then any
previous second life model.
I have been aggressively changing assets
used in my various builds and outfits to PBR and recently I started
experimenting with skins. For a long while my skins looked like
this:
As you can see, this is the bog standard
Starlight Skin template with a pale skin tone thrown in. The
starlight skin has a whole lot of shadow and highlight to make up for
the fact that the SL lighting system didn't produce all that shadow and
highlight.
But now we got PBR and that stuff is
handled. We have ambient occlusion maps, roughness maps, and all
that fun stuff. The roughness and light creates its own
higlights. There's shadows cast and it all conflicts with the
light/shadow reliaty that the skin template I was using generates.
This was starting to rankle with me. One you notice it you just
can't un-notice it. There's huge swaths of arbitrarily brightened
and darkened areas of the skin conflicting with where the lights are
falling.
So I decided to try an experiment to change
all that up. I took the starlight template and changed the base
color to pure white after disabling all the fingernail layers because we
got mesh bodies with their own nails dammit we don't need skin-nails.
The result was what was going to be my AO
map. It's not a perfect AO map but I figured it'd be good enough
for a quick and dirty map.

An AO map tells the engine how much ambient
light should reach any particular pixel. In the absense of direct
light, a pure black area of the ambient map will show up pure dark in the
engine. Ambient light comes from light reflected off of everything
in the scene. Stuff buried in crevices, like your navel, don't get a
good look at the outside world, and therefore don't get a lot of outside
world light and appear dark. It'd be troublesome to make the engine
calculate where all those crevices and stuff are. So instead we just
make a texture that tells the engine where all that is.
I made a metal rough map using that.
Feeding the AO Map into the red channel, and pure white into the roughness
and metal channels (Always go pure white, even if you intend on it being
non metallic. That way you got the option in case you want to do
something fun in the future.
This gave me the resulting map. Which
is again, quick and dirty, a more professional map might put a little more
nuance into the roughness. But here we go:
But those dark crevices need some crevices to
be dark in, so I hid all the layers in the Starlight template except the
crevices of the knuckles and stuff and the navel and then threw that at a
normal map generator (which uses dark for low and white for high) and got
this.
So with all this detail shunt to other sides
you might be wondering what I'm using for the base color.
The answer is practically nothing.
Observe:

Yes, a 32 x 32 pixel swatch of pale skin
tone.
I threw it all together in grid and looked at
it and it was kinda decent. The knuckle creases were a bit intense
and might need to be toned down (also Starlight doesn't align knuckles
quite right to a reborn body) but here:

This is what my navel looks like under most light conditions. You
can clearly see a dark navel and the shading for some of the abdominal
curves. Even though the base color of the skin clearly lacks all of
that.
Now if I go over and just point my navel at a light source at near point
blank ranges. It can banish most of those shadows.
Some of that detail falls away and while you can see the contours of the
navel, thanks for the normal map, most of that shadow is being banished
away. A subtle normal map covering the contours of the abdominal
muscles would improve this further, but again, this was a quick and dirty
thing. And despite all that it's surprisingly good. I'm starting
to roll these skin findings forward into a few other avatar and build things
I'm tinkering in PBR and I'm liking the results.