ray_tracer¶
This subpackage provides the ray tracing and rendering capabilities for GIANT.
Description¶
In GIANT rendering is primarily done using single bounce ray tracing, where a ray is traced from the camera, to a surface and then bounced to the light source. This tells us a number of things. First, is the geometry of the ray trace, including the exidence, incidence, and normal vectors and the albedo at the intersect location. It also tells us if the surface is shadowed where we initially intersected. Based on this information, we can then compute the intensity for each ray and then use those intensities to render an image. Because space imagery typically has a single collimated illumination source (the sun) and most bodies we are doing OpNav with respect to are airless (and thus there is no atmospheric scattering) the single bounce ray trace is a very accurate way to render synthetic images.
There are 2 primary ways to represent a surface in GIANT. The first is as a triaxial Ellipsoid
. This is
useful for many larger celestial bodies (planets, moons, and large asteroids/comets) and is very efficient for ray u
tracing since only a single object needs to be intersected. The second primary way is as a Surface
object.
Using this we represent the surface as a tesselation of small planar geometry primitives (usually triangles,
Triangle32
and Triangle64
) where we then have to check our rays intersections against every geometry
primitive in the surface. This allows us to represent arbitrary topography with arbitrary resolution, but because it
normally takes many many geometry primitives for a single surface tracing can be very slow. Therefore, we also provide
an acceleration structure in the form of a KDTree
which limits the number of triangles we need to check each
ray against using AxisAlignedBoundingBox
.
Once a surface is represented in GIANT it is usually wrapped in a SceneObject
and added to a Scene
.
The Scene
in GIANT is used to define the locations and orientations of multiple objects with respect to each
other. It also provides functionality for automatically updating these locations and orientations for a new time and
for doing the single bounce ray trace for rendering. Once the ray trace is complete, the subclasses of
IlluminationModel
are used to convert the ray trace geometry into intensity values for each ray (typically)
the McEwenIllumination
class).
When creating a surface in GIANT, you will usually use the ingest_shape
script which will create the surface and
build the acceleration structure automatically for you.
For more details, please refer to the following module documentation, which provides much more detail.
Modules
This module defines a class for representing rays in GIANT, a function to generate them from a camera model, and the numpy structured data type used to store the results of a ray trace. |
|
This subpackage defines all shapes that are used throughout GIANT. |
|
This cython module provides the ability to accelerate ray tracing of |
|
This module provides scene functionality for rendering in GIANT. |
|
This module defines the illumination functions that are used to convert ray traced geometry into intensity values when rendering. |
|
This module provides some basic utilities for working with the ray tracer in GIANT. |
Classes
A class to store/manipulate rays. |
|
This class provides a quick and easy interface for changing the position and orientation of various objects. |
|
This is a container for |
|
This enumeration provides options for the different corrections that can be used when calculating the apparent position of an object in a scene |
|
This abstract base class specifies the minimum interface expected of an illumination model in GIANT. |
|
This illumination model computes the intensity values as the weighted sum between the Lommel-Seeliger and Lambertian models, weighted using the phase angle. |
|
This basic illumination model computes the intensity values as simply the cosine of the incidence angle times the albedo. |
|
This basic illumination model computes the intensity values as simply the cosine of the incidence angle divided by the cosine of the incidence angle plus the exidence angle times the albedo. |
|
This illumination model computes the intensity values according to the Ashikhmin Shirley diffuse law |
|
This illumination model computes the intensity values as the weighted sum between the Lommel-Seeliger and Lambertian models, weighted using the phase angle. |
|
This class represents surfaces as tessellated triangles, storing the vertices, albedos, and normal vectors using double precision. |
|
This class represents surfaces as tessellated triangles, storing the vertices, albedos, and normal vectors using single precision. |
|
A shape for modelling spheres and triaxial ellipsoidal bodies. |
|
This defines the basic interface expected of all surfaces in GIANT. |
|
This class serves as the backbone for surfaces in GIANT represented using single precision. |
|
This class serves as the backbone for surfaces in GIANT represented using double precision. |
|
A solid represents an 3D object that can be mathematically represented without resorting to tesselation (for instance a tri-axial ellipsoid). |
|
This represents the minimum required interface for an object to be considered traceable in GIANT. |
|
Represents a single, unrenderable point. |
|
This class provides an efficient implementation of an axis aligned bounding box. |
|
A KD Tree representation for accelerated tracing of surface objects with many geometry primitives using axis aligned bounding box acceleration. |
Constants
The numpy datatype expected by the illumination functions in this module as input for conversion to intensity values. |
|
The numpy datatype returned when rays are traced with a |