Skip to content

Commit 014f4ca

Browse files
committed
updated documentation
1 parent 9dbe2f1 commit 014f4ca

94 files changed

Lines changed: 6525 additions & 2322 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CHANGELOG.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,36 @@
11
Version History
22
---------------
33

4+
### New Features in Embree 3.0.0
5+
- Switched to a new version of the API which provides improved
6+
flexibility but is not backwards compatible. Please see "Upgrading
7+
from Embree 2 to Embree 3" section of documentation for upgrade
8+
instructions. In particular, we provide a python script that performs
9+
most of the transition work.
10+
- User geometries inside an instanced scene and a top-level scene no
11+
longer need to handle instID field of ray differently. They both
12+
just need to copy the context.instID into the ray.instID field.
13+
- Support for context filter functions that can get assigned to a ray
14+
query.
15+
- User geometries can now invoke filter functions using the
16+
rtcFilterIntersection and rtcFilterOcclusion calls.
17+
- Higher flexibility through specifying build quality per scene and
18+
geometry.
19+
- Geometry normal uses commonly used right hand rule from now on.
20+
- Added self intersection avoidance to ribbon curves and
21+
lines. Applications do not have to implement self intersections workarounds
22+
for these primitive types anymore.
23+
- Added support for 4 billion primitives in a single scene.
24+
- Removed RTC_MAX_USER_VERTEX_BUFFERS and RTC_MAX_INDEX_BUFFERS
25+
limitation.
26+
- Reduced memory consumption by 192 bytes per instance.
27+
- Individual Contributor License Agreement (ICLA) and Corporate
28+
Contributor License Agreement (CCLA) no longer required to
29+
contribute to the project.
30+
31+
### New Features in Embree 2.17.2
32+
- Made BVH build of curve geometry deterministic.
33+
434
### New Features in Embree 2.17.1
535
- Improved performance of occlusion ray packets by up to 50%.
636
- Fixed detection of Clang for CMake 3 under MacOSX

README.md

Lines changed: 1107 additions & 2322 deletions
Large diffs are not rendered by default.

man/man3/RTCHit.3embree3

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
.TH "RTCHit" "3" "" "" "Embree Ray Tracing Kernels 3"
2+
.SS NAME
3+
.IP
4+
.nf
5+
\f[C]
6+
RTCHit\ \-\ single\ hit\ structure
7+
\f[]
8+
.fi
9+
.SS SYNOPSIS
10+
.IP
11+
.nf
12+
\f[C]
13+
#include\ <embree3/rtcore.h>
14+
15+
struct\ RTCHit
16+
{
17+
\ \ float\ Ng_x;\ \ \ \ \ \ \ \ \ \ //\ x\ coordinate\ of\ geometry\ normal
18+
\ \ float\ Ng_y;\ \ \ \ \ \ \ \ \ \ //\ y\ coordinate\ of\ geometry\ normal
19+
\ \ float\ Ng_z;\ \ \ \ \ \ \ \ \ \ //\ z\ coordinate\ of\ geometry\ normal
20+
21+
\ \ float\ u;\ \ \ \ \ \ \ \ \ \ \ \ \ //\ barycentric\ u\ coordinate\ of\ hit
22+
\ \ float\ v;\ \ \ \ \ \ \ \ \ \ \ \ \ //\ barycentric\ v\ coordinate\ of\ hit
23+
24+
\ \ unsigned\ int\ primID;\ //\ geometry\ ID
25+
\ \ unsigned\ int\ geomID;\ //\ primitive\ ID
26+
\ \ unsigned\ int\ instID[RTC_MAX_INSTANCE_LEVEL_COUNT];\ //\ instance\ ID
27+
};
28+
\f[]
29+
.fi
30+
.SS DESCRIPTION
31+
.PP
32+
The \f[C]RTCHit\f[] type defines the type of a ray/primitive
33+
intersection result.
34+
The hit contains the unnormalized geometric normal in object space at
35+
the hit location (\f[C]Ng_x\f[], \f[C]Ng_y\f[], \f[C]Ng_z\f[] members),
36+
the barycentric u/v coordinates of the hit (\f[C]u\f[] and \f[C]v\f[]
37+
members), as well as the primitive ID (\f[C]primID\f[] member), geometry
38+
ID (\f[C]geomID\f[] member), and instance ID (\f[C]instID\f[] member) of
39+
the hit.
40+
The parametric intersection distance is not stored inside the hit, but
41+
stored inside the \f[C]tfar\f[] member of the ray.
42+
.PP
43+
The \f[C]embree3/rtcore_ray.h\f[] header additionally defines the same
44+
hit structure in structure of array (SOA) layout for hit packets of size
45+
4 (\f[C]RTCHit4\f[] type), size 8 (\f[C]RTCHit8\f[] type), and size 16
46+
(\f[C]RTCHit16\f[] type).
47+
The header additionally defines an \f[C]RTCHitNt\f[] template for hit
48+
packets of an arbitrary compile\-time size.
49+
.SS EXIT STATUS
50+
.SS SEE ALSO
51+
.PP
52+
[RTCRay]

man/man3/RTCHitN.3embree3

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
.TH "RTCHitN" "3" "" "" "Embree Ray Tracing Kernels 3"
2+
.SS NAME
3+
.IP
4+
.nf
5+
\f[C]
6+
RTCHitN\ \-\ hit\ packet\ of\ runtime\ size
7+
\f[]
8+
.fi
9+
.SS SYNOPSIS
10+
.IP
11+
.nf
12+
\f[C]
13+
#include\ <embree3/rtcore.h>
14+
15+
struct\ HitN;
16+
17+
float&\ RTCHitN_Ng_x(RTCHitN*\ hit,\ unsigned\ int\ N,\ unsigned\ int\ i);
18+
float&\ RTCHitN_Ng_y(RTCHitN*\ hit,\ unsigned\ int\ N,\ unsigned\ int\ i);
19+
float&\ RTCHitN_Ng_z(RTCHitN*\ hit,\ unsigned\ int\ N,\ unsigned\ int\ i);
20+
21+
float&\ RTCHitN_u(RTCHitN*\ hit,\ unsigned\ int\ N,\ unsigned\ int\ i);
22+
float&\ RTCHitN_v(RTCHitN*\ hit,\ unsigned\ int\ N,\ unsigned\ int\ i);
23+
24+
unsigned&\ RTCHitN_primID(RTCHitN*\ hit,\ unsigned\ int\ N,\ unsigned\ int\ i);
25+
unsigned&\ RTCHitN_geomID(RTCHitN*\ hit,\ unsigned\ int\ N,\ unsigned\ int\ i);
26+
unsigned&\ RTCHitN_instID(RTCHitN*\ hit,\ unsigned\ int\ N,\ unsigned\ int\ i,\ unsigned\ int\ l);
27+
\f[]
28+
.fi
29+
.SS DESCRIPTION
30+
.PP
31+
When the hit packet size is not known at compile time (e.g.
32+
when Embree returns a hit packet in the \f[C]RTCFilterFuncN\f[] callback
33+
function), Embree uses the \f[C]RTCHitN\f[] type for hit packets.
34+
These hit packets can only have sizes of 1, 4, 8, or 16.
35+
No other packet size will be used.
36+
.PP
37+
You can either implement different special code paths for each of these
38+
possible packet sizes and cast the hit to the appropriate hit packet
39+
type, or implement one general code path that uses the
40+
\f[C]RTCHitN_XXX\f[] helper functions to access hit packet components.
41+
.PP
42+
These helper functions get a pointer to the hit packet (\f[C]hit\f[]
43+
argument), the packet size (\f[C]N\f[] argument), and returns a
44+
reference to a component (e.g.
45+
x component of \f[C]Ng\f[]) of the the i\-th hit of the packet
46+
(\f[C]i\f[] argument).
47+
.SS EXIT STATUS
48+
.SS SEE ALSO
49+
.PP
50+
[RTCRayN]

man/man3/RTCRay.3embree3

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
.TH "RTCRay" "3" "" "" "Embree Ray Tracing Kernels 3"
2+
.SS NAME
3+
.IP
4+
.nf
5+
\f[C]
6+
RTCRay\ \-\ single\ ray\ structure
7+
\f[]
8+
.fi
9+
.SS SYNOPSIS
10+
.IP
11+
.nf
12+
\f[C]
13+
#include\ <embree3/rtcore_ray.h>
14+
15+
struct\ RTC_ALIGN(16)\ RTCRay
16+
{
17+
\ \ float\ org_x;\ \ \ \ \ \ \ \ //\ x\ coordinate\ of\ ray\ origin
18+
\ \ float\ org_y;\ \ \ \ \ \ \ \ //\ y\ coordinate\ of\ ray\ origin
19+
\ \ float\ org_z;\ \ \ \ \ \ \ \ //\ z\ coordinate\ of\ ray\ origin
20+
\ \ float\ tnear;\ \ \ \ \ \ \ \ //\ start\ of\ ray\ segment
21+
22+
\ \ float\ dir_x;\ \ \ \ \ \ \ \ //\ x\ coordinate\ of\ ray\ direction
23+
\ \ float\ dir_y;\ \ \ \ \ \ \ \ //\ y\ coordinate\ of\ ray\ direction
24+
\ \ float\ dir_z;\ \ \ \ \ \ \ \ //\ z\ coordinate\ of\ ray\ direction
25+
\ \ float\ time;\ \ \ \ \ \ \ \ \ //\ time\ of\ this\ ray\ for\ motion\ blur
26+
27+
\ \ float\ tfar;\ \ \ \ \ \ \ \ \ //\ end\ of\ ray\ segment\ (set\ to\ hit\ distance)
28+
\ \ unsigned\ int\ mask;\ \ //\ ray\ mask
29+
\ \ unsigned\ int\ id;\ \ \ \ //\ ray\ ID
30+
\ \ unsigned\ int\ flags;\ //\ ray\ flags
31+
};
32+
\f[]
33+
.fi
34+
.SS DESCRIPTION
35+
.PP
36+
The \f[C]RTCRay\f[] structure defines the ray layout for a single ray.
37+
The ray contains the origin (\f[C]org_x\f[], \f[C]org_y\f[],
38+
\f[C]org_z\f[] members), direction vector (\f[C]dir_x\f[],
39+
\f[C]dir_y\f[], \f[C]dir_z\f[] members), and ray segment (\f[C]tnear\f[]
40+
and \f[C]tfar\f[] members).
41+
The ray direction does not have to be normalized, and only the parameter
42+
range specified by the \f[C]tnear\f[]/\f[C]tfar\f[] interval is
43+
considered valid.
44+
.PP
45+
The ray segment must be in the range [0, ∞], thus ranges that start
46+
behind the ray origin are not allowed, but ranges can reach to infinity.
47+
For rays inside a ray stream, \f[C]tfar\f[] < \f[C]tnear\f[] identifies
48+
an inactive ray.
49+
.PP
50+
The ray further contains a motion blur time in the range [0, 1]
51+
(\f[C]time\f[] member), a ray mask (\f[C]mask\f[] member), a ray ID
52+
(\f[C]id\f[] member), and ray flags (\f[C]flags\f[] member).
53+
The ray mask can be used to mask out some geometries for some rays (see
54+
\f[C]rtcSetGeometryMask\f[] for more details).
55+
The ray ID can be used to identify a ray inside a callback function,
56+
even if the order of rays inside a ray packet or stream has changed.
57+
The ray flags are reserved.
58+
.PP
59+
The \f[C]embree3/rtcore_ray.h\f[] header additionally defines the same
60+
ray structure in structure of array (SOA) layout for API functions
61+
accepting ray packets of size 4 (\f[C]RTCRay4\f[] type), size 8
62+
(\f[C]RTCRay8\f[] type), and size 16 (\f[C]RTCRay16\f[] type).
63+
The header additionally defines an \f[C]RTCRayNt\f[] template for ray
64+
packets of an arbitrary compile\-time size.
65+
.SS EXIT STATUS
66+
.SS SEE ALSO
67+
.PP
68+
[RTCHit]

man/man3/RTCRayHit.3embree3

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
.TH "RTCRay" "3" "" "" "Embree Ray Tracing Kernels 3"
2+
.SS NAME
3+
.IP
4+
.nf
5+
\f[C]
6+
RTCRayHit\ \-\ combined\ single\ ray/hit\ structure
7+
\f[]
8+
.fi
9+
.SS SYNOPSIS
10+
.IP
11+
.nf
12+
\f[C]
13+
#include\ <embree3/rtcore_ray.h>
14+
15+
struct\ RTCORE_ALIGN(16)\ RTCRayHit
16+
{
17+
\ \ struct\ RTCRay\ ray;
18+
\ \ struct\ RTCHit\ hit;
19+
};
20+
\f[]
21+
.fi
22+
.SS DESCRIPTION
23+
.PP
24+
The \f[C]RTCRayHit\f[] structure is used as input for the
25+
\f[C]rtcIntersect\f[]\-type functions and stores the ray to intersect
26+
and some hit fields that hold the intersection result afterwards.
27+
.PP
28+
The \f[C]embree3/rtcore_ray.h\f[] header additionally defines the same
29+
ray/hit structure in structure of array (SOA) layout for API functions
30+
accepting ray packets of size 4 (\f[C]RTCRayHit4\f[] type), size 8
31+
(\f[C]RTCRayHit8\f[] type), and size 16 (\f[C]RTCRayHit16\f[] type).
32+
The header additionally defines an \f[C]RTCRayHitNt\f[] template to
33+
generate ray/hit packets of an arbitrary compile\-time size.
34+
.SS EXIT STATUS
35+
.SS SEE ALSO
36+
.PP
37+
[RTCRay], [RTCHit]

man/man3/RTCRayHitN.3embree3

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
.TH "RTCRayHitN" "3" "" "" "Embree Ray Tracing Kernels 3"
2+
.SS NAME
3+
.IP
4+
.nf
5+
\f[C]
6+
RTCRayHitN\ \-\ combined\ ray/hit\ packet\ of\ runtime\ size
7+
\f[]
8+
.fi
9+
.SS SYNOPSIS
10+
.IP
11+
.nf
12+
\f[C]
13+
#include\ <embree3/rtcore_ray.h>
14+
15+
struct\ RTCRayHitN;
16+
17+
struct\ RTCRayN*\ RTCRayHitN_RayN(struct\ RTCRayHitN*\ rayhit,\ unsigned\ int\ N);
18+
struct\ RTCHitN*\ RTCRayHitN_HitN(struct\ RTCRayHitN*\ rayhit,\ unsigned\ int\ N);
19+
\f[]
20+
.fi
21+
.SS DESCRIPTION
22+
.PP
23+
When the packet size of a ray/hit structure is not known at compile time
24+
(e.g.
25+
when Embree returns a ray/hit packet in the
26+
\f[C]RTCIntersectFunctionN\f[] callback function), Embree uses the
27+
\f[C]RTCRayHitN\f[] type for ray packets.
28+
These ray/hit packets can only have sizes of 1, 4, 8, or 16.
29+
No other packet size will be used.
30+
.PP
31+
You can either implement different special code paths for each of these
32+
possible packet sizes and cast the ray/hit to the appropriate ray/hit
33+
packet type, or extract the \f[C]RTCRayN\f[] and \f[C]RTCHitN\f[]
34+
components using the \f[C]rtcGetRayN\f[] and \f[C]rtcGetHitN\f[] helper
35+
functions and use the \f[C]RTCRayN_XXX\f[] and \f[C]RTCHitN_XXX\f[]
36+
functions to access the ray and hit parts of the structure.
37+
.SS EXIT STATUS
38+
.SS SEE ALSO
39+
.PP
40+
[RTCHitN]

man/man3/RTCRayN.3embree3

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
.TH "RTCRayN" "3" "" "" "Embree Ray Tracing Kernels 3"
2+
.SS NAME
3+
.IP
4+
.nf
5+
\f[C]
6+
RTCRayN\ \-\ ray\ packet\ of\ runtime\ size
7+
\f[]
8+
.fi
9+
.SS SYNOPSIS
10+
.IP
11+
.nf
12+
\f[C]
13+
#include\ <embree3/rtcore_ray.h>
14+
15+
struct\ RTCRayN;
16+
17+
float&\ RTCRayN_org_x(RTCRayN*\ ray,\ unsigned\ int\ N,\ unsigned\ int\ i);
18+
float&\ RTCRayN_org_y(RTCRayN*\ ray,\ unsigned\ int\ N,\ unsigned\ int\ i);
19+
float&\ RTCRayN_org_z(RTCRayN*\ ray,\ unsigned\ int\ N,\ unsigned\ int\ i);
20+
float&\ RTCRayN_tnear(RTCRayN*\ ray,\ unsigned\ int\ N,\ unsigned\ int\ i);
21+
22+
float&\ RTCRayN_dir_x(RTCRayN*\ ray,\ unsigned\ int\ N,\ unsigned\ int\ i);
23+
float&\ RTCRayN_dir_y(RTCRayN*\ ray,\ unsigned\ int\ N,\ unsigned\ int\ i);
24+
float&\ RTCRayN_dir_z(RTCRayN*\ ray,\ unsigned\ int\ N,\ unsigned\ int\ i);
25+
float&\ RTCRayN_time\ (RTCRayN*\ ray,\ unsigned\ int\ N,\ unsigned\ int\ i);
26+
27+
float&\ \ \ \ RTCRayN_tfar\ (RTCRayN*\ ray,\ unsigned\ int\ N,\ unsigned\ int\ i);
28+
unsigned&\ RTCRayN_mask\ (RTCRayN*\ ray,\ unsigned\ int\ N,\ unsigned\ int\ i);
29+
unsigned&\ RTCRayN_id\ \ \ (RTCRayN*\ ray,\ unsigned\ int\ N,\ unsigned\ int\ i);
30+
unsigned&\ RTCRayN_flags(RTCRayN*\ ray,\ unsigned\ int\ N,\ unsigned\ int\ i);
31+
\f[]
32+
.fi
33+
.SS DESCRIPTION
34+
.PP
35+
When the ray packet size is not known at compile time (e.g.
36+
when Embree returns a ray packet in the \f[C]RTCFilterFuncN\f[] callback
37+
function), Embree uses the \f[C]RTCRayN\f[] type for ray packets.
38+
These ray packets can only have sizes of 1, 4, 8, or 16.
39+
No other packet size will be used.
40+
.PP
41+
You can either implement different special code paths for each of these
42+
possible packet sizes and cast the ray to the appropriate ray packet
43+
type, or implement one general code path that uses the
44+
\f[C]RTCRayN_XXX\f[] helper functions to access the ray packet
45+
components.
46+
.PP
47+
These helper functions get a pointer to the ray packet (\f[C]ray\f[]
48+
argument), the packet size (\f[C]N\f[] argument), and returns a
49+
reference to a component (e.g.
50+
x\-component of origin) of the the i\-th ray of the packet (\f[C]i\f[]
51+
argument).
52+
.SS EXIT STATUS
53+
.SS SEE ALSO
54+
.PP
55+
[RTCHitN]

0 commit comments

Comments
 (0)