|
|
Hi Lucas,
Thanks for this, I think you've identified where the problem lies!
The lines
MTransPoint (Light->Axis1, Light->Axis1, Trans);
MTransPoint (Light->Axis2, Light->Axis2, Trans);
should deal with the area_light axes, but I think that they should use the
MTransDirection() function as the spotlight direction item does and not the
MTransPoint() function. I think that these functions differ in that
MTransPoint() incorporates a translate where MTransDirection() does not.
To check this I replaced the 'translate <0,2,0>' in my test code with
matrix < 0, 0, 0,
0, 0, 0,
0, 0, 0,
0, 2, 0>
and now the code produces identical, incorrect results whether or not a
transform{} block is used!
I think that this needs to be reported as a Bug in the core v3.6 code. I'm
not sure whether it has been carried over to v3.7 as that's timed out on my
PC.
Well, problem solved I think. Thanks those who have thought about this. Can
anyone think of a work around or is it a show-stopper for what I was trying
to achieve?
Mike Andrews.
Lukas Winter <web### [at] removeitgeloeschtnet> wrote:
> > Can anyone tell me where in the source code a light_source actually
> > applies a transform block? I tried following through from 'parse.cpp'
> > where
[snip]
> Take a look at point.cpp. It seems that Transform_Light_Source() actually
> does nothing special with area lights. Only Translate_Light_Source() does
> not call Transform_Light_Source() (scale and rotate do), but does it
> itself. I don't know how the area light sample points are stored exactly,
> but that may be the cause.
Post a reply to this message
|
|