Page 1 of 1

Another Layered Skin

Posted: Sat Dec 26, 2009 2:21 pm
by Musorgki
Skin renders...
CrissyField.jpg
CrissyField.jpg (295.38 KiB) Viewed 11157 times
Various lights...
various lights.jpg
various lights.jpg (287.07 KiB) Viewed 11155 times
Different lighting conditions...
combo.png
combo.png (304.47 KiB) Viewed 11156 times
StillLife.png
StillLife.png (290.85 KiB) Viewed 11156 times
Desk.png
Desk.png (293.97 KiB) Viewed 11162 times
skylight.png
skylight.png (359.55 KiB) Viewed 11157 times

Re: Another Layered Skin

Posted: Sat Dec 26, 2009 2:33 pm
by Godzilla
Wow. :shock:

Amazing renders, now all we need is hair in Indigo. :)

Re: Another Layered Skin

Posted: Sat Dec 26, 2009 2:34 pm
by Musorgki
Thanks! Hair +1.

This material is similar to Whaat's material here (nice work!),
tho' the one I use is blended with a phong material
and has bump, exponent & absorption layer maps.

Code: Select all

	<medium>
		<name>skin_medium</name>
		<precedence>10</precedence>
		<basic>
			<ior>1.2</ior>
			<cauchy_b_coeff>0</cauchy_b_coeff>
			<absorption_coefficient_spectrum>
				<rgb>
					<rgb>3 20 30</rgb>   <!-- "correct" way to dial skin color, see below for the easy way -->
					<gamma>1</gamma>
				</rgb>
			</absorption_coefficient_spectrum>
			<subsurface_scattering>
				<scattering_coefficient_spectrum>
					<rgb>
						<!-- shadow terminator:  
							set scatter green to 1000, 
							dial red down & blue up by equal percentages (500/1000/2000, not 0/1000/2000) 
								the further from 1000, the more saturated the color) -->
						<rgb>250 1000 4000</rgb>
						<gamma>1.0</gamma>
					</rgb>
				</scattering_coefficient_spectrum>
				<phase_function>
					<uniform/>
				</phase_function>
			</subsurface_scattering>
		</basic>
	</medium>

	<material>
		<name>skin_sss</name>
		<glossy_transparent>
			<internal_medium_name>skin_medium</internal_medium_name>
			<texture>
				<uv_set>default</uv_set>
				<path>colorMap.png</path>
				<exponent>1.0</exponent>     <!-- easy way to skin color - lower = lighter, higher = darker -->
				<b>1.45</b>
			</texture>
			<texture>
				<uv_set>default</uv_set>
				<path>bumpMap.png</path>
				<b>.00033</b> 
				<exponent>1</exponent>      
			</texture>
			<texture>
				<uv_set>default</uv_set>
				<path>exponentMap.png</path>
				<a>0</a><b>65</b><c>15</c>   <!-- c is low value, b + c is high value -->
				<exponent>1</exponent>      
			</texture>
			<absorption_layer_transmittance>
				<texture>
					<texture_index>0</texture_index>
				</texture>
			</absorption_layer_transmittance>
			<bump>
				<texture>
					<texture_index>1</texture_index>
				</texture>
			</bump>
			<exponent>
				<texture>
					<texture_index>2</texture_index>
				</texture>
			</exponent>
			<!--bump_map>
				<uv_set>default</uv_set>
				<path>bumpMap.png</path>
				<b>.00033</b> 
				<exponent>1.0</exponent>
			</bump_map-->
		</glossy_transparent>
	</material>

	<material>
		<name>skin-phong</name>  
		<phong>
			<texture>
				<uv_set>default</uv_set>
				<path>colorMap.png</path>
				<exponent>2.2</exponent>
			</texture>
			<texture>
				<uv_set>default</uv_set>
				<path>bumpMap.png</path>
				<b>.000165</b>               <!-- was .00033, cut in half here (but not in sss) to fake the softening effect of scatter -->
				<exponent>1.0</exponent>
			</texture>
			<texture>
				<uv_set>default</uv_set>
				<path>exponentMap.png</path>
				<a>0</a><b>65</b><c>15</c>   <!-- c is low value, b + c is high value -->
				<exponent>1.0</exponent>
			</texture>
			<diffuse_albedo>
				<texture>
					<texture_index>0</texture_index>
				</texture>
			</diffuse_albedo>
			<bump>
				<texture>
					<texture_index>1</texture_index>
				</texture>
			</bump>
			<exponent>
				<texture>
					<texture_index>2</texture_index>
				</texture>
			</exponent>
			<ior>1.25</ior>                      <!-- this is shiny (spec brightness), exponent is sharpness (spec size) -->
			<fresnel_scale>1</fresnel_scale>
		</phong>
	</material>

	<material>
		<name>skin</name>
		<blend>
			<a_name>skin-phong</a_name>
			<b_name>skin_sss</b_name>
			<blend_factor>0.7</blend_factor>
		</blend>
	</material>
However, it is not an accurate model of skin:
As it happens, skin is actually a greenish gray color, with the "color" we see
coming from absorption by melanin and hemoglobin and scattering by the dermis.

This material ignores the greenish gray color of skin (since most skin textures
available on the internet are skin colored) and uses a blended phong & sss model,
rather than a dermis/epidermis model (since I wasn't crazy about making two copies
of the geometry).

Notes:
metropolis only seems to work pretty well
the right place to dial skin color is the absorption_coefficient_spectrum rgb
the easiest place to dial skin color is the absorption_layer_transmittance exponent
the only place to dial skin oilieness/wetness is the glossy_transparent exponent map's b & c,
but should be done for both materials.

Here is a good overview of research done on rendering skin:
The Appearance of Human Skin, Columbia University, June 2005

Here is a nice seamless skin texture.
Download it at 512x512, or login to get it at 1024x1024
The license is "free to use for commercial and non-commercial works",
but I'm not posting it because the license doesn't mention distribution.

Or if you are interested, here are tutorials for painting skin, bump & specular maps.

Enjoy!

Re: Another Layered Skin

Posted: Sun Dec 27, 2009 12:23 am
by zeitmeister
Wow... thank you very much! This looks gorgeous... :shock:

Re: Another Layered Skin

Posted: Sun Dec 27, 2009 11:20 pm
by Jambert
Realy nice work, congrats :D

blended mat is the way here, each people get a different skin, blended mat is very usefull here.

Re: Another Layered Skin

Posted: Tue Dec 29, 2009 4:07 am
by CTZn
Here we are ! Really amazing !

Re: Another Layered Skin

Posted: Fri Jan 08, 2010 8:52 am
by Musorgki
Thanks guys!

Re: Another Layered Skin

Posted: Fri Jan 08, 2010 10:18 am
by OnoSendai
Great stuff indeed!