Compiling Radiance under Interix (rpict problems)

(Originally posted on radiance-general - see below for original message)

Thanks for the speedy response Greg. I've tried compiling the latest HEAD
release (downloaded today, 12/11/03, with overlay) and experienced the same
problem.

Regards,

Andy

···

-----Original Message-----
From: Greg Ward [mailto:gward@lmi.net]
Sent: 12 November 2003 16:28
To: radiance-general@radiance-online.org
Cc: Andy Stone
Subject: Re: Compiling Radiance under Interix (rpict problems)

Are you compiling from the official 3.5 release, or the latest HEAD
(available from radiance-online)? If you are compiling from the
official release, the first thing to try (always) is downloading and
compiling the HEAD release, which has quite a few bug fixes, especially
related to portability across platforms.

> From: Andy Stone <andy.stone@bdsp.com>
> Date: Wed Nov 12, 2003 6:23:26 AM US/Pacific
>
> Hi,
>
> I'm currently using Radiance compiled to run under Windows Services
> for Unix (Interix) and am attempting to upgrade from my current
> version (3.1) to the latest version (3.5). I have managed to get 3.5
> to compile without any errors (except for trad and rholo, which I'm
> not too worried about right now), however I am experiencing problems
> when using rpict. The other components (rtrace, rview, etc) seem to
> be working correctly (or at least producing results similar to my
> previous installation) however the images produced rpict are looking
> very strange (and very different to rview).
>
> It is kind of hard to describe the results I am getting in plain text,
> but if for example I use rpict to produce a fisheye view of a CIE
> overcast sky then it produces a luminance pattern that starts off from
> the horizon getting brighter as it heads towards the zenith before
> suddenly dropping to zero about a third of the way up from where it
> increases again until about 2/3rds up where it drops to zero again, so
> the luminance distribution from horizon to zenith looks something like
> a saw tooth (rather than smoothly increasing from horizon to zenith as
> it should). I get a similar effect across surfaces when I render more
> complex scenes. The same scene with the same settings works on the
> older version of rpict. The effect is as if a variable somewhere is
> increasing beyond its maximum range and wrapping back around to zero.
>
> I'd be very grateful for any help as to what the problem might be (and
> how I can fix it). Perhaps there is some compiler switch that I need
> to set?
>
> Kind regards,
>
> Andy Stone

Hi Andy,

This problem sounds to me like something to do with the conversion of colors to RGBE. Could you test this by writing out your rendering from rview using the "write test.pic" and displaying the output? If it has similar artifacts to what you're seeing from rpict, then it must be in the RGBE color conversion/display somewhere.

-Greg

···

From: Andy Stone <andy.stone@bdsp.com>
Date: Wed Nov 12, 2003 8:55:53 AM US/Pacific

Thanks for the speedy response Greg.� I've tried compiling the latest HEAD release (downloaded today, 12/11/03, with overlay) and experienced the same problem.

Regards,

Andy

Hi Greg,

I've tried writing out the rview rendering and displaying it. As you
suspected the artifacts did appear in the image.

Hope this helps,
Andy

···

-----Original Message-----
From: Greg Ward [mailto:gward@lmi.net]
Sent: 12 November 2003 17:04
To: radiance-dev@radiance-online.org
Cc: Andy Stone
Subject: Re: Compiling Radiance under Interix (rpict problems)

Hi Andy,

This problem sounds to me like something to do with the conversion of
colors to RGBE. Could you test this by writing out your rendering from
rview using the "write test.pic" and displaying the output? If it has
similar artifacts to what you're seeing from rpict, then it must be in
the RGBE color conversion/display somewhere.

-Greg

> From: Andy Stone <andy.stone@bdsp.com>
> Date: Wed Nov 12, 2003 8:55:53 AM US/Pacific
>
> Thanks for the speedy response Greg. I've tried compiling the latest
> HEAD release (downloaded today, 12/11/03, with overlay) and
> experienced the same problem.
>
> Regards,
>
> Andy

OK, now we need to determine if it's the writing of RGBE or the reading that's to blame.

See if you can display one of the included images and if it looks OK. There are a number of *.pic files in the ray/lib overlay. Do these look alright? What are you displaying them with? Does ximage work?

If so, then take one of these images and pass it through ra_rgbe and pfilt. Do the outputs look OK?

We should probably take this discussion offline, unless someone else pipes in and says they're interested. Debugging can be tedious, but without access to your machine, there's no other way I can think to do this.

-Greg

···

From: Andy Stone <andy.stone@bdsp.com>
Date: Wed Nov 12, 2003 9:17:45 AM US/Pacific

Hi Greg,

I've tried writing out the rview rendering and displaying it.� As you suspected the artifacts did appear in the image.

Hope this helps,
Andy

We seem to have sorted out the Interix run-time problem, which was due to a bad frexp() implementation in their libraries. Luckily, the Radiance distribution contains a long-unused replacement for frexp(), which we could call into use. (See Georg? See? See?)

···

Begin forwarded message:

From: Andy Stone <andy.stone@bdsp.com>
Date: Thu Nov 13, 2003 8:37:09 AM US/Pacific
To: "'Greg Ward'" <gward@lmi.net>
Subject: RE: Compiling Radiance under Interix (rpict problems)

According to the man pages they're both declared in math.h:
double ldexp(double x, int exp)
double frexp (double value, int *exp)

-- which agrees with the actual declarations in math.h

thanks,
Andy

> -----Original Message-----
> From: Greg Ward [mailto:gward@lmi.net]
> Sent: 13 November 2003 16:04
> To: Andy Stone
> Subject: Re: Compiling Radiance under Interix (rpict problems)
>
> Great -- I'm glad we found the crux of the problem, at least.� I'm
> wondering where the frexp() and ldexp() functions are declared -- is
> there a man page that specifies which header you should include for
> these functions?� They are in <math.h> on most systems, but it could be
> they are missing in yours.� Could you check?
>
> Thanks,
> -Greg
>
> P.S.� You should post something to radiance-dev once it's all sorted
> out, just to let folks know.

Hi,

I'm currently using Radiance compiled to run under Windows Services for Unix
(Interix) and am attempting to upgrade from my current version (3.1) to the
latest version (3.5). I have managed to get 3.5 to compile without any
errors (except for trad and rholo, which I'm not too worried about right
now), however I am experiencing problems when using rpict. The other
components (rtrace, rview, etc) seem to be working correctly (or at least
producing results similar to my previous installation) however the images
produced rpict are looking very strange (and very different to rview).

It is kind of hard to describe the results I am getting in plain text, but
if for example I use rpict to produce a fisheye view of a CIE overcast sky
then it produces a luminance pattern that starts off from the horizon
getting brighter as it heads towards the zenith before suddenly dropping to
zero about a third of the way up from where it increases again until about
2/3rds up where it drops to zero again, so the luminance distribution from
horizon to zenith looks something like a saw tooth (rather than smoothly
increasing from horizon to zenith as it should). I get a similar effect
across surfaces when I render more complex scenes. The same scene with the
same settings works on the older version of rpict. The effect is as if a
variable somewhere is increasing beyond its maximum range and wrapping back
around to zero.

I'd be very grateful for any help as to what the problem might be (and how I
can fix it). Perhaps there is some compiler switch that I need to set?

Kind regards,

Andy Stone

Hi Andy,

Are you compiling from the official 3.5 release, or the latest HEAD (available from radiance-online)? If you are compiling from the official release, the first thing to try (always) is downloading and compiling the HEAD release, which has quite a few bug fixes, especially related to portability across platforms.

If you do this and are still seeing errors, then I suggest you post a message to the radiance-dev list, since it will then be a development issue once we are working on the latest sources. It is not worthwhile for anyone to attempt to debug the official release at this stage, as they are 90% likely to be rediscovering bugs that have already been found and fixed.

Thanks for your efforts -- hopefully, this won't take long.

-Greg

P.S. Be sure to overlay the rad3R5supp.tar.gz files over the HEAD release prior to compiling, as without these additional files, you won't have a complete distribution.

···

From: Andy Stone <andy.stone@bdsp.com>
Date: Wed Nov 12, 2003 6:23:26 AM US/Pacific

Hi,

I'm currently using Radiance compiled to run under Windows Services for Unix (Interix) and am attempting to upgrade from my current version (3.1) to the latest version (3.5).� I have managed to get 3.5 to compile without any errors (except for trad and rholo, which I'm not too worried about right now), however I am experiencing problems when using rpict.� The other components (rtrace, rview, etc) seem to be working correctly (or at least producing results similar to my previous installation) however the images produced rpict are looking very strange (and very different to rview).�

It is kind of hard to describe the results I am getting in plain text, but if for example I use rpict to produce a fisheye view of a CIE overcast sky then it produces a luminance pattern that starts off from the horizon getting brighter as it heads towards the zenith before suddenly dropping to zero about a third of the way up from where it increases again until about 2/3rds up where it drops to zero again, so the luminance distribution from horizon to zenith looks something like a saw tooth (rather than smoothly increasing from horizon to zenith as it should).� I get a similar effect across surfaces when I render more complex scenes.� The same scene with the same settings works on the older version of rpict.� The effect is as if a variable somewhere is increasing beyond its maximum range and wrapping back around to zero.

I'd be very grateful for any help as to what the problem might be (and how I can fix it).� Perhaps there is some compiler switch that I need to set?

Kind regards,

Andy Stone