POV-Ray : Newsgroups : povray.binaries.images : POVing again (~170k) : Re: POVing again (~170k) Server Time
11 Aug 2024 21:27:02 EDT (-0400)
  Re: POVing again (~170k)  
From: Tek
Date: 29 Feb 2004 22:36:18
Message: <4042afb2@news.povray.org>
"Sun Tzu" <sun### [at] nospamhotmailcom> wrote in message
news:40429382@news.povray.org...
> Thank you!  I'll try and play around with the texture as you've shown.
> Now if you can explain the 'sub surface scattering' that you referred to for
> the cheese texture, I'll be set to try again.

Well, basically, to get sub surface scattering in POV you need a transparent
object filled with media. Media's explained in the povray docs, so I'll avoid
repeating what's said there.

Basically the idea is to take a scattering media that's so dense it almost looks
solid, but not quite, this simulates solids with translucency. Note that pov's
transparent pigments don't simulate real things, as they only affect the surface
of an object whereas media is a volumetric effect.

Anyway, that's enough theory. Here's a render of a material that I think looks
kinda like cheese. I sampled the cheese colour from a photo of cheese I found
using google! The photo's here if you're curious:
http://www.allposters.com/IMAGES/NIM/KE051.jpg Tip: if you want to sample
colours from photos use photos with bright white lighting, so you get the truest
possible colour.

The material I've used has got a couple of errors in it, but hopefully it will
give you a starting point. Here's the source:

object {
 Cheese

 hollow on
 no_reflection

 material {
  texture {
   pigment { rgbt 1 } /*no surface pigment, since real cheese does not have a
pigment (if you slice it thin enough you can see straight through it!)*/
   finish {
    //make it shiny.
    reflection { 0, 1 fresnel } conserve_energy
    specular 1 roughness .01
    diffuse 0 ambient 0
   }
  }
  interior {
   ior 1.1 /*does anyone know the refractive index of cheese? :)*/
   media {
    scattering {
     1, rgb <252,194,74>/255 //cheesy!
     extinction 0 /*if we have extinction it will colour the media in a strange
way*/
    }
    absorption 1 /*use this instead of extinction*/

    density {
     rgb 40 /*modify this according to the scale of your scene, I've tuned this
so a 1 unit cube looks like a fairly large block of cheese.*/
    }
   }
  }
 }
}

-- 
Tek
www.evilsuperbrain.com


Post a reply to this message


Attachments:
Download 'cheese.jpg' (39 KB)

Preview of image 'cheese.jpg'
cheese.jpg


 

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