POV-Ray : Newsgroups : povray.binaries.images : Candle Man! : Re: Candle Man! Server Time
2 Nov 2024 10:14:43 EDT (-0400)
  Re: Candle Man!  
From: Robert McGregor
Date: 22 Jan 2011 18:00:01
Message: <web.4d3b5fe42fb8e3da94d713cc0@news.povray.org>
"gregjohn" <pte### [at] yahoocom> wrote:

> I would also use this platform to repeat my request for the best material for
> human skin that could be "donated" to the makehuman project, SSS or no.

Hi all, regarding the blue ears/fingertips - I'm wondering if there's a bug in
the way the color vector is handled somewhere. The color components seem to be
inverted; for instance red is <0,1,1> instead of <1,0,0>. Here are some color
vectors I was playing with a while back. Note that they're all inverted from
their RGB equivalents, but each renders as it's named color with SSLT:

#declare sslt_aqua    = <1, 0, 0>;
#declare sslt_magenta = <0, 1, 0>;
#declare sslt_yellow  = <0, 0, 1>;
#declare sslt_blue    = <1, 1, 0>;
#declare sslt_red     = <0, 1, 1>;
#declare sslt_green   = <1, 0, 1>;
#declare sslt_white   = <0, 0, 0>;

Regarding scale, rather than fooling with mm_per_unit I just use min_extent()
and max_entent() to examine the actual POV unit size of the mesh and scale to
real-world dimensions based on the SSLT default spacing (since Christoph has the
default spacing set to 10mm/POV unit and that's easy to calculate with).

To get realistic scattering on a human head of real-world dimensions <70mm,
120mm, 90mm> the bounding box of the scaled head mesh should measure <7, 12, 9>.
Scale your object accordingly and then you're ready to consider color and set up
a texture.

It doesn't seem to work putting the pigment (say, an image map) and finish in
the same texture block because then you end up with the dark ears, fingers, etc.
shown earlier in this thread. The SSLT simply tramples the pigment, but a simple
layered texture will suffice in some cases, e.g.:

   #declare SSLT_AMT = 0.2;

   // SSLT texture
   texture {
      pigment { rgbt 1 }
      finish {
         subsurface { <1.09, 1.59, 1.79>, <0.013, 0.070, 0.145>}
      }

   }
   // Standard texture
   texture {
      pigment { uv_mapping image_map { png "head" transmit all SSLT_AMT } }
      normal { uv_mapping bump_map { png "head" } bump_size -3 }
      finish {
         specular 0.25 roughness 0.02
         reflection {0, 0.5 fresnel }
         conserve_energy
      }
   }

Trying to get more realism by using various image maps to define areas of
reflection, specular, and translucency is trickier because POV-Ray won't let you
use this layered technique (the old "cannot layer over a patterned texture"
error). But you can easily build more complex, compound patterned textures to
handle the various maps.

In this example I'm using SSLT_AMT and BASE_AMT to control the blend amounts
between a standard base texture (having image/bump/spec maps and a basic finish)
and an SSLT texture that uses a translucency map to define the translucent
(SSLT) areas, e.g.:

#declare sslt_red = <0, 1, 1>;
// Note: all the SSLT colors seem inverted, is that a bug??
// e.g., red should = <1,0,0> NOT <0,1,1>
// Could be why the chicken looks so dark/bad?

#declare SSLT_AMT = 0.25;
#declare BASE_AMT = 1;

//------------------------------------------------------------------------------
// Test Head
//------------------------------------------------------------------------------
#include "man_head.inc"  // your Mesh2 object
#declare Man_Head_ = object { Man_Head_
   // with spec/reflection/subsurface mapping
   #declare P_Head = pigment { uv_mapping image_map { png "Head" } }
   #declare N_Head = normal { uv_mapping bump_map { png "Head" } bump_size -3 }

   texture {
      average
      texture_map {
         // SSLT texture
         [SSLT_AMT
            uv_mapping
            image_pattern { png "Head_Transluc" interpolate 2 } // subsurface
amount mask
            texture_map {
               [0.0
                  pigment { P_Head }
                  normal { N_Head }
               ]
               [0.4
                  pigment { P_Head }
                  normal { N_Head }
               ]
               [1.0
                  pigment { rgb 1 }
                  finish {
                     //subsurface { <1.09, 1.59, 1.79>, <0.013, 0.070, 0.145> }
// skin2
                     subsurface { <1.09, 1.59, 1.79>, sslt_red }
                  }
               ]
            }
         ]
         // Base texture with spec and reflection mapping
         [BASE_AMT
            uv_mapping
            image_pattern { png "HeadSpec" interpolate 2 }    //
specular/reflection amount mask
            texture_map {
               [1
                  pigment { P_Head }
                  normal { N_Head }
                  finish {
                     specular 0
                     reflection 0
                  }
               ]
               [0
                  pigment { P_Head }
                  normal { N_Head }
                  finish {
                     specular 0.25 roughness 0.05
                     reflection { 0.05, 0.9 fresnel }
                     conserve_energy
                  }
               ]
            }
         ]
      }
   }
   interior { ior 1 }
}
Center_Object(Man_Head, x+y+z)


Cheers,
Rob


-------------------------------------------------
www.McGregorFineArt.com


Post a reply to this message


Attachments:
Download 'sslt_tests.png' (668 KB)

Preview of image 'sslt_tests.png'
sslt_tests.png


 

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.