POV-Ray : Newsgroups : povray.text.scene-files : teddy.pov (a demo of a furry density_map for Povray 3.1) Server Time
1 Nov 2024 01:24:53 EDT (-0400)
  teddy.pov (a demo of a furry density_map for Povray 3.1) (Message 1 to 5 of 5)  
From: Shinzaho
Subject: teddy.pov (a demo of a furry density_map for Povray 3.1)
Date: 6 Aug 1998 16:11:50
Message: <01bdc16e$07b7eee0$564a5b82@michaelfisher>
// A demo of a furry density_map for Povray 3.1

// ******* CAMERA *******
camera {  //  Camera StdCam
  location  <-2.293, -4.761, 3.481>
  direction <0.0,     0.0,  1.1547>
  sky       <0.0,     0.0,  1.0>  // Use right handed-system!
  up        <0.0,     0.0,  1.0>  // Where Z is up
  right     <1.33333,  0.0,  0.0>
  look_at   <0.237, 0.487, 0.973>
}

//
// *******  L I G H T S *******
//

light_source {   // Light1
  <3.924, -4.169, 4.869>
  color rgb <1.000, 1.000, 1.000>
  fade_distance  4.0
  fade_power 2.0
}


//
// ********  TEXTURES  *******
//

// Fur texture!

// For spaces with a density of 0 (where I want empty non-filled space
// in my density texture).  Much to my suprise this is legal!
// (and very useful).
#declare Air =
density {
}

// For spaces with a density of 1
#declare Spherical =
density {
spherical
scale 10000
}

// For the spherical shapes
// To make the edges of the furball fade at the edges
// so we can't see the boundaries of the container sphere
#declare Spherical_Map =
density {
spherical
density_map {
[0.0 Air]
[0.1 Spherical]
[1 Spherical]
}
}


// Combine vertical radial density texture with spherical density texture
// using a density_map.
#declare Radial =
density {
radial
frequency 40
density_map {
[0.0 Air]
[0.6 Air]  // You can raise or lower these two values to make the
[0.6 Spherical_Map] // "hairs" thicker or thinner or make the boundaries
                    // less defined by using different values.  I used the
                    // same values to make the edges as sharp as I can.
[1 Spherical_Map]
}
}


// This is really the same texture as above.  I made this for clarity
// in the source code.  (Vertical radial density)
#declare Y_Radial =
density {
Radial
}

// Rotate the radial density texture 90 degrees toward the observer
#declare Z_Radial =
density {
Radial
rotate <0,0,90>
}

// Rotate the radial density texture 90 degrees so it's horizontal
#declare X_Radial =
density {
Radial
rotate <90,0,0>
}

// Combine ("interesect") the Y_Radial density with the X_Radial density
// using a density_map
#declare X_Y_Radial =
density {
Y_Radial
density_map {
[0.0 Air]
[0.6 Air]
[0.6 X_Radial]
[1.0 X_Radial]
}
}

// Combine ("intersect") the X_Radial & Y_Radial with the Z_Radial density
// using a density map.  Just like I did above.
#declare X_Y_Z_Radial =
density {
X_Y_Radial
density_map {
[0.0 Air]
[0.6 Air]
[0.6 Z_Radial]
[1.0 Z_Radial]
}
}

// For the smaller denser area in the middle of the furball.
// Otherwise it will look like it has no "body" and look more like a
// collection of dandilion seeds.   (That could be useful too! :) )
#declare Sphere_Body =
density {
spherical
density_map {
[0.0 Air]
[0.5 Spherical]
[1 Spherical]
}
}


// The last step!
// Combine the X_Y_Z_Radial using the Sphere_Body density texture using
// a density_map yet again!  As opposed to the previous density maps
// note that I wanted to fill up density 0.0 (the empty spaces) with
// the Sphere_Body density map rather than leave them open like above.
#declare Furball =
density {
X_Y_Z_Radial
density_map {
[0.0 Sphere_Body]
[1 X_Y_Z_Radial]
}
}

// Black shiny texture to use for eyes and nose
#declare EyesNose =
texture {
pigment {
color rgb <0,0,0>
}
finish {
phong 1
phong_size 100
}
}

#declare

// *********** CYLINDRICAL FUR *********************

// This is similar to the fur that I used for the head except instead of
density_mapping 3 radial

density_map with a gradient density_map.

#declare Cylindrical_Map =
density {
cylindrical
density_map {
[0.0 Air]
[0.2 Spherical]
[1 Spherical]
}
//rotate <90,0,0>
}

#declare Gradient_Z =
density {
gradient z
density_map {
[0.0 Air]
[0.3 Air]
[0.3 Spherical]
[0.7 Spherical]
[0.7 Air]
[1 Air]
}
scale <0,0,0.3>
}

#declare Radial_Gradient_Z =
density {
radial frequency 40
rotate <90,0,0>
density_map {
[0.0 Air]
[1.0 Gradient_Z]
}
}

#declare Radial_Gradient_Z2 =
density {
Radial_Gradient_Z
density_map {
[0.0 Air]
[1.0 Cylindrical_Map]
}
}

#declare Cylinder_Body =
density {
cylindrical 
density_map {
[0.0 Air]
[0.65 Spherical]
[1 Spherical]
}
}

#declare Fur_Cyl =
density {
Radial_Gradient_Z2
density_map {
[0.0 Cylinder_Body]
[1 Radial_Gradient_Z2]
}
}


//
// ********  OBJECTS  *******
//

sphere { // Sphere001
  <0,0,0>,1.1
texture {
  pigment {
  color rgbf <1,1,1,1>
  }
  finish {
  ambient 0.15
  diffuse 1 }
  }
  hollow
  interior {
 media {
  intervals 10
  scattering { 1, rgb <3,1.5,0.4>} // Make a brown color for areas that
                                     // are lit
  absorption rgb <2,2,2> // This is the key to making "solid" 3-D textures.
                         // Set this so all areas of the density that are
                         // in shadow are black.
  samples 1, 2
  confidence 0.600
  variance 1/600
  ratio 0.600
density {
Furball
turbulence 0.05
 }
 }
 }
  scale <0.7, 0.5, 0.6>
  translate  <0.0, -0.162254, 2.645079>
}

cylinder { // SuperQ001
<0,0,-1>,<0,0,1>,1
  // scale 1.1
texture {
  pigment {
  color rgbf <1,1,1,1>
  }
  finish {
  ambient 0.15
  diffuse 1 }
  }
  hollow
  interior {
 media {
  intervals 10
  scattering { 1, rgb <3,1.5,0.4>} // Make a brown color for areas that
                                     // are lit
  absorption rgb <2,2,2> // This is the key to making "solid" 3-D textures.
                         // Set this so all areas of the density that are
                         // in shadow are black.
  samples 1, 2
  confidence 0.600
  variance 1/600
  ratio 0.600
density {
Fur_Cyl
turbulence 0.05
 }
 }
 }
  scale <1.0, 0.75, 1.0>
  translate  <0.0, -0.183012, 1.0>
}

plane { // Plane001
  z,-0.1
  texture {
    pigment {
    color rgb <0.15,0.15,1>
    }
    finish {
    ambient 0.1
    diffuse 0.75
    reflection 0.25
    }
  }
}


cylinder { // SuperQ001
<0,0,-1>,<0,0,1>,1
  // scale 1.1
texture {
  pigment {
  color rgbf <1,1,1,1>
  }
  finish {
  ambient 0.15
  diffuse 1 }
  }
  hollow
  interior {
 media {
  intervals 10
  scattering { 1, rgb <3,1.5,0.4>} // Make a brown color for areas that
                                     // are lit
  absorption rgb <2,2,2> // This is the key to making "solid" 3-D textures.
                         // Set this so all areas of the density that are
                         // in shadow are black.
  samples 1, 2
  confidence 0.600
  variance 1/600
  ratio 0.600
density {
Fur_Cyl
turbulence 0.05
 }
 }
 }
  scale <0.4, 0.4, 0.8>
  rotate <-90.0, 0.0, -45.0>
  translate  <-1.016273, -0.720791, 0.430257>
}


cylinder { // SuperQ001
<0,0,-1>,<0,0,1>,1
  // scale 1.1
texture {
  pigment {
  color rgbf <1,1,1,1>
  }
  finish {
  ambient 0.15
  diffuse 1 }
  }
  hollow
  interior {
 media {
  intervals 10
  scattering { 1, rgb <3,1.5,0.4>} // Make a brown color for areas that
                                     // are lit
  absorption rgb <2,2,2> // This is the key to making "solid" 3-D textures.
                         // Set this so all areas of the density that are
                         // in shadow are black.
  samples 1, 2
  confidence 0.600
  variance 1/600
  ratio 0.600
density {
Fur_Cyl
turbulence 0.05
 }
 }
 }
  scale <0.4, 0.4, 0.8>
  rotate <-90.0, 0.0, 45.0>
  translate  <0.989884, -0.720791, 0.430257>
}


cylinder { // SuperQ001
<0,0,-1>,<0,0,1>,1
  // scale 1.1
texture {
  pigment {
  color rgbf <1,1,1,1>
  }
  finish {
  ambient 0.15
  diffuse 1 }
  }
  hollow
  interior {
 media {
  intervals 10
  scattering { 1, rgb <3,1.5,0.4>} // Make a brown color for areas that
                                     // are lit
  absorption rgb <2,2,2> // This is the key to making "solid" 3-D textures.
                         // Set this so all areas of the density that are
                         // in shadow are black.
  samples 1, 2
  confidence 0.600
  variance 1/600
  ratio 0.600
density {
Fur_Cyl
turbulence 0.05
 }
 }
 }
  scale <0.4, 0.4, 0.7>
  rotate <-90.0, 0.0, 45.0>
  translate  <0.906375, -0.655839, 1.590844>
}


cylinder { // SuperQ001
<0,0,-1>,<0,0,1>,1
  // scale 1.1
texture {
  pigment {
  color rgbf <1,1,1,1>
  }
  finish {
  ambient 0.15
  diffuse 1 }
  }
  hollow
  interior {
 media {
  intervals 10
  scattering { 1, rgb <3,1.5,0.4>} // Make a brown color for areas that
                                     // are lit
  absorption rgb <2,2,2> // This is the key to making "solid" 3-D textures.
                         // Set this so all areas of the density that are
                         // in shadow are black.
  samples 1, 2
  confidence 0.600
  variance 1/600
  ratio 0.600
density {
Fur_Cyl
turbulence 0.05
 }
 }
 }
  scale <0.4, 0.4, 0.7>
  rotate <-90.0, 0.0, -45.0>
  translate  <-0.942043, -0.655839, 1.590844>
}


cylinder { // SuperQ001
<0,0,-1>,<0,0,1>,1
  // scale 1.1
texture {
  pigment {
  color rgbf <1,1,1,1>
  }
  finish {
  ambient 0.15
  diffuse 1 }
  }
  hollow
  interior {
 media {
  intervals 10
  scattering { 1, rgb <3,1.5,0.4>} // Make a brown color for areas that
                                     // are lit
  absorption rgb <2,2,2> // This is the key to making "solid" 3-D textures.
                         // Set this so all areas of the density that are
                         // in shadow are black.
  samples 1, 2
  confidence 0.600
  variance 1/600
  ratio 0.600
density {
Fur_Cyl
turbulence 0.05
 }
 }
 }
  scale <0.4, 0.3, 0.3>
  translate  <0.0, -0.183012, 2.045046>
}

cylinder { // SuperQ001
<0,0,-1>,<0,0,1>,1
  // scale 1.1
texture {
  pigment {
  color rgbf <1,1,1,1>
  }
  finish {
  ambient 0.15
  diffuse 1 }
  }
  hollow
  interior {
 media {
  intervals 10
  scattering { 1, rgb <3,1.5,0.4>} // Make a brown color for areas that
                                     // are lit
  absorption rgb <2,2,2> // This is the key to making "solid" 3-D textures.
                         // Set this so all areas of the density that are
                         // in shadow are black.
  samples 1, 2
  confidence 0.600
  variance 1/600
  ratio 0.600
density {
Fur_Cyl
turbulence 0.05
 }
 }
 }
  scale <0.3, 0.15, 0.225>
  rotate 30.0*y
  translate  <-0.630364, -0.183012, 2.927556>
}


cylinder { // SuperQ001
<0,0,-1>,<0,0,1>,1
  // scale 1.1
texture {
  pigment {
  color rgbf <1,1,1,1>
  }
  finish {
  ambient 0.15
  diffuse 1 }
  }
  hollow
  interior {
 media {
  intervals 10
  scattering { 1, rgb <3,1.5,0.4>} // Make a brown color for areas that
                                     // are lit
  absorption rgb <2,2,2> // This is the key to making "solid" 3-D textures.
                         // Set this so all areas of the density that are
                         // in shadow are black.
  samples 1, 2
  confidence 0.600
  variance 1/600
  ratio 0.600
density {
Fur_Cyl
turbulence 0.05
 }
 }
 }
  scale <0.3, 0.15, 0.225>
  rotate -30.0*y
  translate  <0.629381, -0.183012, 2.927556>
}


cylinder { // SuperQ001
<0,0,-1>,<0,0,1>,1
texture {
  pigment {
  color rgbf <1,1,1,1>
  }
  finish {
  ambient 0.15
  diffuse 1 }
  }
  hollow
  interior {
 media {
  intervals 10
  scattering { 1, rgb <3,1.5,0.4>} // Make a brown color for areas that
                                     // are lit
  absorption rgb <2,2,2> // This is the key to making "solid" 3-D textures.
                         // Set this so all areas of the density that are
                         // in shadow are black.
  samples 1, 2
  confidence 0.600
  variance 1/600
  ratio 0.600
density {
Fur_Cyl
turbulence 0.05
 }
 }
 }
  scale 0.2
  translate  <0.0, -0.527326, 2.612778>
}


sphere { // Sphere3
  <0,0,0>,1
  texture {
    EyesNose
  }
  scale 0.07
  translate  <0.0, -0.728236, 2.612778>
}


sphere { // Sphere4
  <0,0,0>,1
  texture {
    EyesNose
  }
  scale <0.1, 0.07, 0.1>
  translate  <-0.303631, -0.513759, 2.864727>
}


sphere { // Sphere5
  <0,0,0>,1
  texture {
    EyesNose
  }
  scale <0.1, 0.07, 0.1>
  translate  <0.297603, -0.506127, 2.864727>
}


Post a reply to this message

From: K  Tyler
Subject: Re: teddy.pov (a demo of a furry density_map for Povray 3.1)
Date: 6 Aug 1998 17:47:39
Message: <35CA0822.E2AA52DC@pacbell.net>
Shinzaho wrote:

> // A demo of a furry density_map for Povray 3.1

What an interesting application for that process. Nicely done.

       Do you think this procedure could be used, with a few
modifications of course, as a process for simulating grasses
and carpets, and dare I even think it, a process that might
actually produce realistic human hair in POV-Ray ?.

    I envision creating square blocks of "furry green material"
and then translating them out across a plane, on a hillside, or
used possibly inside as wall to wall carpeting.

    I noticed at least on my system your posted image was very dark. Is this a
consequence of the procedure and will a bright ambient scene negatively affect
the outcome ? Is there any way to tighten up the color banding  (I know fuzz is
supposed to look fuzzy but it also looked out of focus) ?

Have a nice render day.

K.Tyler


Post a reply to this message

From: Josh English
Subject: Re: teddy.pov (a demo of a furry density_map for Povray 3.1)
Date: 7 Aug 1998 11:45:48
Message: <35CB1370.FDD0E6B0@spiritone.com>
It sounds nice, but I can't get this to render. I get a fatal error on a Mac
and on Windows 95 I get:
PVENGINE caused an invalid page fault in
module PVENGINE.EXE at 016f:0047336d.

I'm using 3.1b4, perhaps you are using 3.1b5?

Josh English
eng### [at] spiritonecom
www.spiritione.com/~english


Post a reply to this message

From: Shinzaho
Subject: Re: teddy.pov (a demo of a furry density_map for Povray 3.1)
Date: 7 Aug 1998 11:49:40
Message: <01bdc212$8fecc2a0$564a5b82@michaelfisher>
Yeah, I'm using 3.1b5.  I had the same problem when I was using 3.1b4. 
Whenever I tried to use density_map it caused Pov-Ray to crash.  As to K.
Tyler's questions regarding the darkness of the scene I probably should
have used a different gamma setting and made the plane a lighter shade of
blue.  I'll try to render a better one when I find the time.

Josh English <eng### [at] spiritonecom> wrote in article
<35CB1370.FDD0E6B0@spiritone.com>...
> It sounds nice, but I can't get this to render. I get a fatal error on a
Mac
> and on Windows 95 I get:
> PVENGINE caused an invalid page fault in
> module PVENGINE.EXE at 016f:0047336d.
> 
> I'm using 3.1b4, perhaps you are using 3.1b5?
> 
> Josh English
> eng### [at] spiritonecom
> www.spiritione.com/~english
> 
> 
>


Post a reply to this message

From: Scott Hill
Subject: Re: teddy.pov (a demo of a furry density_map for Povray 3.1)
Date: 12 Aug 1998 11:01:37
Message: <01bdc5e1$e469e2e0$8c00a8c0@shindo.ddlinks.co.uk>
Shinzaho <Shi### [at] aolcom> wrote in article
<01bdc16e$07b7eee0$564a5b82@michaelfisher>...
> // A demo of a furry density_map for Povray 3.1
<snipped code>

	Hmm, I can't even get it to parse ! Could you e-mail a copy that'll work
under POVRay for Windows 3.1 beta 5 to me ? (address in sig)

-- 
Scott Hill
Sco### [at] DDLinkscouk
Software Engineer (and all round nice guy)
Company homepage : http://www.ddlinks.demon.co.uk

"The best trick the devil ever pulled was convincing people he didn't
exist..."
								- Verbal Kint.

"the Internet is here so we can waste time talking about nothing in 
 particular when we should be working" - Marcus Hill.


Post a reply to this message

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