1rtcSetGeometryMaxRadiusScaElmeb(r3e)e Ray Tracing KernretlcsSe4tGeometryMaxRadiusScale(3)
2
3
4
5 NAME
6 rtcSetGeometryMaxRadiusScale - assigns a maximal curve radius scale factor for min-width feature
7
8 SYNOPSIS
9 #include <embree4/rtcore.h>
10
11 void rtcSetGeometryMaxRadiusScale(RTCGeometry geometry, float maxRadiusScale);
12
13 DESCRIPTION
14 The rtcSetMaxGeometryScale function specifies a maximal scaling factor
15 for curve radii used by the min-width feature.
16
17 The min-width feature can increase the radius of curves and points, in
18 order to reduce aliasing and improve render times. The feature is dis‐
19 abled by default and has to get enabled using the EMBREE_MIN_WIDTH
20 cmake option.
21
22 To use the feature, one has to specify a maximal curve radius scaling
23 factor using the [rtcSetGeometryMaxRadiusScale] function. This factor
24 should be a small number (e.g. 4) as the constructed BVH bounds get in‐
25 creased in order to bound the curve in the worst case of maximal radii.
26
27 One also has to set the minWidthDistanceFactor in the RTCRayQueryCon‐
28 text when tracing a ray. This factor controls the target radius size
29 of a curve or point at some distance away of the ray origin.
30
31 For each control point p with radius r of a curve or point primitive,
32 the primitive intersectors first calculate a target radius r’ as:
33
34 r' = length(p-ray_org) * minWidthDistanceFactor
35
36 Typically the minWidthDistanceFactor is set by the application such
37 that the target radius projects to the width of half a pixel (thus
38 primitive diameter is pixel sized).
39
40 The target radius r’ is then clamped against the minimal bound r and
41 maximal bound maxRadiusScale*r to obtain the final radius r’’:
42
43 r'' = max(r, min(r', maxRadiusScale*r))
44
45 Thus curves or points close to the camera are rendered with a normal
46 radii r, and curves or points far from the camera are not enlarged too
47 much, as this would be very expensive to render.
48
49 When rtcSetGeometryMaxRadiusScale function is not invoked for a curve
50 or point geometry (or if the maximal scaling factor is set to 1.0),
51 then the curve or point geometry renders normally, with radii not modi‐
52 fied by the min-width feature.
53
54 EXIT STATUS
55 On failure an error code is set that can be queried using rtcGetDe‐
56 viceError.
57
58 SEE ALSO
59 [rtcInitRayQueryContext]
60
61
62
63 rtcSetGeometryMaxRadiusScale(3)