POV-Ray : Newsgroups : povray.binaries.images : Upgrading POV-Ray's include files #1: granites.inc --> granites21.inc : Re: Upgrading POV-Ray's include files #1: granites.inc -->granites21.inc Server Time
17 May 2024 16:29:40 EDT (-0400)
  Re: Upgrading POV-Ray's include files #1: granites.inc -->granites21.inc  
From: Kenneth
Date: 15 Apr 2021 16:05:00
Message: <web.60789bff2b09e497d98418916e066e29@news.povray.org>
The radical visual differences between the granites of Thomas vs. Ive reminded
me of something I used to do years ago in older versions of POV-ray: running my
scenes in a gamma 2.2 environment (instead of the always-recommended 1.0)--
simply as a way to get 'rgb colors' to appear the way that I thought they
should. This was before I understood the technical details of 'linear' lighting
and rendering (which is another topic, of course.)

So, using the two *original* 1996 Daniel Mecklenburg textures from the
"granites_original.inc" file that Thomas included in his zip files, I decided to
run  them in v3.7-- while *switching* between assumed_gamma 1.0 and
assumed_gamma 2.2. [To be specific, I'm running a v3.8xx 'experimental build' in
Windows, that piggybacks on v3.7, but  using "#version 3.7" in my test scene.]
Disregarding my own scene's lack of radiosity and a different light_source
setup... not to mention the vast differences that have accrued in POV-ray itself
since 1996...the respective gamma results are quite interesting!

At the time of Daniel's code creation, there was no 'assumed_gamma' keyword,
AFAIU-- just something like Display_Gamma or File_Gamma in an .INI file. (That's
probably what I used-- and with a 2.2 value instead of 1.0.)

The results of my test here indicate that the Thomas/Ive visual differences
might simply be the result of the gamma environment Daniel M was using at the
time.  If it was indeed a 2.2-gamma environment-- possibly like my own old way
of doing things-- then Ive's version would seem to be more 'correct' (as regards
Daniel's original intent?); if Daniel used a gamma of 1.0 instead, then Thomas's
looks correct.

Just some food for thought.

I make no judgement as to which of the versions of 'North American Pink granite'
has the correct 'visual' look-- I'll leave that to the granite experts ;-)

-------- Kenneth test code ------
global_settings{assumed_gamma 1.0} // change to 2.2

#default{finish{ambient .07 emission 0 diffuse .8}}

camera {
  perspective
  location  <0, 2.1, -6.9>
  look_at   <0, 1,  0>
  right     x*image_width/image_height
   angle 58
}

light_source {
  0*x
  color rgb .3
  translate <-20, 40, -20>
}

light_source {
  0*x
  color rgb .7
  translate <-20, 40, -20>
}

// NAPPol : North American Pink polished
// NAPFro : North American Pink frosted

//----ORIGINAL texture code from Daniel Mecklenberg, used below
#declare PolishFinish =
finish { ambient 0.5 phong 0.9 phong_size 80 brilliance 1.5 }

//----ORIGINAL texture code from Daniel Mecklenberg ----
// [KENNETH note: a material wrapper is apparently not
// needed for this 2-part texture]
#declare NAPPol =
texture {
pigment {
granite
turbulence 0.8
color_map {
[ 0.000, 0.500 color rgb < 97/255, 51/255, 63/255 >
color rgb < 178/255, 118/255, 86/255 > ]
[ 0.500, 1.000 color rgb < 172/255, 129/255, 116/255 >
color rgb < 235/255, 215/255, 205/255 > ]
}
}
finish { PolishFinish }
}
texture {
pigment {
granite
turbulence 0.8
color_map {
[ 0.000, 0.600 color rgbf < 1.00, 1.00, 1.00, 1.00 >
color rgbf < 1.00, 1.00, 1.00, 1.00 > ]
[ 0.600, 1.000 color rgbf < 0.10, 0.08, 0.08, 0.50 >
color rgbf < 0.05, 0.04, 0.04, 0.00 > ]
}
scale 0.5
translate < 20, 20, 20 >
rotate < 30, 30, 30 >
}
finish { PolishFinish }
}

//-----------
//----ORIGINAL texture code from Daniel Mecklenberg ----
#declare NAPFro =
texture {
pigment {
granite
turbulence 0.8
color_map {
[ 0.000, 0.500 color rgb < 147/255, 111/255, 123/255 >
color rgb < 162/255, 129/255, 116/255 > ]
[ 0.500, 0.720 color rgb < 172/255, 129/255, 116/255 >
color rgb < 245/255, 220/255, 215/255 > ]
[ 0.720, 1.000 color rgb < 70/255, 70/255, 70/255 >
color rgb < 50/255, 50/255, 50/255 > ]
}
}
finish { diffuse 1.0 crand 0.25 ambient 0.5 }
normal { bumps 0.1 scale 0.2 }
}
//------------------
background{srgb .7}

union{
superellipsoid{<.1,.1> rotate 35*y}
sphere{0,1 scale <1,1.3,1> translate 2.2*y}
texture{NAPPol scale .3} //---  OR use NapFro ---
}


Post a reply to this message


Attachments:
Download 'granite gamma comparisons.jpg' (144 KB)

Preview of image 'granite gamma comparisons.jpg'
granite gamma comparisons.jpg


 

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