#####################################################################
# This is an example of a HQR job file. The syntax is variable=value.
# Comments are indicated by '#'.                                     
# All necessary variables are indicated for information -- some being
# commented -- as well as their default value if not mandatory.      
#####################################################################

########################- Job section -#######################

## JOB_TYPE
## -- The particular job to do. This may be STILL_IMAGE, or SLF.
##    Depending on its value, exactly one of the following parameter
##    sections will be considered.
## -- Mandatory.
## -- Default value:
##      JOB_TYPE = STILL_IMAGE

JOB_TYPE = STILL_IMAGE

#######################- Data Manager Options -######################

## SCENE_FILE_NAME 
## -- Scene file name 
## -- Mandatory 

SCENE_FILE_NAME = /net/artis-home/local_home/projets/artis/csoler/SRC/REALREFLECT/doc/manual/userManual/CornellBox.x3d

## GLOBAL_INTERSECTOR_TYPE
## -- Global acceleration structure used for intersections. May be set to OSAH_KDTREE 
##    (c.f PhD Thesis of V.Havran) or OBJECT_CLUSTERS. The former is 1 to 3 times faster, but
##    needs significant time of pre-computation. The later is fast to build but is not always optimal.
## -- Optional
## -- Default value:
##      GLOBAL_INTERSECTOR_TYPE = OBJECT_CLUSTERS

GLOBAL_INTERSECTOR_TYPE = OSAH_KDTREE

## Clusterizer options.
## -- Optional
## -- Default values:
##      PRE_CLUSTERIZE     = YES
##      OCTREE_RESTRICTION = YES
##      LIMIT_CHILDREN     = YES

PRE_CLUSTERIZE     = YES
OCTREE_RESTRICTION = YES
LIMIT_CHILDREN     = YES

#######################- Photon tracing Options -######################

## NB_PHOTONS_TO_SEND
## -- Total number of photons that will be sent into the scene. This is not
##    the number of photons used in the reconstruction since some of them are
##    absorbed and some of them bounce many times.
## -- Optional
## -- Default = 100,000

NB_PHOTONS_TO_SEND = 20000

## MAX_PHOTON_BOUNCES
## -- Number of bounces for photons traced in the scene. 0 bounces corresponds
##    to direct lighting.
## -- Optional
## -- Default = 10

MAX_PHOTON_BOUNCES = 5

#######################- RayTracer Options -######################

## RECONSTRUCTION_RADIUS
## -- Initial radius of the sphere into which nearest photons are collected
##    This value is expressed in proportion to the size of the scene.
## -- Optional
## -- Default = 0.05

RECONSTRUCTION_RADIUS = 0.05

## MAX_SPECULAR_DEPTH
## -- Maximum depth of rays when bouncing on specular surfaces.
## -- Optional
## -- Default = 5

MAX_SPECULAR_DEPTH = 5

## INDIRECT_RECONSTRUCTION
## -- Indicates whether to use indirect reconstruction or not. If not,
##    the radiance is directly approximated using density estimation at any
##    point. If not, the reconstructed radiance is the sum of three terms: 
##    One from caustics (check INCORPORATE_CAUSTICS), one from indirect sampled diffuse
##    radiance (check INCORPORATE_DIFFUSE), and one from direct illumination (check INCORPORATE_DIRECT)
##     When INDIRECT_RECONSTRUCTION=NO, the other three parameters are meaningless.
##    N_THETA_INDIRECT * N_PHI_INDIRECT indicates the number of secondary rays traced from a point
##    to compute the indirect component. The cost of the reconstruction is roughly proportional to this product.
##     The SAMPLES_PER_STERADIAN and MAX_NB_SAMPLES params indicate the number of samples to be
##    used on sources viewed from a given point.
##     The integration method is the technique used for integrating 
##    indirect light. Values may be JITTERED_HEMISPHERE, METROPOLIS, STRATIFIED_BRDF or DENSITY_ESTIMATION.
##     The SORT_SOURCES variable commands the sorting of sources for direct lighting from the information of
##    source origin contained in each photon. This option needs that the number of photons sent is > 0.
##     The USE_PERCENTAGE_OCCLUSION variable may be used to replace the direct lighting contribution
##    of light sources by the percentage of occlusion. This may be used for producing reference
##    solutions for soft shadow algorithms. When multiple light sources are present in the scene,
##    these values are summed.
##     The G.Ward Irradiance Gradients method can be used with a given error threshold using the 
##    two variables USE_IRRADIANCE_GRADIENTS and IRRADIANCE_GRADIENTS_THRESHOLD.
## -- Optional
## -- Default values:
##      INDIRECT_RECONSTRUCTION  = YES
##
##      INCORPORATE_CAUSTICS     = YES
##      INCORPORATE_DIFFUSE      = YES
##      N_THETA_INDIRECT         = 10
##      N_PHI_INDIRECT           = 20
##      PRECOMPUTE_RADIANCE      = YES
##      PRECOMPUTED_RADIANCE_NB_PHOTONS = 20
##      INTEGRATION_METHOD       = JITTERED_HEMISPHERE
##
##      INCORPORATE_DIRECT       = YES
##      SAMPLES_PER_STERADIAN    = 5000
##      MAX_NB_SAMPLES           = 255
##      SORT_SOURCES             = NO
##      USE_PERCENTAGE_OCCLUSION = NO
##      USE_IRRADIANCE_GRADIENTS = NO
##      IRRADIANCE_GRADIENTS_THRESHOLD = 0.01

INDIRECT_RECONSTRUCTION = YES

INCORPORATE_CAUSTICS    = NO
INCORPORATE_DIFFUSE     = YES
N_THETA_INDIRECT        = 7
N_PHI_INDIRECT          = 13
INTEGRATION_METHOD      = STRATIFIED_BRDF
PRECOMPUTE_RADIANCE     = YES

INCORPORATE_DIRECT       = YES
SAMPLES_PER_STERADIAN    = 5000
MAX_NB_SAMPLES           = 255
SORT_SOURCES             = NO
USE_PERCENTAGE_OCCLUSION = NO
USE_IRRADIANCE_GRADIENTS = NO
IRRADIANCE_GRADIENTS_THRESHOLD = 0.1

## NUMBER_OF_CONCURRENT_JOBS
## -- Number of concurrent process that will be used for the ray-tracing phase. 
##    For optimal efficiency this should be set to the number of processors in 
##    machine being used.
## -- Optional
## -- Default = 1

NUMBER_OF_CONCURRENT_JOBS = 2

###############- Image Options - Optional section -###########

## Viewing parameters
##
## -- Optional.
## -- Default values:
##      VIEW_DIRECTION      = 0 0 -1   // unit vector
##      UP_DIRECTION        = 1 0 0    // unit vector
##      VIEW_POINT          = 0 0 2    // 3D point
##      IMAGE_WIDTH         = 320      // resulting image width in pixels
##      IMAGE_HEIGHT        = 200      // resulting image height in pixels
##      IMAGE_FIELD_OF_VIEW = 40       // field of view in degres.

IMAGE_FIELD_OF_VIEW = 40
VIEW_DIRECTION      = -1.40256e-11 3.21764e-09 1
UP_DIRECTION        = -1.3661e-18 1 -3.21764e-09
VIEW_POINT          = 269.377 272.532 -829.814
IMAGE_WIDTH         = 690
IMAGE_HEIGHT        = 516

## Anti-aliasing parameters
##
##  To be used to sub-sample pixels which have the best chances of being affected y aliasing.
## The error mesure is fixed for now, and based on the relative error between neighbors of a pixels.
## The bigger this error, the better are the chances of recomputing this pixel. Because pixels are
## treated by priority of largest error, the threshold given by the user expresses in terms of
## fixed cost as compared to the total computation cost without AA. The setting 
## ANTI_ALIASING_ADDITIONAL_COST = 100 (%) thus doubles computation time.
##
## -- Optional.
## -- Default values:
##    ANTI_ALIASING_METHOD = NONE
##    ANTI_ALIASING_ADDITIONAL_COST = 20

ANTI_ALIASING_METHOD = NONE
ANTI_ALIASING_ADDITIONAL_COST = 20
## SUB-IMAGE PARAMETERS
## -- Optional
## -- Default values:
##    Y_START = 0
##    Y_END = <IMAGE_HEIGHT> - 1

Y_START = 0
Y_END = 515

#######################- Output Options -######################

## OUT_EXR_FILE_NAME
## -- name of the image file that will be produced.
## -- mandatory for now.

OUT_EXR_FILE_NAME = out.27298.exr

## RENORMALIZE
## -- Try to put the output values inside the range [1e-6,1e+4] supported by OpenEXR
##    using an affine transform.
## -- Optional
## -- Default = AUTO

RENORMALIZE = NO