POV-Ray : Newsgroups : povray.programming : QUESTION: Radiosity problem in POV-Ray v3.1g Server Time
28 Jul 2024 20:21:12 EDT (-0400)
  QUESTION: Radiosity problem in POV-Ray v3.1g (Message 3 to 12 of 12)  
<<< Previous 2 Messages Goto Initial 10 Messages
From: Nathan Kopp
Subject: Re: QUESTION: Radiosity problem in POV-Ray v3.1g
Date: 15 Mar 2000 08:31:40
Message: <38cf90bc@news.povray.org>
The comments for ot_index_box() in octree.c contain the following text:

*   PORTABILITY WARNING:  this function REQUIRES IEEE single precision
floating
*   point format to work.  This is true of most common systems except VAXen,
*   Crays, and Alpha AXP in VAX compatibility mode.  Local "float" variables
*   can NOT be made double precision "double" or "DBL".

-Nathan

Robert Alan Byer <bye### [at] mailourserversnet> wrote...
> I thought I had everything working in my POV-Ray v3.1g port for OpenVMS
> UNTIL I tried the radiosity demo scene.
>


Post a reply to this message

From: Nieminen Juha
Subject: Re: QUESTION: Radiosity problem in POV-Ray v3.1g
Date: 15 Mar 2000 11:05:05
Message: <38cfb4b0@news.povray.org>
Nathan Kopp <Nat### [at] koppcom> wrote:
: *   PORTABILITY WARNING:  this function REQUIRES IEEE single precision
: floating
: *   point format to work.

  Why?

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Robert Alan Byer
Subject: Re: QUESTION: Radiosity problem in POV-Ray v3.1g
Date: 15 Mar 2000 11:49:23
Message: <38CF78C3.5711BD3B@mail.ourservers.net>
> 
>   I don't understand. How can you have all these problems with the core
> source of povray in VMS when nobody else has the same problems? It looks like
> you don't have the same source codes as anyone else has.
>

I'm using the stock "povuni_s.tgz" from the Unix Download page at the
POV-Ray site.

Plus the fact that I'm NOT Unix or Linux of any kind, I'm porting
the Unix code over to OpenVMS which is slightly different.
 
-- 

 +--------------------------+----------------------------------------+
 | 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

From: Robert Alan Byer
Subject: Re: QUESTION: Radiosity problem in POV-Ray v3.1g
Date: 15 Mar 2000 11:55:17
Message: <38CF7A21.50D7BC58@mail.ourservers.net>
> 
> The comments for ot_index_box() in octree.c contain the following text:
> 
> *   PORTABILITY WARNING:  this function REQUIRES IEEE single precision
> floating
> *   point format to work.  This is true of most common systems except VAXen,
> *   Crays, and Alpha AXP in VAX compatibility mode.  Local "float" variables
> *   can NOT be made double precision "double" or "DBL".
> 
> -Nathan

(Doing best Homer Simpson impersonation)  DOOOOOOHHHHHH

Might help if I actually read :}~

-- 

 +--------------------------+----------------------------------------+
 | 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

From: Nathan Kopp
Subject: Re: QUESTION: Radiosity problem in POV-Ray v3.1g
Date: 15 Mar 2000 12:19:40
Message: <38cfc62c@news.povray.org>
Nieminen Juha <war### [at] sarakerttunencstutfi> wrote...
> Nathan Kopp <Nat### [at] koppcom> wrote:
> : *   PORTABILITY WARNING:  this function REQUIRES IEEE single precision
> : floating
> : *   point format to work.
>
>   Why?

Later in the code you'll run across these two cryptic operations and
comments that describe them.

First,

  /*
   * This hex operation does a floor to next lower power of 2, by clearing
   * all of the mantissa bits.  Works only on IEEE single precision floats
   */
  convert.f = maxdel;
  convert.l &= 0xff800000;
  bsized = (DBL) convert.f;

And later,
  /*
   * This magic hex operation extracts the exponent, which gives us an
   * integer number suitable for labelling a range of a power of 2.  In IEEE
   * format, value = pow(2,exponent-127). Therefore, if our index is, say,
   * 129, then the item has a maximum extent of (2 to the (129-127)), or
   * about 4 space units.
   */
  convert.f = (float) bsized;
  base_id.Size = (convert.l & 0x7f800000) >> 23;


The variable "convert" is defined as follows:
  union
  {
    float f;
    long l;
  }
  convert;


A portable version of these operations could be written, using logrithms and
fractional powers, but it would be significantly slower.  I suggest #ifdef
blocks so that VAX and other non-IEEE-compliant systems will be able to run
this code, even if it does have to run slowly.

-Nathan


Post a reply to this message

From: Robert Alan Byer
Subject: Re: QUESTION: Radiosity problem in POV-Ray v3.1g
Date: 15 Mar 2000 13:03:19
Message: <38CF8A17.53E911D1@mail.ourservers.net>
>
> fractional powers, but it would be significantly slower.  I suggest #ifdef
> blocks so that VAX and other non-IEEE-compliant systems will be able to run
> this code, even if it does have to run slowly.
>

This is what so far has been done to keep compatibility.  I'm looking
into this
more as I have been told that the newer compiler has a IEEE float
compliant
setting.

-- 

 +--------------------------+----------------------------------------+
 | 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

From: PoD
Subject: Re: QUESTION: Radiosity problem in POV-Ray v3.1g
Date: 15 Mar 2000 16:37:37
Message: <38D009D1.48052D85@merlin.net.au>
Eeew, what a horrid way to treat floats.


Post a reply to this message

From: Nieminen Juha
Subject: Re: QUESTION: Radiosity problem in POV-Ray v3.1g
Date: 16 Mar 2000 03:52:07
Message: <38d0a0b6@news.povray.org>
Nathan Kopp <Nat### [at] koppcom> wrote:
: A portable version of these operations could be written, using logrithms and
: fractional powers, but it would be significantly slower.  I suggest #ifdef
: blocks so that VAX and other non-IEEE-compliant systems will be able to run
: this code, even if it does have to run slowly.

  I definitely agree. Optimizations are ok, but there should always be the
possibility of compiling it in any system.

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

From: Robert Alan Byer
Subject: Re: QUESTION: Radiosity problem in POV-Ray v3.1g
Date: 16 Mar 2000 12:29:42
Message: <38D0D3B6.7975F60B@mail.ourservers.net>
> 
> Nathan Kopp <Nat### [at] koppcom> wrote:
> : A portable version of these operations could be written, using logrithms and
> : fractional powers, but it would be significantly slower.  I suggest #ifdef
> : blocks so that VAX and other non-IEEE-compliant systems will be able to run
> : this code, even if it does have to run slowly.
> 
>   I definitely agree. Optimizations are ok, but there should always be the
> possibility of compiling it in any system.
> 

I agree also...

Currently, here's the situation...

OpenVMS on Alpha platforms does have IEEE float mode (using the compiler
switch
"/FLOAT=IEEE_FLOAT") and using that without the modifications to
"octree.c"
allows radiosity to work just fine.

OpenVMS on VAX platforms don't have a IEEE float mode so I have to use
the
modifications for "octree.c" to make radiosity work.

What I've done is put in an "#ifdef" for OpenVMS VAX in "octree.c" so
that
only OpenVMS VAX will use that modification.

I did some testing between using IEEE float and the modification in
"octree.c"
on the Alpha plat form and this is what I found.

Using the "RAD2.POV" radiosity file and using the following POV
command...

   povray +IRAD2.POV +ORAD2.TGA +FT +Q9 +QR +V1 +D +A0.300 +W640 +H480
+B1000

using the modified "octree.c" and not using IEEE float it took 7
minutes, 54 seconds.  Using IEEE float and not useing the modified
"octree.c" it took
4 minutes, 47 seconds, a definate improvement.  (Note the Alpha platform
was a AlphaStation 500/333, a 333MHz system).

-- 

 +--------------------------+----------------------------------------+
 | 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

From: Peter J  Holzer
Subject: Re: QUESTION: Radiosity problem in POV-Ray v3.1g
Date: 22 Mar 2000 20:02:03
Message: <38D95213.4D9DBC06@hjp.at>
Nathan Kopp wrote:
>   /*
>    * This hex operation does a floor to next lower power of 2, by clearing
>    * all of the mantissa bits.  Works only on IEEE single precision floats
>    */
[...]
>   /*
>    * This magic hex operation extracts the exponent, which gives us an
>    * integer number suitable for labelling a range of a power of 2.  In IEEE
>    * format, value = pow(2,exponent-127). Therefore, if our index is, say,
>    * 129, then the item has a maximum extent of (2 to the (129-127)), or
>    * about 4 space units.
>    */
[...]
> A portable version of these operations could be written, using logrithms and
> fractional powers, but it would be significantly slower.

These operations can be easily implemented using the standard C
functions ldexp and frexp, which should be reasonably fast (although 
probably not as fast as the integer operations above) on any base2
system.

	hp 

-- 
   _  | Peter J. Holzer             | Think of it as evolution in action
|_|_) | Sysadmin WSR                |
| |   | hjp### [at] wsracat               |   -- Tony Rand in "Oath of Fealty"
__/   | http://wsrx.wsr.ac.at/~hjp/ | 	   by Niven & Pournelle


Post a reply to this message

<<< Previous 2 Messages Goto Initial 10 Messages

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