POV-Ray : Newsgroups : povray.programming : QUESTION: Radiosity problem in POV-Ray v3.1g : QUESTION: Radiosity problem in POV-Ray v3.1g Server Time
28 Jul 2024 16:25:18 EDT (-0400)
  QUESTION: Radiosity problem in POV-Ray v3.1g  
From: Robert Alan Byer
Date: 14 Mar 2000 14:07:22
Message: <38CE4798.14FD884B@mail.ourservers.net>
I thought I had everything working in my POV-Ray v3.1g port for OpenVMS
UNTIL I tried the radiosity demo scene.

It would parse the image and then go into an infinite loop rendering
line #1.

A quick look showed me that the ot_point_in_node() test called in
ot_index_box() is always FALSE so the loop there is infinite (
while(!done) ).
It takes quite a bit of CPU actually doing not too much. The

  return(point[X] >= lox && point[X] < hix &&
         point[Y] >= loy && point[Y] < hiy &&
         point[Z] >= loz && point[Z] < hiz);

is mainly translated into things such as

  -11.800113 >= -10000000.000000 && -11.800113 < -10000000.000000
   -2.364801 >= -10000000.000000 &&  -2.364801 < -10000000.000000
    5.109679 >= -10000000.000000 &&   5.109679 < -10000000.000000

The main reason for that is that the funcky union does not seem to do
what was intended (whatever that is). The conversion sized = (DBL)
size.f;
always leads to 0.0 and consequently, minx = miny = minx = - OT_BIAS
and lox = hix = loy = hiy = loz = hiz = - OT_BIAS as well.
                                                                      
BTW : (DBL) size.f; is bound to lead to 0.0 because the TRACER already
complains that size.f is an illegal float (i.e. goes beyong a float).
There
is no way to get the above test pass in such conditions.

This way of playing with union of float and double is highly
unrecommended.
 
I got around the problem and by doing the folowing

	- In octree.c line 547 you change

  	  sized = (DBL) size.f;
 		to
  	  sized = size.l;

I have no clue if that was the intent but this allows the program to get
unstuck and does appear to work and the radiosity demo scene comes out
properly.

So I'm asking what the intent here was and if what I've done breaks
anything or would cause any other problems.

-- 

 +--------------------------+----------------------------------------+
 | Robert Alan Byer         | "I don't want to take over the world,  |
 | bye### [at] mailourserversnet |  just my own little part of it."       |
 | Phone: (317)357-2724     | http://www.ourservers.net/~byer        |
 +--------------------------+----------------------------------------+
 | Send an E-mail request to obtain my PGP key.        ICQ #65926579 |
 +-------------------------------------------------------------------+


Post a reply to this message

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