Nvidia OptiX (OptiX Application Acceleration Engine) is a
ray tracing API
An application programming interface (API) is a connection between computers or between computer programs. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how to build ...
that was first developed around 2009. The computations are offloaded to the
GPUs through either the low-level or the high-level
API
An application programming interface (API) is a connection between computers or between computer programs. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how to build ...
introduced with
CUDA
In computing, CUDA (Compute Unified Device Architecture) is a proprietary parallel computing platform and application programming interface (API) that allows software to use certain types of graphics processing units (GPUs) for accelerated gene ...
. CUDA is only available for Nvidia's graphics products. Nvidia OptiX is part of
Nvidia GameWorks. 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 Corporation ( ) is an American multinational corporation and technology company headquartered in Santa Clara, California, and incorporated in Delaware. Founded in 1993 by Jensen Huang (president and CEO), Chris Malachowsky, and Curti ...
, OptiX is designed to be flexible enough for "procedural definitions and hybrid rendering approaches". Aside from
computer graphics
Computer graphics deals with generating images and art with the aid of computers. Computer graphics is a core technology in digital photography, film, video games, digital art, cell phone and computer displays, and many specialized applications. ...
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, ultravio ...
and
acoustical design,
radiation
In physics, radiation is the emission or transmission of energy in the form of waves or particles through space or a material medium. This includes:
* ''electromagnetic radiation'' consisting of photons, such as radio waves, microwaves, infr ...
and
electromagnetic
In physics, electromagnetism is an interaction that occurs between particles with electric charge via electromagnetic fields. The electromagnetic force is one of the four fundamental forces of nature. It is the dominant force in the interacti ...
research,
artificial intelligence
Artificial intelligence (AI) is the capability of computer, computational systems to perform tasks typically associated with human intelligence, such as learning, reasoning, problem-solving, perception, and decision-making. It is a field of 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 for ...
analysis.
Ray tracing with OptiX
OptiX works by using user-supplied instructions (in the form of
CUDA
In computing, CUDA (Compute Unified Device Architecture) is a proprietary parallel computing platform and application programming interface (API) that allows software to use certain types of graphics processing units (GPUs) for accelerated gene ...
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
In computing, CUDA (Compute Unified Device Architecture) is a proprietary parallel computing platform and application programming interface (API) that allows software to use certain types of graphics processing units (GPUs) for accelerated gene ...
or directly in
PTX code and are linked together when used by the OptiX engine.
In order to use OptiX a CUDA-capable
GPU 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 f of several variables is the vector field (or vector-valued function) \nabla f whose value at a point p gives the direction and the rate of fastest increase. The g ...
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 bounding box or smallest bounding box (also known as the minimum enclosing box or smallest enclosing box) for a point set in dimensions is the box with the smallest measure (area, volume, or hypervolume in higher dime ...
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. Acceleration is one of several components of kinematics, the study of motion. Accelerations are vector quantities (in that they have magnit ...
as
kd-trees or
bounding volume hierarchies
* 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
* Lysis buffer, in cell biology
* Metal ion buffer
* Mineral redox buffer, in geology
Technology and engineeri ...
s,
variables that might be used inside the supplied programs. Buffers are memory areas that allow host code (i.e. normal
CPU
A central processing unit (CPU), also called a central processor, main processor, or just processor, is the primary processor in a given computer. Its electronic circuitry executes instructions of a computer program, such as arithmetic, log ...
code) to communicate with device code (i.e. the code that gets executed on the GPU) 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 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 connection between computers or between computer programs. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how to build ...
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 (from Latin ''mixus, the PPP of miscere eng. to Mix)'' or liquidiser in British English) is a kitchen and laboratory appliance used to mix, crush, purée or emulsify food and other substances. A stationary ...
has OptiX support since version 2.81 (7.1 in 2.92)
* The Blender Add-o
D-NOISEuses OptiX binaries for AI-accelerated denoising
* At
SIGGRAPH
SIGGRAPH (Special Interest Group on Computer Graphics and Interactive Techniques) is an annual conference centered around computer graphics organized by ACM, starting in 1974 in Boulder, CO. The main conference has always been held in North ...
2011
Adobe
Adobe (from arabic: الطوب Attub ; ) 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 use ...
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 centered around computer graphics organized by ACM, starting in 1974 in Boulder, CO. The main conference has always been held in North ...
2013 OptiX was featured in
Pixar
Pixar (), doing business as Pixar Animation Studios, is an American animation studio based in Emeryville, California, known for its critically and commercially successful computer-animated feature films. Pixar is a subsidiary of Walt Disney ...
'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 . It was owned by then-owner ExWorks Capital, each venue featured a wide array of video game arcades, in addition to full-service bars and restaurants. It was originally cre ...
developers library along with
PhysX
PhysX is an Open-source software, open-source Real-time computer graphics, realtime physics engine middleware Software development kit, SDK developed by Nvidia as part of the Nvidia GameWorks software suite.
Initially, video games supporting Ph ...
and other
CUDA
In computing, CUDA (Compute Unified Device Architecture) is a proprietary parallel computing platform and application programming interface (API) that allows software to use certain types of graphics processing units (GPUs) for accelerated gene ...
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.; it is used for animation and in the post-production process of film making, video games and television production. Amo ...
CC
*
Daz Studio 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
In computing, CUDA (Compute Unified Device Architecture) is a proprietary parallel computing platform and application programming interface (API) that allows software to use certain types of graphics processing units (GPUs) for accelerated gene ...
*
Nvidia RTX
Nvidia RTX (also known as Nvidia GeForce RTX under the GeForce brand) is a professional visual computing platform created by Nvidia, used in mainstream PCs for gaming as well as being used in workstations for designing complex large-scale model ...
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)