I am usinge PerspectiveLookAtRect to render on to multiple screens from a common camera point. The issue I am seeing is that when objects span rectangles, the lighting does not match in a terribly obvious way:
Since the cameras are identical in all the cases, shouldn’t the lighting be identical too? Seems like a bug to me, but am I missing something? It looks like it is using two different viewpoints, like the center of the rectangles, although the camera is in the same place.
As you can see in the helper window the camera frustums all look correct. Thanks!
And as a sanity check, when I use a Camera node instead of PLAR, the lighting looks correct. Unfortunately I can’t simply use Camera in my actual application because the projections are not so regularly arranged.
while checking the patch for more sanity, i found that changing the Z scaling of the PLAR affects the shading, if you set it to the same value as X it just works, don’t ask me why, might have something to do with the frustrum:
That does not work either, if I understand it properly. See attached - somehow I think sending the four cameras into the shader does not seem right. Since I have four different cameras, will I need four instances of the shader, or can I spread them in this way?
there you go you had a mess in the variables tLAV, was used to calc normal, so you did’t had an overwritten view on light calculation
also tVW should be calculated inside shader because it’s mul (tV, tW) bad idea to take that from semantics.
That is a MASSIVE improvement, thank you! The shading is consistent across corners of dissimilar sized screens, so that will fix my glaring VR CAVE problem.
However, I still don’t think that lighting is “correct” yet, as you can see with the teapot on the left how the lighting changes on it as that “screen” gets wider and thinner. Since this is a fixed view of a fixed object with fixed lighting, the width of the screen should be having no effect on the lighting, correct?
But this does now make the really noticeable problem go away as I am using fixed screen sizes, so thanks to all once again!
Well since you provide your own VIEW you have to modify code in that case… i do render array in that case.
Also you will have incortect highlights if you move your camerra so you have to remove everything that depends on view angle like reflections