POV-Ray : Newsgroups : povray.bugreports : Parallel Light Direction Does Not Match Translated Position Server Time
31 Oct 2024 10:20:24 EDT (-0400)
  Parallel Light Direction Does Not Match Translated Position (Message 1 to 2 of 2)  
From: waggy
Subject: Parallel Light Direction Does Not Match Translated Position
Date: 24 Nov 2011 12:50:00
Message: <web.4ece83b55f6c04bb9726a3c10@news.povray.org>
It looks to me like the direction is incorrect when a parallel light source is
translated.  In the minimal file below, I would expect the sphere to be
illuminated by yellow light from the left, since both red and green parallel
light sources are located to the left.  Instead, it appears to be incorrectly
illuminated uniformly by the first red light, and only the second green light
appears to be coming from the left.

#version 3.7;

light_source {
  <0,0,0>
  color rgb <1,0,0>
  parallel // It doesn't matter if here or below.
  translate -10*x
  //parallel
  }
light_source {
  -10*x
  color rgb <0,1,0>
  parallel
  }
sphere {<0,0,0>,1
  pigment{color rgb 1}
  }
camera {
  location -3*z
  look_at 0
  }

/*
Ubuntu 10.04 (lucid), Kernel Linux 2.6.32.5-generic

povray --version
povray: This is a RELEASE CANDIDATE version of POV-Ray. General distribution is
discouraged.
POV-Ray 3.7.0.RC3

This is a release candidate of POV-Ray version 3.7.0.
General distribution is strongly discouraged.

Copyright 1991-2003 Persistence of Vision Team
Copyright 2003-2011 Persistence of Vision Raytracer Pty. Ltd.

Built-in features:
  I/O restrictions:          enabled
  X Window display:          enabled (using SDL)
  Supported image formats:   gif tga iff ppm pgm hdr png jpeg tiff openexr
  Unsupported image formats: -

Compilation settings:
  Build architecture:  x86_64-unknown-linux-gnu
  Built/Optimized for: x86_64-unknown-linux-gnu (using -march=native)
  Compiler vendor:     gnu
  Compiler version:    g++ 4.4.3
  Compiler flags:      -pipe -Wno-multichar -Wno-write-strings
-fno-enforce-eh-specs -s -O3 -ffast-math -march=native -pthread
*/


Post a reply to this message

From: waggy
Subject: Re: Parallel Light Direction Does Not Match Translated Position
Date: 24 Nov 2011 13:30:01
Message: <web.4ece8c1043d497209726a3c10@news.povray.org>
Though the behavior seems odd to me, this may not be a bug.

Placing "point_at <0,0,0>" after the translation appears to result in the
expected behavior.


Post a reply to this message

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