POV-Ray : Newsgroups : povray.programming : Problem #3 In OpenVMS Port Of MegaPOV-Ray: Divide-by-zero error Server Time
29 Jul 2024 10:23:21 EDT (-0400)
  Problem #3 In OpenVMS Port Of MegaPOV-Ray: Divide-by-zero error (Message 1 to 5 of 5)  
From: Robert Alan Byer
Subject: Problem #3 In OpenVMS Port Of MegaPOV-Ray: Divide-by-zero error
Date: 12 Mar 2000 13:13:44
Message: <38CB9807.4C5C0FD3@mail.ourservers.net>
Thanks for the help I've gotten so far with monor code problems.

Now for #3.

I have gotten everything to coimpile just fine and everything in the
MegaPOV-Ray "DEMO" ZIP file from the "Patched POV-Ray" site works EXCEPT
"radiosity" (which was a problem in the OpenVMS port before, not worried
now) and "photons".

When I try an "demo" image with "photons", I get a "high performance
arithmetic" error, actually a "invalid floating point operation". 
Normally that's all I got, but once it did tell me that it was a
"divide-by-zero" error.

Now, after loading the debugger, I was able to track it down to
"LIGHTING.C" function "Determine_Apparent_Colour" the following lines.

     Colour[RED]   += Weight_List[i] * C1[RED];
      Colour[GREEN] += Weight_List[i] * C1[GREEN];
      Colour[BLUE]  += Weight_List[i] * C1[BLUE];
    /* NK phmap */
    }
    /* NK ---- */

    /* Use transmittance value for alpha channel support. [DB] */

/*
    Colour[TRANSM]  += Weight_List[i] * C1[TRANSM];
*/
    Colour[TRANSM] *= C1[TRANSM];

----^^^^^^^^^^^^^^^^^^^^^^^^^^^^

It does maby one or two passes through this and then crashes out.

Any thoughts here as I'm not up on what all the POV or MegaPOV code does
so I'm going to need pointers on potential debugging here.

Thanks.

-- 

 +--------------------------+----------------------------------------+
 | 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: Problem #3 In OpenVMS Port Of MegaPOV-Ray: Divide-by-zero error
Date: 13 Mar 2000 09:57:02
Message: <38cd01be$1@news.povray.org>
Robert Alan Byer <bye### [at] mailourserversnet> wrote...
>     Colour[TRANSM] *= C1[TRANSM];

The filter and transmit channels of Colour do not get initialized during
photon tracing.  To correct this, add the following lines before the call to
Trace() in ShootPhotonsAtObject in photons.c:

PhotonColour[3] = 0.0;
PhotonColour[4] = 0.0;

-Nathan


Post a reply to this message

From: Robert Alan Byer
Subject: Re: Problem #3 In OpenVMS Port Of MegaPOV-Ray: Divide-by-zero error
Date: 13 Mar 2000 11:21:42
Message: <38CCCF44.27E3EA1B@mail.ourservers.net>
Nathan Kopp wrote:
> 
> Robert Alan Byer <bye### [at] mailourserversnet> wrote...
> >     Colour[TRANSM] *= C1[TRANSM];
> 
> The filter and transmit channels of Colour do not get initialized during
> photon tracing.  To correct this, add the following lines before the call to
> Trace() in ShootPhotonsAtObject in photons.c:
> 
> PhotonColour[3] = 0.0;
> PhotonColour[4] = 0.0;
> 
> -Nathan

Thanks, I figured it was something like that :}

I do have one other problem, but I think I can work it out with the
compiler
before I start whining here :}

Thanks.

-- 

 +--------------------------+----------------------------------------+
 | 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: Problem #3 In OpenVMS Port Of MegaPOV-Ray: Divide-by-zero error
Date: 13 Mar 2000 12:25:53
Message: <38CCDE4E.3D0BE99E@mail.ourservers.net>
> 
> Robert Alan Byer <bye### [at] mailourserversnet> wrote...
> >     Colour[TRANSM] *= C1[TRANSM];
> 
> The filter and transmit channels of Colour do not get initialized during
> photon tracing.  To correct this, add the following lines before the call to
> Trace() in ShootPhotonsAtObject in photons.c:
> 
> PhotonColour[3] = 0.0;
> PhotonColour[4] = 0.0;
> 
> -Nathan

Well, that helped some and now I can run the THREELENS.POV and
THREELENS2.POV
photon demos.  I can run the REFLECTION.POV demo if I turn off radiosity
(as radiosity still kinda broken,, goes into infinate loop, next thing
to fix).

When trying to trace SPHERECYL.POV it started to build the photon maps
and
then crashed (at the same place) with the following photon map output.

	this=15200, total=27525, m=0, area 1, 1 : 963

When I tried PRISM.POV it said...

	this=300, total=2846, m=0, area 1, 1 : 7017

The rest of the crashes died when trying to build the photon maps and
didn't even display any statistics.

I'm still getting crashes at the same line, and when trying to trace
MEDIAPHOT.POV I got a divide by zero error, but when I loaded it into
the
debugger and ran it again it came back as a floating point overflow so I
think I still have some things to work on. (I'm going to check my
compiler flags to see what could be conflicting and causing this.)

MEDIAPHOT.POV did output the following.

	this=300, total=0, m=2400, area 1, 1 : 0

-- 

 +--------------------------+----------------------------------------+
 | 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: Problem #3 In OpenVMS Port Of MegaPOV-Ray: Divide-by-zero error
Date: 13 Mar 2000 19:49:26
Message: <38CD4643.5BDC3567@mail.ourservers.net>
Robert Alan Byer wrote:
> 
> >
> > Robert Alan Byer <bye### [at] mailourserversnet> wrote...
> > >     Colour[TRANSM] *= C1[TRANSM];
> >
> > The filter and transmit channels of Colour do not get initialized during
> > photon tracing.  To correct this, add the following lines before the call to
> > Trace() in ShootPhotonsAtObject in photons.c:
> >
> > PhotonColour[3] = 0.0;
> > PhotonColour[4] = 0.0;
> >
> > -Nathan
> 
> Well, that helped some and now I can run the THREELENS.POV and
> THREELENS2.POV
> photon demos.  I can run the REFLECTION.POV demo if I turn off radiosity
> (as radiosity still kinda broken,, goes into infinate loop, next thing
> to fix).
> 
> When trying to trace SPHERECYL.POV it started to build the photon maps
> and
> then crashed (at the same place) with the following photon map output.
> 
>         this=15200, total=27525, m=0, area 1, 1 : 963
> 

Well....

After playing with compiler flags I got radiosity working as far as I
can tell in my OpenVMS port of the "offical" POV-Ray v3.1g and I've
tried the same for the MegaPOV port and it did help some as now I can
run a little more of the "photons" test images that I couldn't before.

I tested out radiosity in MegaPOV as best as I could and it had no
problem with the test images I tested with.

But I'm still getting crashes at the same line so I still have some
kind of floating point issues left to try to work out.

-- 

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