POV-Ray : Newsgroups : povray.general : Help changing background light intensity : Re: Help changing background light intensity Server Time
5 Aug 2024 16:12:45 EDT (-0400)
  Re: Help changing background light intensity  
From: Rafal 'Raf256' Maj
Date: 12 Oct 2002 20:56:07
Message: <Xns92A61D9BB8D4Eraf256com@204.213.191.226>
Christopher James Huff <chr### [at] maccom> wrote in news:chrishuff-
15F### [at] netplexaussieorg

[...]

> Adding a special color map feature just adds bulk to an already 
> redundant feature.

I can't agree, in same way we can say that sphere,box,etc are redunant 
versions of i.e. isosurface.
I alsow realy like SDL, but if we will continue to implement everything 
possible in SDL istead of C we will end with parse-times longer then 
renders ;-/ and with straaange syntax.

My sugesstion(s) : (PS. I think that some of this realy can be usefull 
maybe for a change try to find something good instead of criticize each-
other's ideas :)

pigment {
  bozo
  color_map { 
    [0 rgb x]  // #1 blend to next entry using global blend type
    [0.1 rgb y blend_rgb] // #2 blend to next entry  RGB
    [0.2 rgb z] // #3 blend to next entry using global blend type 
    [1 rgb x+y] // #4 blend to next entry using global blend type
    blend_hsv // set global entry (used for 1,3,4)
    precalc {4096} // precaluate 4096 RGB values to optimize speed
  }
}

---Explanation step by step---
typical rgb colormap:
  color_map {[0 rgb x][1 rgb x+y]}

hsv blend colormap:
  color_map {[0 rgb x][1 rgb x+y] blend_hsv}
  <1,0,0> - <1,1,0> will be interpolated as HSV

hsv blend colormap with more entries
  color_map {
     [0 rgb x][0.1 rgb y][0.2 rgb z][1 rgb x+z] blend_hsv }
  }
  <0,0,0>-<0,1,0> interpolate as global (set here to HSV by blend_hsv)
  <0,1,0>-<0,0,1> interpolate as global (set here to HSV by blend_hsv)
  <0,0,1>-<1,1,0> interpolate as global (set here to HSV by blend_hsv)
  <1,1,1>-<0,0,0> interpolate as global (set here to HSV by blend_hsv)

hsv blend colormap with more entries and exception
  color_map {
     [0 rgb x][0.1 rgb y blend_rgb][0.2 rgb z][1 rgb x+z] blend_hsv }
  }
  <0,0,0>-<0,1,0> interpolate as global (set here to HSV by blend_hsv)
  <0,1,0>-<0,0,1> interpolate as RGB (set only here by blend_rgb)
  <0,0,1>-<1,1,0> interpolate as global (set here to HSV by blend_hsv)
  <0,0,1>-<1,1,0> interpolate as global (set here to HSV by blend_hsv)

same, with precalcuate 
  color_map { ...
    precalc{4096}
  }


-- 
#macro g(U,V)(.4*abs(sin(9*sqrt(pow(x-U,2)+pow(y-V,2))))*pow(1-min(1,(sqrt(
pow(x-U,2)+pow(y-V,2))*.3)),2)+.9)#end#macro p(c)#if(c>1)#local l=mod(c,100
);g(2*div(l,10)-8,2*mod(l,10)-8)*p(div(c,100))#else 1#end#end light_source{
y 2}sphere{z*20 9pigment{function{p(26252423)*p(36455644)*p(66656463)}}}//M


Post a reply to this message

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