Invisible light sources and attenuation


#1

Hello,

I am new to radiance and I am trying to find a way to implement in Radiance the behavior
of point light sources and spotlights in POVRAY .Therefore, I would like to ask a
couple of questions about that:

  1. Is it possible to simulate a point light source and a spotlight without being
    visible (as geometric entities) to the final rendered image? If yes, how can this be done?

  2. If I understand correctly light attenuation from a light source follows the inverse square
    law by default. Is it possible to modify this behavior and have linear
    attenuation or no attenuation at all?

Thank you very much in advance!


#2

Hi Nikos,

welcome to the world of physically based rendering. As this term already
implies, you can expect light sources to behave according to the laws of
physics. What you are asking for kind of breaks these laws - so the
general answer to both questions would be no.

Nevertheless, there are some ways to “trick” Radiance into “invalid”
results. You can change light source visibility with the -dv switch
(which will turn the sources black, so not really invisible…). This
switch is mainly ment for illuminance calculations. You can create
invisible, extended light source using the illum modifier. These will
contribute to the ambient calculation and remain invisible when directly
viewed. Light emitted by other light sources other than glow passes the
illum. About light attenuation, you may find a way writing a cal-file
that increases the source brightness with the length of the ray hitting
it…

However,there is the big question why you want to use Radiance for the
exact opposite of what it is ment for. Can you shed some light on the
motivation, so that we may better understand what you are aiming at?

Cheers, Lars.


#3

Hello Lars,

Thank you very much for your response!

The reason I am asking these questions is because I have an application
which uses POVRAY to render a scene and I want to examine if I can use Radiance
instead without losing however some of the functionality provided by POVRAY.
As far as light sources concerns, in POVRAY someone can specify point light sources
and spotlights without being visible (as “physical” entities) in the rendered image.
Moreover there is the option of selecting light attenuation following the inverse square law
or linear attenuation or no attenuation at all.
So, among the other amazing characteristics offered by Radiance I just wanted to know if the aforementioned functionality can also be implemented so as to not lose any of the options provided by my application already. Do you think this is possible?

If I understand correctly I can simulate invisible point light sources with the illum modifier
but can the same be done for a spotlight? Could you please provide an example of
how can this be done?

Thank you very much for your time!

Best regards


#4

A spotlight in Radiance is just an emitter with an angular cut-off. You can simulate the same by adding a pattern based on the “Rdot” ray variable like so:

void brightfunc cutoff30
2 “if(cos(PI/180*30)-Rdot,1,0)” .
0
0

cutoff30 illum spot30
0
0
3 1000 1000 1000

spot30 ring invis_spot30
0
0
8 0 0 3 0 0 -1 0 .5

This creates an invisible spotlight with a cut-off angle of +/-30° pointing down from a position of (0,0,3) in world coordinates. You can look at rayinit.cal for a list of available variables, and we have a whole book on how to apply them.


#5

Hi Nikos,

from the perspective of a Radiance user, those “features” of Povray are
really just kludges,
to compensate for the fact that it doesn’t do an actual physics
simulation.
Invisible light sources exist in Povray because they are mathematically
and computationally
much simpler and faster than light getting emitted from a extended
surface.
Zero attenuation light sources exist in Povray to create a fake ambient
illumination,
because in the early days it didn’t have any kind of global illumination
functionality.
If you prefer those workarounds to the real solution, why use Radiance
in the first place?

On the other hand, if you actually intend to use Radiance, then you
might want to
completely rethink your approach. Don’t try to replicate the eye-candy
that Povray
is designed to produce, but consider how you would illuminate your
scenes in real life,
with real and visible light sources. Without this conceptual
realignment, you will likely
not reap any benefits from the “amazing characteristics offered by
Radiance”.

As has been mentioned, you might be able to “trick” Radiance into
producing such fake
results, but what would the point of that be?
Would you consider taking a Ferrari to ride around in a bumper cars
rink?

Cheers
-schorsch


#6

Hi Nikos,

just for the sake of completeness, to compensate for the attenuation you
might set up a brightfunc multiplying the emission by the squared
cumulative length of the ray reaching the light-source:

void brightfunc nonsenseFunc
2 ‘T*T’ rayinit.cal
0
0

nonsenseFunc light nonsenseLight
0
0
3 1 1 1

Disclaimer: I did not try it, and the results will not make any sense :smiley:

Cheers, Lars.


#7

Hello,

As I have already said I am currently trying to
improve the rendering engine of my application
using Radiance over POVRAY. During this process
I am investigating whether (ideally!) all the existing
functionality can be ported to the new engine.
One of these features is the matter of point light sources,
spotlights and attenuation that I have already mentioned.
However, it is not mandatory to replicate every single thing.
I am willing to discard some of the existing features
(especially if they do not correspond to real world situations)
for the sake of more accurate results produced by Radiance.
It would just be better if I could also incorporate these “unreal”
scenarios for the sake of completeness.

I will look into the proposed solutions
Thank you all for your responses and guidance!
You have been very helpful!

Best regards