honeybee_plus.radiance.parameters.rtrace module¶
Radiance raytracing Parameters.
-
class
honeybee_plus.radiance.parameters.rtrace.
HighQuality
[source]¶ Bases:
honeybee_plus.radiance.parameters.rtrace.RtraceParameters
High quality radiance parameters.
-
class
honeybee_plus.radiance.parameters.rtrace.
LowQuality
[source]¶ Bases:
honeybee_plus.radiance.parameters.rtrace.RtraceParameters
Radiance parmaters for a quick analysis.
-
class
honeybee_plus.radiance.parameters.rtrace.
MediumQuality
[source]¶ Bases:
honeybee_plus.radiance.parameters.rtrace.RtraceParameters
Medium quality Radiance parmaters.
-
class
honeybee_plus.radiance.parameters.rtrace.
RtraceParameters
(*args, **kwargs)[source]¶ Bases:
honeybee_plus.radiance.parameters._advancedparametersbase.AdvancedRadianceParameters
Radiance Parameters for grid based analysis.
For the full list of attributes try self.keys
-
quality
¶ An integer between 0-2 (0:low, 1: medium or 2: high quality)
Usage:
rp = RtraceParameters(0) print(rp.to_rad_string())
- > -aa 0.25 -ab 2 -ad 512 -dc 0.25 -st 0.85 -lw 0.05 -as 128 -ar 16 -lr 4
-dt 0.5 -dr 0 -ds 0.5 -dp 64
rp = RtraceParameters(1) print(rp.to_rad_string())
- > -aa 0.2 -ab 3 -ad 2048 -dc 0.5 -st 0.5 -lw 0.01 -as 2048 -ar 64 -lr 6
-dt 0.25 -dr 1 -ds 0.25 -dp 256
rp = RtraceParameters(2) print(rp.to_rad_string()) > -aa 0.1 -ab 6 -ad 4096 -dc 0.75 -st 0.15 -lw 0.005 -as 4096 -ar 128
-lr 8 -dt 0.15 -dr 3 -ds 0.05 -dp 512
rp.ab = 5 rp.u = True print(rp.to_rad_string())
- > -aa 0.1 -ab 5 -dj 0.7 -ad 4096 -dc 0.75 -st 0.15 -lw 0.005 -as 4096
-ar 128 -lr 8 -dt 0.15 -dr 3 -ds 0.05 -dp 512 -u
-
ambient_accuracy
¶ Number of ambient accuracy. This value will approximately equal the error from indirect illuminance interpolation. A value of zero implies no interpolation.
-
ambient_bounces
¶ Number of ambient bounces. This is the maximum number of diffuse bounces computed by the indirect calculation. A value of zero implies no indirect calculation.
-
ambient_divisions
¶ Number of ambient divisions. The error in the Monte Carlo calculation of indirect illuminance will be inversely proportional to the square root of this number. A value of zero implies no indirect calculation.
-
ambient_resolution
¶ Number of ambient resolution. This number will determine the maximum density of ambient values used in interpolation. Error will start to increase on surfaces spaced closer than the scene size divided by the ambient resolution. The maximum ambient value density is the scene size times the ambient accuracy.
-
ambient_supersamples
¶ Number of ambient super-samples. Super-samples are applied only to the ambient divisions which show a significant change.
-
direct_certainty
¶ -dc frac
Set the direct certainty to frac. A value of one guarantees that the absolute accuracy of the direct calculation will be equal to or better than that given in the -dt specification. A value of zero only insures that all shadow lines resulting in a contrast change greater than the -dt specification will be calculated.
-
direct_jitter
¶ -dj frac Set the direct jittering to frac. A value of zero samples each source at specific sample points (see the -ds option below), giving a smoother but somewhat less accurate rendering. A positive value causes rays to be distributed over each source sample according to its size, resulting in more accurate penumbras. This option should never be greater than 1, and may even cause problems (such as speckle)when the value is smaller. A warning about aiming failure will issued if frac is too large. It is usually wise to turn off image sampling when using direct jitter by setting -ps to 1.
-
direct_presamp_density
¶ -dp D
Set the secondary source presampling density to D. This is the number of samples per steradian that will be used to determine ahead of time whether or not it is worth following shadow rays through all the reflections and/or transmissions associated with a secondary source path. A value of 0 means that the full secondary source path will always be tested for shadows if it is tested at all.
-
direct_sampling
¶ -ds frac Set the direct sampling ratio to frac. A light source will be subdivided until the width of each sample area divided by the distance to the illuminated point is below this ratio. This assures accuracy in regions close to large area sources at a slight computational expense. A value of zero turns source subdivision off, sending at most one shadow ray to each light source.
-
direct_sec_relays
¶ -dr N
Set the number of relays for secondary sources to N. A value of 0 means that secondary sources will be ignored. A value of 1 means that sources will be made into first generation secondary sources; a value of 2 means that first generation secondary sources will also be made into second generation secondary sources, and so on.
-
direct_threshold
¶ -dt frac
Set the direct threshold to frac. Shadow testing will stop when the potential contribution of at least the next and at most all remaining light source samples is less than this fraction of the accumulated value. The remaining light source contributions are approximated statistically. A value of zero means that all light source samples will be tested for shadow.
-
freeze
()¶
-
classmethod
from_json
(rec_json)[source]¶ Create radiance parameters from json. { “gridbased_parameters”: string // A standard radiance parameter string
(e.g. -ab 5 -aa 0.05 -ar 128)
}
-
get_parameter_default_value_based_on_quality
(parameter)[source]¶ Get parameter value based on quality.
You can change this value by using self.parameter = value (e.g. self.ab=5)
- Parameters
parameter – Radiance parameter as an string (e.g “ab”)
Usage:
rp = LowQuality() print rp.getParameterValue(“ab”) >> 2
-
i_irradiance_calc
¶ -i
Boolean switch to compute irradiance rather than radiance values. This only affects the final result, substituting a Lambertian surface and multiplying the radiance by pi. Glass and other transparent surfaces are ignored during this stage. Light sources still appear with their original radiance values, though the -dv option (below) may be used to override this. This option is especially useful in conjunction with ximage(1) for computing illuminance at scene points
-
irradiance_calc
¶ -I
Boolean switch to compute irradiance rather than radiance, with the input origin and direction interpreted instead as measurement point and orientation. -h Boolean switch for information header on output. The radiance default value for this option is False.
-
property
isGridBasedRadianceParameters
¶ Return True to indicate this object is a RadianceParameters.
-
limit_reflections
¶ -lr N Limit reflections to a maximum of N, if N is a positive integer. If N is zero, then Russian roulette is used for ray termination, and the -lw setting (below) must be positive. If N is a negative integer, then this sets the upper limit of reflections past which Russian roulette will be used. In scenes with dielectrics and total internal reflection, a setting of 0 (no limit) may cause a stack overflow.
-
limit_weight
¶ -lw frac
Limit the weight of each ray to a minimum of frac. During ray-tracing, a record is kept of the estimated contribution (weight) a ray would have in the image. If this weight is less than the specified minimum and the -lr setting (above) is positive, the ray is not traced. Otherwise, Russian roulette is used to continue rays with a probability equal to the ray weight divided by the given frac.
-
output_data_format
¶ -f[io]
Format input according to the character i and output according to the character o. Rtrace understands the following input and output formats: ‘a’ for ascii, ‘f’ for single-precision floating point, and ‘d’ for double-precision floating point. In addition to these three choices, the character ‘c’ may be used to denote 4-byte floating point (Radiance) color format for the output of values only (-ov option, below). If the output character is missing, the input format is used.
-
output_spec
¶ -o[spec]
Produce output fields according to spec. Characters are interpreted as follows: o - origin (input) d - direction (normalized) v - value (radiance) V - contribution (radiance) w - weight W - color coefficient l - effective length of ray L - first intersection distance c - local (u,v) coordinates p - point of intersection n - normal at intersection (perturbed) N - normal at intersection (unperturbed) s - surface name m - modifier name M - material name ~ tilde (end of trace marker)
If the letter t appears in spec, then the fields following will be printed for every ray traced, not just the final result. If the capital letter T is given instead of t, then all rays will be reported, including shadow testing rays to light sources. Spawned rays are indented one tab for each level. The tilde marker (~) is a handy way of differentiating the final ray value from daughter values in a traced ray tree, and usually appears right before the t or T output flags. E.g., -ov~TmW will emit a tilde followed by a tab at the end of each trace, which can be easily distinguished even in binary output.
-
property
quality
¶ medium or 2: high quality)
- Type
An integer between 0-2 (0
- Type
low, 1
-
specular_sampling
¶ -ss samp
Set the specular sampling to samp. For values less than 1, this is the degree to which the highlights are sampled for rough specular materials. A value greater than one causes multiple ray samples to be sent to reduce noise at a commmesurate cost. A value of zero means that no jittering will take place, and all reflections will appear sharp even when they should be diffuse. This may be desirable when used in combination with image sampling to obtain faster renderings.
-
specular_threshold
¶ -st frac
Set the specular sampling threshold to frac. This is the minimum fraction of reflection or transmission, under which no specular sampling is performed. A value of zero means that highlights will always be sampled by tracing reflected or transmitted rays. A value of one means that specular sampling is never used. Highlights from light sources will always be correct, but reflections from other surfaces will be approximated using an ambient value. A sampling threshold between zero and one offers a compromise between image accuracy and rendering time.
-
to_json
()[source]¶ Write radiance grid_based parameters to json. { “gridbased_parameters”: string // A standard radiance parameter string
(e.g. -ab 5 -aa 0.05 -ar 128)
}
-
uncor_rand_samp
¶ -u
Boolean switch to control uncorrelated random sampling. When “off”, a low-discrepancy sequence is used, which reduces variance but can result in a brushed appearance in specular highlights. When “on”, pure Monte Carlo sampling is used in all calculations.
-
unfreeze
()¶
-