POV-Ray : Newsgroups : povray.programming : Radiosity and Media blues Server Time
5 Jul 2024 16:14:44 EDT (-0400)
  Radiosity and Media blues (Message 1 to 1 of 1)  
From: Massimo Valentini
Subject: Radiosity and Media blues
Date: 2 Jan 2003 10:11:02
Message: <3e145686@news.povray.org>
It seems that media and radiosity don't work well together
with cylindrical light. I think this is because the function
intersect_cylinderlight (in media.cpp) returns the intersections 
not always sorted. 

Applying the following patch, seems to fix the problem in the scene 
reported in a post to povray.advanced-users with same subject:


http://news.povray.org/povray.advanced-users/29502/

Massimo

--- src/media.cpp.ex 2003-01-02 15:31:35.000000000 +0000
+++ src/media.cpp 2003-01-02 15:31:33.000000000 +0000
@@ -2047,8 +2047,8 @@
         }
       }
 
-      *d1 = t1;
-      *d2 = t2;
+      *d1 = min(t1, t2);
+      *d2 = max(t1, t2);
 
       return (true);
     }


Post a reply to this message

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