Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] I need help! => Topic started by: genesys on 2021-08-12, 14:04:35

Title: Exact sample location within each rendered pixel
Post by: genesys on 2021-08-12, 14:04:35
Let's say we render a 4x4 pixel image for a camera with 90° vertical and horizontal FOV and disable antialiasing using

bool shading.enableAa = false

Are the sample locations for the 16 rays generated guaranteed to be in the pixel centers and do the outer borders of the outer pixels align exactly with the camera frustum?

if the sample locations are jittered or offset instead, how can I get the exact sample location for each pixel?
Title: Re: Exact sample location within each rendered pixel
Post by: maru on 2021-08-13, 09:14:10
Hi, great questions! Out of curiosity - why do you need to know this? :)

Here is a reply from our smart people department:

Quote
When AA is disabled, the primary rays are always shot through the exact pixel center in all the passes (so they should hit exactly the same point on some geometry). However any further bounces (diffuse, reflections, ...) will still be random.
Also, when doing a normal render (meaning non-DR, non-resume), the first pass is always done without AA, shooting the rays through pixel centers.
Title: Re: Exact sample location within each rendered pixel
Post by: genesys on 2021-08-13, 11:23:55
perfect, thank you!

to clarify:
Quote
However any further bounces (diffuse, reflections, ...) will still be random.
what exactly does that mean for a perfectly reflective surface? will the origin of the reflection ray be exactly the intersection of the primary ray (which originates from the pixel center), or will the origin of the reflection ray be offset to some other location within the area of the rendered pixel?


Out of curiosity - why do you need to know this? :)

We're using corona to generate data for machine learning and need to reconstruct the ray that was used for each rendered pixel, so knowing the exact sample location is important to not introduce small errors.