Google-apps
Hoofdmenu

Post a Comment On: C0DE517E

"The three skin rendering horrors you want to avoid"

9 Comments -

1 – 9 of 9
Blogger jeffdr said...

Excellent post. I would only add that using *linear color* (and not sRGB!) in your shading code is of vital importance to subtleties like skin rendering. Most professional titles don't make this mistake, but a lot of newer developers do. A great treatment with example shots is here: http://http.developer.nvidia.com/GPUGems3/gpugems3_ch24.html

December 12, 2011 at 8:37 PM

Anonymous Rim said...

I'v only recently started reading up on gamma (I'm a graphics amateur after all) and I can't really wrap my head around how the problem came to be in the first place. I think I understand the need for the linear space, but the entire problem seems caused by an unfortunate convention to pre-adjust images rather than actually do the rendering correctly in the first place. Would that view be correct or too simple or plain wrong?

December 13, 2011 at 1:32 AM

Blogger DEADC0DE said...

Historically it came to be I believe due to the response curve of monitors but I'm not 100% sure. It is a good thing though as it makes a better usage of whatever bit precision you have to encode colours, non-linear spaces are not good for math but they do behave better perceptually. If you try to encode an image in linear space with 8bpp you'll end up with a lot of banding in the darks.

December 13, 2011 at 7:58 AM

Blogger DEADC0DE said...

P.s. that's whynin the photoshop cleartype script I posted for example, i go linear after switching to 16bpp, doing it on 8bpp would be very bad...

December 13, 2011 at 8:02 AM

Anonymous Rim said...

...I just realized that :)

I'd better go recode that demo to 16bpp or 32bpp, thanks!

December 13, 2011 at 8:44 AM

Blogger jeffdr said...

That the origin of the gamma curve was a "mistake" is a common misconception. Yes, monitors do have this response curve (both old CRTs and new LCDs), but this was an intentional design goal. The hardware engineers could have just as easily made monitors with a linear response.

The reason for it is precision. If you display an 8-bit gradient with linear response, more banding is evident than if a gamma curve is present. It moves more values into the "darks", where a human eye is more likely to notice. The term used for this is "gamma compression".

This was considered a good thing to add to display hardware since something like 10 or 12 bits (or maybe more) would otherwise be needed in the processing to reach the same apparent quality.

December 13, 2011 at 9:57 AM

Blogger MonkeyScience said...

You are totally right about "bad behavior" and lack of fleshiness being another problem. Proper animation technology seems to be lagging far behind graphics these days. And without it we still only achieve beautifully rendered wax puppets.

I like what they're doing with simulated tendons and wrinkly-face technology in this video: http://vimeo.com/23593380

Wrinkles and muscle strain could be stored in a set of animated normalmaps, to be blended in or out based on some animation meta-data, stored in addition to bone transforms in a skeleton, for example.

December 13, 2011 at 10:18 AM

Blogger DEADC0DE said...

Monkey: ye, wrinkle maps are actually quite easy and very common, fight night uses them since round 3 I think. The truth is that not only most games can't skin so many bones (Champion I think uses around three hundreds per boxer) but that authoring of facial animation is extremely hard even with offline techniques (you still see movies today doing a really bad job at that, for example the latest Tron) and physical simulators are useful to reduce the complexity, but are still hard to understand/control. It requires a lot of skill...

December 13, 2011 at 3:22 PM

Anonymous Rim said...

@jeffdr: It took me a while to get back to this thread, but thanks for the info. I'm still wondering about some things, but I'll resist the temptation of rambling on and on about gamma and just figure those out myself.

@DEADC0DE: Sorry about rambling on and on about gamma, especially since it was rather offtopic here :)

December 22, 2011 at 6:10 AM

You can use some HTML tags, such as <b>, <i>, <a>

Comment moderation has been enabled. All comments must be approved by the blog author.

You will be asked to sign in after submitting your comment.
Please prove you're not a robot