From what I can tell, LuxRender will compute the screen coordinates in lux/cameras/perspective.cpp (via PerspectiveCamera::CreateCamera) circa v1.0RC2. However, if there is a screenwindow parameter in the LXS file (or parameter set), LuxRender will overwrite it's computation with those values. In my case, I'm using LuxBlend for exporting and screenwindow exists, but it's computed differently than LuxRender would compute it. The code I'm referencing for LuxBlend is properties/camera.py.
Example
For a situation where xresolution=640 and yresolution=480, the aspect ratio is clearly 4/3.
LuxBlend computes and exports:
- Code: Select all
screenwindow=[-1 1 -0.75 0.75]
LuxRender computes:
- Code: Select all
screenwindow=[-1.333 1.333 -1 1]
which, from what I can tell, is overwritten by the LuxBlend computation in the lines that follow in perspective.cpp. Please forgive me because I know that LuxRender is not PBRT, but given the large amount of inheritance, I figured there would be some correspondence to Pharr and Humphrey's:
For square images, both x and y lie between [−1, 1] in screen space. Otherwise, the direction in which the image is narrower maps to [−1, 1] and the wider direction maps to a proportionally larger range of screen space values.
This appears to be the case for the the LuxRender computations, but not for the LuxBlend computations. I'm sure that I'm missing something as I'm admittedly ignorant of the bigger picture typically. I've kind of hit a wall on my own and figured I'd solicit some knowledge here
Any thoughts?
