POV-Ray : Newsgroups : povray.advanced-users : Light Bright Server Time
1 Nov 2024 03:14:53 EDT (-0400)
  Light Bright (Message 1 to 2 of 2)  
From: David Wallace
Subject: Light Bright
Date: 15 Jul 2003 15:51:28
Message: <3f145b40$1@news.povray.org>
I want to make the lit bulbs in this readout display stand out from the
rest.  How do I pull it off?

#declare acolTable = array[6] {
 <0.00, 1.00, 0.00>,
 <0.75, 1.00, 0.00>,
 <1.00, 1.00, 0.00>,
 <1.00, 0.75, 0.00>,
 <1.00, 0.00, 0.00>,
 <0.00, 0.00, 1.00>
}

#macro otrLight(col, rad, active)
 #if (active)
  light_source {
   0, 1
   fade_distance 1
   fade_power 1.7
   looks_like { sphere { 0, rad
    hollow
    pigment { rgb col filter 1 }
    finish { ambient 1 }
   } }
  }
 #else
  sphere { 0, rad
   hollow
   pigment { rgb col filter 1 }
  }
 #end
#end

#macro otrLights(pos) union {
 #local siz = (otrDim.x-0.02)*.070;
 #local sep = siz*2.2;
 #local orig = -sep*2.5;
 #local ps = 0;
 #while (ps<6)
  object {
   otrLight( acolTable[ps], siz, (ps=pos) )
   translate x*(orig+ps*sep)
  }
  #set ps = ps + 1;
 #end
} #end

#declare otrSeed = seed(9515);

#macro otsReadout() union {
 #local bx1 = otrDim+y*otrRis;
 #local bang = degrees(atan2(otrRis,otrDim.z));
 intersection {
  box { <-.5, 0, -.5>, <.5, 1, .5> scale bx1 }
  plane { y, 0 rotate x*bang translate otrDim*<0, 1, 0.5> }
 }
 #local bstr = otrDim*<1,1,Pythag(1,otrRis/otrDim.z)>;
 #local bhgt = otrDim.y+otrRis*0.5;
 #local bcut = bstr-<0.02, 0, 0.02>;
 difference {
  box { <-.5, 0, -.5>, <.5, 1, .5> scale bstr }
  box { <-.5, -.1, -.5>, <.5, 1.1, .5> scale bcut }
  rotate x*bang
  translate y*bhgt
 }
 #local sep = z*bcut*0.20;
 #local orig = -sep*2.0;
 #local ps = 0;
 union {
  #while (ps<5)
   #local lps = int(rand(otrSeed)*6);
   object { otrLights(lps) translate orig+sep*ps }
   #set ps = ps + 1;
  #end
  rotate x*bang
  translate y*bhgt
 }
} #end


Post a reply to this message

From: Hughes, B 
Subject: Re: Light Bright
Date: 15 Jul 2003 17:55:29
Message: <3f147851@news.povray.org>
Looks like you are going to need media, emitting or scattering kind; or
maybe just a highlight on the sphere objects. Either way you'll want to use
light_group to collectively affect them from only the light source intended
instead of any external lights, I believe. Unless the material making up the
light objects is supposed to be a kind of plastic or glass, in which case
you would need secondary spheres acting as a shell around them, containing
the media. Then the inner spheres can have specular highlights. Upping the
default diffuse finish might also help, perhaps via an interior_texture.

Bob H.

"David Wallace" <dar### [at] earthlinknet> wrote in message
news:3f145b40$1@news.povray.org...
> I want to make the lit bulbs in this readout display stand out from the
> rest.  How do I pull it off?
>
> #macro otrLight(col, rad, active)
>  #if (active)
>   light_source {
>    0, 1
>    fade_distance 1
>    fade_power 1.7
>    looks_like { sphere { 0, rad
>     hollow
>     pigment { rgb col filter 1 }
>     finish { ambient 1 }
>    } }
>   }
>  #else
>   sphere { 0, rad
>    hollow
>    pigment { rgb col filter 1 }
>   }
>  #end
> #end


Post a reply to this message

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