Raster, pupil and camera coordinates in cycles

Hey,

according to Axis Systems used in Blender and Cycles - #14 by Subrahmanya
cycles uses a “left-handed coordinate system looking down the +Z axis (when both have +X to the right and +Y upwards)”. Can someone verify this again?

What is the system for the raster and pupil coordinates here:
blender/intern/cycles/kernel/camera/camera.h:L44
()

Is x to the right and y down for the raster and pupil coordinates (centered for the pupil)? I cannot figure out if the rastertocamera transformation involves the corresponding vertical axis flip. Another question that I have is: are the raster positions indexed from zero?

Thx for any info or pointers to the right info in advance.

Best,

Thomas

That’s correct.

Y is up also for raster, there is no vertical flip.

“Pupil coordinates” appears to be a term from VR/AR. In that context I only saw it being used to refer to a position, not a coordinate space.

The raster coordinate is 0,0 at the bottom left of the viewplane,

1 Like

Thx that clarifies a lot.

What i meant with pupil coordinate is actually the lens_uv. The position in the aperture during the ray sampling for a raster position (x, y) and an aperture.
My question here is, if the same convention with y up and x right is used here as well.

Thank you again, that helped a lot.

The aperture computation is done in camera space, and lens_uv is a position in camera space. In this space X is right and Y is up.

Ok, great.

Thank you for the explanation.