PDA

View Full Version : WIP: Cg Skin Shader


ElRemi
09-28-2003, 05:09 PM
Hello,

First my apologies if this isn't the right place for a WIP (it's just the best place I could find).
Thanks for letting me know if you know of a more appropriate one!

I'm trying to do a little skin shader in Cg/HLSL. Right now my target is image quality, not speed of rendering.

Here's a picture:

http://209.68.21.228/shaderpics/MySkinShaderV123a.jpg

A few more:
2 (http://209.68.21.228/shaderpics/MySkinShaderV123b.jpg), 3 (http://209.68.21.228/shaderpics/MySkinShaderV123c.jpg), 4 (http://209.68.21.228/shaderpics/MySkinShaderV123d.jpg)

The lighting is rather simple with just 2 point lights (and a bit of ambiant lighting).

All comments and feedback is of course welcome! :)


(NB: 3D model and textures by the excellent Steven Giesler, for nVidia).

jeremybirn
09-28-2003, 07:05 PM
You've got some great assets there! The modeling and the basic color map are terrific. It would be great if you could get better quality shadows, a little softer with reddish edges, and soften and warm up the fake darkening in the nostrils. Then that "frosty" look needs to be painted-down between the lips (just from the interior and down-facing parts), on the bottom of the nose and chin, and the hair-covered parts of the scalp. Somehow those ears needs to be softer and warmer and look more back-lit, especially in the shadow areas it's just looking gray.

-jeremy

lazzhar
09-28-2003, 07:49 PM
".......shadows, a little softer with reddish edges....."

I've read many times you say it , Jeremy. Could you give us a hint to get this effect please? Or we need just a SSS shader or something like that?

ElRemi
09-28-2003, 07:53 PM
There's no doubt to me that a big part of the appeal of those images is due to Steven Giesler's talents. :)

I plan to add image-based lighting and backlighting together, I'll try to add new shadows too.

I probably need a "frost-map" to control the "frosty" look - I was just reluctant to add a texture but it seems it's the best way to take care of it in Cg.

Thanks for your comments Jeremy, I must say it's very encouraging for me to read from you for my first shader!

jeremybirn
09-28-2003, 10:48 PM
Originally posted by lazzhar
".......shadows, a little softer with reddish edges....."

I've read many times you say it , Jeremy. Could you give us a hint to get this effect please? Or we need just a SSS shader or something like that?

I won't venture any guesses into how he'd implement that in the CG language, but in Maya you can tweak the mid-falloff colors in a Ramp shader based on the brightness, or in Shake you can boost the gamma of the red channel on your shadow pass which is my favorite way. SSS is like radiosity - as long as we don't have it, we spend most of our time finding clever cheats to fake it, painting redness into wrinkles and nostrils, warm fill lights, etc. It's impossible to discuss skin shaders without some translucency-related cheats coming into the conversation.

-jeremy

lazzhar
09-29-2003, 01:43 PM
Thanks :)
I think this picture show exactly what you mean :
http://lazzhar.jeeran.com/ts_skins.jpg
I notice the difference between the shader of Woody face and the other used on the human hands.

MikeNash
10-03-2003, 05:18 PM
Hey
Looking realy nice,
I was wondering about green effect you can find in the skin,wouldnt this be apart of underneath layers of skin ?
By the way how you get hold Steven Giesler's work ?
Wouldnt mind having look at his texture maps

thomaspecht
10-06-2003, 12:33 AM
"By the way how you get hold Steven Giesler's work ?
Wouldnt mind having look at his texture maps"

same question here - are those assets part of the CG kit that is offered by nvidia?

ElRemi
10-07-2003, 01:51 PM
Hello!

>I was wondering about green effect you can find in the skin, wouldnt this be apart of underneath layers of skin ?

For the subsurface scattering (for the underneath layers) used here, I just ported Matt Phar's single-scattering, it adds a diffuse color that does contain some amount of green, but the color is much more red than green, and at the left edge the fresnel term takes over it.

The green touch is added in three different ways:

- In the shadow near the mouth, the green is already present into the diffuse color map, thanks to the artist (and not to the shader).
- The scalp's diffuse color is slightly green and when blended with the sheen, it seems to show slightly. If you zoom-in the picture on the left edge, you can also see something similar with the skin (above the eyebrow), the sheen seems a bit thicker there - that's because you're seeing the skin's sheen and the scalp sheen's blended (there's not really enough geometry of the scalp visible to get that you're seeing a small part of the scalp).
- More generally, the neutral grey at the edge might seem a bit green. The grey background isn't perfectly neutral but have about 1% less green than red and blue, which by contrast slightly favors the green in our perception of the sheen. (Well, that's just an idea I had, but to tell the truth I'm not sure how well that's supposed to really work - if someone can remove or confirm my doubt, don't hesitate! I still have much to learn).


>By the way how you get hold Steven Giesler's work ?
>are those assets part of the CG kit that is offered by nvidia?

Pretty close! It's not part of the Cg Toolkit, but it's very easy to find. Just try to get the Cg toolkit and you should find it. I don't think you can miss it...

>Wouldnt mind having look at his texture maps

Don't forget then to get the DXTC Texture Tools while you're there. The thumbnails in windows explorer are a bit dark, but once imported in Photoshop it's all right.


I think I'll go back to coding for a while... If the most obvious defects are corrected (or well on their way) and if I like those pictures, I'm also increasingly aware of their limits and I wouldn't be too unhappy to improve all that... Don't hold your breath, that's going to take some time! (it's a hobby, I can only dedicate a rather limited time to it).

Thanks for the comments! :)


Remi.

thomaspecht
10-07-2003, 07:34 PM
sorry to bring up the model/texture topic again but.. it's not that easy to find this stuff on nvidias site. could you explain a little more detailed where to look for and how the fiel(s) are named?

so far i've looked through their site, their ftp and the cvs server but resisted to download a 100meg file just out of curiosity.

thx.

ElRemi
10-07-2003, 10:49 PM
By nVidia.com thou shall go, click on Developper you will. Wheel, wheel, wheel shall be the sound of your mouse, and ye light then you should see. It will shine on you once you will have reached your end station, engraved as "SIGGRAPH 2003 Cg Sessions Material".

Amen!


Cheers! :beer:

CGTalk Moderation
01-14-2006, 10:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.