POV-Ray : Newsgroups : povray.newusers : Trouble defining a visible light source : Re: Trouble defining a visible light source Server Time
4 Jul 2022 01:18:51 EDT (-0400)
  Re: Trouble defining a visible light source  
From: TheRealMorris
Date: 25 Nov 2021 18:05:00
Message: <web.61a0164cd163838f4f1a67df8bf7213@news.povray.org>
=?utf-8?Q?Harald_J=C3=B6rg?= <haj### [at] posteode> wrote:
> TheRealMorris writes:
>
> > I'm using Povray 3.7.0.8 (which is the version coming straight from the Ubuntu
> > 21.10 archives) and I'm trying to define a visible light source. I found this in
> > the docs for povray 3.6 here:
> >
> > http://www.povray.org/documentation/view/3.6.2/137/
> >
> > So, just for a test I copy/pasted this into my scene:
> >
> >
> > light_source
> > { <0,0,0> color 1
> >   looks_like
> >   { sphere
> >     { <0,0,0>,0.1
> >       color { rgb 1 }
> >       finish { ambient 1 }
> >     }
> >   }
> >   translate <10,20,30>
> > }
> >
> >
> > But I get this error:
> >
> >
> > File '/home/trm/light.pov' line 91: Parse Error: No matching } in 'sphere', {
> > found instead Fatal error in parser: Cannot parse input.
> >
> > Line 91 is the "color { rgb 1 }" one ...
> >
> >
> > Did something change in the syntax in version 3.7 or is the example incorrect
> > (or am I missing something basic)?
>
> The syntax of POV-Ray apparently has changed, 'color' is no longer
> permitted outside a texture or pigment.  Replace
>
>     color { rgb 1 }
>
> with
>
>     pigment { color rgb 1 }
>
> and the scene should render.
> --
> Cheers,
> haj

Thank you, that solves the issue.


Post a reply to this message

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