POV-Ray : Newsgroups : povray.newusers : trying to add a light blub to a lamp Server Time
26 Dec 2024 12:43:13 EST (-0500)
  trying to add a light blub to a lamp (Message 1 to 3 of 3)  
From: Wade
Subject: trying to add a light blub to a lamp
Date: 7 Aug 2002 10:20:38
Message: <3d512cb6$1@news.povray.org>
I'm trying to a blub to a lamp.   I created an include file for the blub and
created a declare statement to shortened my code in the pov file.  I used
the object modifier.  Did I used the wrong modifier to add the add within
the union statement?  here's the code:

// Persistence of Vision Ray Tracer Scene Description File
// File: ?.pov
// Vers: 3.5
// Desc: Radiosity Scene Template
// Date: mm/dd/yy
// Auth: ?
//

#version 3.5;
// Standard pre-defined colors
//
#include "lightblub.inc"
#include "colors.inc"
#include "metals.inc"

#declare Blub = light_source {
  <0,2,0>
  color rgb <1,1,1>
  area_light x*1, y*1, 2, 2
  adaptive 1
  jitter
  looks_like {Lightblub}
}
#declare Radiosity=on;

global_settings {
  assumed_gamma 1.0
  //max_trace_level 25
  #if (Radiosity)
    radiosity {
      pretrace_start 0.08           // start pretrace at this size
      pretrace_end   0.04           // end pretrace at this size
      count 35                      // higher -> higher quality (1..1600)
[35]
      nearest_count 5               // higher -> higher quality (1..10) [5]
      error_bound 1.8               // higher -> smoother, less accurate
[1.8]
      recursion_limit 3             // how much interreflections are
calculated (1..5+) [3]
      low_error_factor .5           // reduce error_bound during last
pretrace step
      gray_threshold 0.0            // increase for weakening colors (0..1)
[0]
      minimum_reuse 0.015           // reuse of old radiosity samples
[0.015]
      brightness 1                  // brightness of radiosity effects
(0..1) [1]

      adc_bailout 0.01/2
      //normal on                   // take surface normals into account
[off]
      //media on                    // take media into account [off]
      //save_file "file_name"       // save radiosity data
      //load_file "file_name"       // load saved radiosity data
      //always_sample off           // turn sampling in final trace off [on]
      //max_sample 1.0              // maximum brightness of samples
    }
  #end
}

#default {
  texture {
    pigment {rgb 1}
    #if (Radiosity)
      finish {
        ambient 0.0
        diffuse 0.6
        specular 0.3
      }
    #else
      finish {
        ambient 0.1
        diffuse 0.6
        specular 0.3
      }
    #end
  }
}

// ----------------------------------------

camera {
  right x*image_width/image_height
  location  <0,1.5,-4>
  look_at   <0,1,0>
}

light_source {
  <500,500,-500>       // light's position
  color rgb <1, 1, 1>  // light's color
}

sky_sphere {
  pigment {
    gradient y
    color_map {
      [0.0 rgb <0.6,0.7,1.0>]
      [0.7 rgb <0.0,0.1,0.8>]
    }
  }
}

// ----------------------------------------

plane {
  y, 0
  texture {
    pigment {
      checker
      color rgb <1.0, 0.8, 0.6>
      color rgb <1.0, 0.0, 0.0>
      scale 0.5
    }
  }
}

union {
 cylinder {
  0*y .15*y .5
  }
 cylinder {
  0*y 1.5*y .15
 }
 texture { pigment { color Black } finish { F_MetalB } }
 object { Blub translate y*1.5}
}
__________________________________________________________________ Wade
Markham ICQ#: 44258048 Current ICQ status: + More ways to contact me i See
more about me:
__________________________________________________________________


Post a reply to this message

From: Robert Chaffe
Subject: Re: trying to add a light blub to a lamp
Date: 7 Aug 2002 22:34:01
Message: <3d51d899@news.povray.org>
"Wade" <Zav### [at] aolcom> wrote in message
news:3d512cb6$1@news.povray.org...
> I'm trying to a blub to a lamp.   I created an include file for the blub
and
> created a declare statement to shortened my code in the pov file.  I used
> the object modifier.  Did I used the wrong modifier to add the add within
> the union statement?  here's the code:
>
> [snip]
>
> union {
>  cylinder {
>   0*y .15*y .5
>   }
>  cylinder {
>   0*y 1.5*y .15
>  }
>  texture { pigment { color Black } finish { F_MetalB } }
>  object { Blub translate y*1.5}
> }

Within the union, the object modifiers should be specified after the
objects.  Moving the texture to after the object{Blub...} eliminates the
error message.  See if that gives a desirable result.  I didn't have
"lightblub.inc" to include for a complete test.

--
Robert Chaffe
http://www.donovansweb.com/~chaffe/


Post a reply to this message

From: Wade
Subject: Re: trying to add a light blub to a lamp
Date: 8 Aug 2002 10:26:36
Message: <3d527f9c$1@news.povray.org>
"Robert Chaffe" <rob### [at] earthlinknet> wrote in message
news:3d51d899@news.povray.org...
{snipped}
> Within the union, the object modifiers should be specified after the
> objects.  Moving the texture to after the object{Blub...} eliminates the
> error message.  See if that gives a desirable result.  I didn't have
> "lightblub.inc" to include for a complete test.
>
Robert, thanks for the help and it works
Wade


Post a reply to this message

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