Nvidia OptiX (OptiX Application Acceleration Engine) is a
ray tracing API
An application programming interface (API) is a way for two or more computer programs to communicate with each other. It is a type of software Interface (computing), interface, offering a service to other pieces of software. A document or standa ...
that was first developed around 2009. The computations are offloaded to the
GPU
A graphics processing unit (GPU) is a specialized electronic circuit designed to manipulate and alter memory to accelerate the creation of images in a frame buffer intended for output to a display device. GPUs are used in embedded systems, mobil ...
s through either the low-level or the high-level
API
An application programming interface (API) is a way for two or more computer programs to communicate with each other. It is a type of software Interface (computing), interface, offering a service to other pieces of software. A document or standa ...
introduced with
CUDA
CUDA (or Compute Unified Device Architecture) is a parallel computing platform and application programming interface (API) that allows software to use certain types of graphics processing units (GPUs) for general purpose processing, an approach ca ...
. CUDA is only available for Nvidia's graphics products. Nvidia OptiX is part of
Nvidia GameWorks
Nvidia GameWorks is a middleware software suite developed by Nvidia. The Visual FX, PhysX and Optix SDKs provide a wide range of enhancements pre-optimized for Nvidia GPUs. GameWorks is partially open-source. The competing solution being in devel ...
. OptiX is a high-level, or "to-the-algorithm" API, meaning that it is designed to encapsulate the entire algorithm of which ray tracing is a part, not just the ray tracing itself. This is meant to allow the OptiX engine to execute the larger algorithm with great flexibility without application-side changes.
Commonly, video games use
rasterization
In computer graphics, rasterisation (British English) or rasterization (American English) is the task of taking an image described in a vector graphics format (shapes) and converting it into a raster image (a series of pixels, dots or lines, whic ...
rather than ray tracing for their rendering.
According to
Nvidia
Nvidia CorporationOfficially written as NVIDIA and stylized in its logo as VIDIA with the lowercase "n" the same height as the uppercase "VIDIA"; formerly stylized as VIDIA with a large italicized lowercase "n" on products from the mid 1990s to ...
, OptiX is designed to be flexible enough for "procedural definitions and hybrid rendering approaches." Aside from
computer graphics
Computer graphics deals with generating images with the aid of computers. Today, computer graphics is a core technology in digital photography, film, video games, cell phone and computer displays, and many specialized applications. A great de ...
rendering, OptiX also helps in
optical
Optics is the branch of physics that studies the behaviour and properties of light, including its interactions with matter and the construction of instruments that use or detect it. Optics usually describes the behaviour of visible, ultraviole ...
&
acoustical
Acoustics is a branch of physics that deals with the study of mechanical waves in gases, liquids, and solids including topics such as vibration, sound, ultrasound and infrasound. A scientist who works in the field of acoustics is an acoustician ...
design,
radiation
In physics, radiation is the emission or transmission of energy in the form of waves or particles through space or through a material medium. This includes:
* ''electromagnetic radiation'', such as radio waves, microwaves, infrared, visi ...
and
electromagnetic
In physics, electromagnetism is an interaction that occurs between particles with electric charge. It is the second-strongest of the four fundamental interactions, after the strong force, and it is the dominant force in the interactions of a ...
research,
artificial intelligence
Artificial intelligence (AI) is intelligence—perceiving, synthesizing, and inferring information—demonstrated by machines, as opposed to intelligence displayed by animals and humans. Example tasks in which this is done include speech re ...
queries and
collision
In physics, a collision is any event in which two or more bodies exert forces on each other in a relatively short time. Although the most common use of the word ''collision'' refers to incidents in which two or more objects collide with great fo ...
analysis.
Ray tracing with OptiX
OptiX works by using user-supplied instructions (in the form of
CUDA
CUDA (or Compute Unified Device Architecture) is a parallel computing platform and application programming interface (API) that allows software to use certain types of graphics processing units (GPUs) for general purpose processing, an approach ca ...
kernels) regarding what a ray should do in particular circumstances to simulate a complete tracing process.
A light ray (or perhaps another kind of ray) might have a different behavior when hitting a particular surface rather than another one, OptiX allows to customize these hit conditions with user-provided programs. These programs are written in
CUDA C
CUDA (or Compute Unified Device Architecture) is a parallel computing platform and application programming interface (API) that allows software to use certain types of graphics processing units (GPUs) for general purpose processing, an approach ca ...
or directly in
PTX code and are linked together when used by the OptiX engine.
In order to use OptiX a
CUDA
CUDA (or Compute Unified Device Architecture) is a parallel computing platform and application programming interface (API) that allows software to use certain types of graphics processing units (GPUs) for general purpose processing, an approach ca ...
-capable
GPU
A graphics processing unit (GPU) is a specialized electronic circuit designed to manipulate and alter memory to accelerate the creation of images in a frame buffer intended for output to a display device. GPUs are used in embedded systems, mobil ...
must be available on the system and the CUDA toolkit must be installed.
Using the OptiX engine in a ray tracing application usually involves the following steps:
* Defining programs for ray generation (e.g. rays can be shot in parallel, in a
perspective fashion or like a
gradient
In vector calculus, the gradient of a scalar-valued differentiable function of several variables is the vector field (or vector-valued function) \nabla f whose value at a point p is the "direction and rate of fastest increase". If the gradi ...
field), ray missing (when a ray doesn't intersect any object), an optional exception program (when the ray cannot be shot for some reason), a
bounding box
In geometry, the minimum or smallest bounding or enclosing box for a point set in dimensions is the box with the smallest measure (area, volume, or hypervolume in higher dimensions) within which all the points lie. When other kinds of measure a ...
program (the program that provides a bounding box intersection test for a given object) and an intersection program.
Several examples for these programs are available with the program's
SDK
// Sample code using OptiX APIs //
/* Ray generation program */
rtProgramCreateFromPTXFile( *context, path_to_ptx, "pinhole_camera", &ray_gen_program );
rtContextSetRayGenerationProgram( *context, 0, ray_gen_program );
/* Miss program */
rtProgramCreateFromPTXFile( *context, path_to_ptx, "miss", &miss_program );
rtContextSetMissProgram( *context, 0, miss_program );
/* Bounding box and intersection program */
rtProgramCreateFromPTXFile( context, path_to_ptx, "box_bounds", &box_bounding_box_program );
rtGeometrySetBoundingBoxProgram( *box, box_bounding_box_program );
rtProgramCreateFromPTXFile( context, path_to_ptx, "box_intersect", &box_intersection_program );
rtGeometrySetIntersectionProgram( *box, box_intersection_program );
Bounding box programs are used to define bounding volumes used to accelerate ray tracing process within
acceleration structures
In mechanics, acceleration is the rate of change of the velocity of an object with respect to time. Accelerations are vector quantities (in that they have magnitude and direction). The orientation of an object's acceleration is given by the ...
as
kd-tree
In computer science, a ''k''-d tree (short for ''k-dimensional tree'') is a space-partitioning data structure for organizing points in a ''k''-dimensional space. ''k''-d trees are a useful data structure for several applications, such as search ...
s or
bounding volume hierarchies
A bounding volume hierarchy (BVH) is a tree structure on a set of geometric objects. All geometric objects, that form the leaf nodes of the tree, are wrapped in bounding volumes. These nodes are then grouped as small sets and enclosed within larg ...
* Create material any hit and closest hit programs: these two programs determine a ray behavior when encountering its first intersection (closest hit) or a generic intersection (any hit)
// Sample code using OptiX APIs //
rtProgramCreateFromPTXFile( context, path_to_ptx, "closest_hit_radiance", &closest_hit_program );
rtProgramCreateFromPTXFile( context, path_to_ptx, "any_hit_shadow", &any_hit_program );
/* Associate closest hit and any hit program with a material */
rtMaterialCreate( context, material );
rtMaterialSetClosestHitProgram( *material, 0, closest_hit_program );
rtMaterialSetAnyHitProgram( *material, 1, any_hit_program );
* Define
buffer
Buffer may refer to:
Science
* Buffer gas, an inert or nonflammable gas
* Buffer solution, a solution used to prevent changes in pH
* Buffering agent, the weak acid or base in a buffer solution
* Lysis buffer, in cell biology
* Metal ion buffer
* ...
s,
variable
Variable may refer to:
* Variable (computer science), a symbolic name associated with a value and whose associated value may be changed
* Variable (mathematics), a symbol that represents a quantity in a mathematical expression, as used in many ...
s that might be used inside the supplied programs. Buffers are memory areas that allow host code (i.e. normal
CPU code) to communicate with device code (i.e. the code that gets executed on the
GPU
A graphics processing unit (GPU) is a specialized electronic circuit designed to manipulate and alter memory to accelerate the creation of images in a frame buffer intended for output to a display device. GPUs are used in embedded systems, mobil ...
) and vice versa. Variables are OptiX's internal way of communicating and using buffers to transfer data back and forth.
* Define the OptiX hierarchy of geometry objects, groups, selectors and other nodes to generate a tree graph of the entire scene to be rendered
In order to render a complex scene or trace different paths for any ray OptiX takes advantage of
GPGPU
General-purpose computing on graphics processing units (GPGPU, or less often GPGP) is the use of a graphics processing unit (GPU), which typically handles computation only for computer graphics, to perform computation in applications traditiona ...
computing by exploiting NVIDIA
CUDA
CUDA (or Compute Unified Device Architecture) is a parallel computing platform and application programming interface (API) that allows software to use certain types of graphics processing units (GPUs) for general purpose processing, an approach ca ...
platform.
Since the process of shooting rays and setting their behavior is highly customizable, OptiX may be used in a variety of other applications aside from ray tracing.
OptiX Prime
Starting from OptiX 3.5.0 a second library called OptiX Prime was added to the bundle which aims to provide a fast low-level
API
An application programming interface (API) is a way for two or more computer programs to communicate with each other. It is a type of software Interface (computing), interface, offering a service to other pieces of software. A document or standa ...
for ray tracing - building the
acceleration structure, traversing the acceleration structure, and
ray-triangle intersection. Prime also features a CPU fallback when no compatible GPU is found on the system. Unlike OptiX, Prime is not a programmable API, so lacks support for custom, non-triangle primitives and shading. Being non-programmable, OptiX Prime does not encapsulate the entire algorithm of which ray tracing is a part. Thus, Prime cannot recompile the algorithm for new GPUs, refactor the computation for performance, or use a network appliance like the Quadro VCA, etc.
Software using OptiX
*
Blender
A blender (sometimes called a mixer or liquidiser in British English) is a kitchen appliance, kitchen and laboratory appliance used to mix, crush, purée or emulsion, emulsify food and other substances. A stationary blender consists of a blender ...
has OptiX support since version 2.81 (7.1 in 2.92)
* The Blender Add-o
D-NOISEuses OptiX binaries for AI-accelerated denoising
FurryBall- Advanced real-time GPU production quality final frame renderer using raytrace as well as rasterize - based on Nvidia OptiX
* At
SIGGRAPH
SIGGRAPH (Special Interest Group on Computer Graphics and Interactive Techniques) is an annual conference on computer graphics (CG) organized by the ACM SIGGRAPH, starting in 1974. The main conference is held in North America; SIGGRAPH Asia ...
2011
Adobe
Adobe ( ; ) is a building material made from earth and organic materials. is Spanish for ''mudbrick''. In some English-speaking regions of Spanish heritage, such as the Southwestern United States, the term is used to refer to any kind of e ...
showcased OptiX in a technology demo of GPU ray tracing for motion graphics.
* At
SIGGRAPH
SIGGRAPH (Special Interest Group on Computer Graphics and Interactive Techniques) is an annual conference on computer graphics (CG) organized by the ACM SIGGRAPH, starting in 1974. The main conference is held in North America; SIGGRAPH Asia ...
2013 OptiX was featured in
Pixar
Pixar Animation Studios (commonly known as Pixar () and stylized as P I X A R) is an American computer animation studio known for its critically and commercially successful computer animated feature films. It is based in Emeryville, Californi ...
's realtime, GPU-based lighting preview tool.
* OptiX has been integrated into the
GameWorks
GameWorks is a gaming-based entertainment center with a single location as of 2022, a chain of such businesses. It was owned by then-owner ExWorks Capital, each venue featured a wide array of video game arcades, in addition to full-service bars a ...
developers library along with
PhysX
PhysX is an open-source realtime physics engine middleware SDK developed by Nvidia as a part of Nvidia GameWorks software suite.
Initially, video games supporting PhysX were meant to be accelerated by PhysX PPU (expansion cards designed by Ag ...
and other
CUDA
CUDA (or Compute Unified Device Architecture) is a parallel computing platform and application programming interface (API) that allows software to use certain types of graphics processing units (GPUs) for general purpose processing, an approach ca ...
powered graphics engines and frameworks.
*
Adobe After Effects
Adobe After Effects is a digital visual effects, motion graphics, and compositing application developed by Adobe Inc., and used in the post-production process of film making, video games and television production. Among other things, After Eff ...
CC
*
Daz Studio
Daz Studio is a free media design software developed by Daz 3D. Daz Studio is a 3D scene creation and rendering application used to produce images as well as video. Renders can be done by leveraging either the 3Delight render engine, or the Ira ...
had OptiX Prime Acceleration since its Iray integration, however support was removed in version 4.12.1.8
*
Luxrender
LuxCoreRender is a free and open-source physically based rendering software. It began as ''LuxRender'' in 2008 before changing its name to LuxCoreRender in 2017 as part of a project reboot. The LuxCoreRender software runs on Linux, Mac OS X, a ...
2.5: up to 600% acceleration
See also
*
CUDA
CUDA (or Compute Unified Device Architecture) is a parallel computing platform and application programming interface (API) that allows software to use certain types of graphics processing units (GPUs) for general purpose processing, an approach ca ...
References
External links
NVIDIA OptiX Application Acceleration Engine main pageOptiX Programming Guide and OptiX SDKOptiX support ForumOptiX 7 Course Tutorial Code
{{NVIDIA
Nvidia software
Proprietary commercial software for Linux
Proprietary freeware for Linux
Ray tracing (graphics)