[Radiance-general] Illegal Power warning

Greg Ward gward at lmi.net
Wed Dec 5 10:33:40 PST 2007


Hi Glen,

This error occurs when you pass a negative value (it can be very  
small, such as -1e-11) and raise it to a non-integer power.  The  
result would be a complex number, but of course this doesn't work  
since a real result is required.

You can play with values using the "icalc" program, and it is even  
possible to debug a function file to some degree using the "debugcal"  
script, which uses rtrace to assign the variables described in  
rayinit.cal.

Good luck,
-Greg

> From: G.Harding1 at Bradford.ac.uk
> Date: December 5, 2007 10:05:28 AM PST
>
> Hi,
>
> I am trying to implement a measured BRDF using the BRTDfunc  
> material type.
>
> In my .cal file, I fit the LaFortune cosine lobe BRDF model for my  
> data to the
> diffuse and specular variables.
>
> This seems to work ok in principal (although the results don't look  
> quite
> right), but when calculating the specular componets I get the  
> following
> warning:
>
> rpict: warning - compute error for BRTDfunc "measured_surface"
> rpict: Illegal power
>
>
> As far as I am aware all the raised powers in my functions are  
> reasonable
> values, so I'm not sure why I'm getting this error.
> Does any one know what the conditions are that would give rise to  
> this error
> (ie, do powers have to be integers for instance)?
>
> Many thanks,
> Glen Harding.



More information about the Radiance-general mailing list