Scene.raster_render¶
- Scene.raster_render(target_ind, illumination_model=None)[source]¶
Computes the geometry for rendering a target using rasterization, not ray tracing.
This is done by simply considering the geometry for each facet of a target based solely on the incidence/exidence/normal vectors for the facet. This therefore does no occlusion or shadowing.
This assumes that the scene has already been placed in the camera frame.
The return is the numpy array with a dtype of
ILLUM_DTYPE
that can be provided to anillumination
model and the center of each facet.This is experimental and probably shouldn’t be used much.
- Raises:
ValueError – if the target is not represented by a tesselation (Surface)
- Parameters:
target_ind (int) – The target index we are to render using rasterization
illumination_model (IlluminationModel | None) – The model we are using to convert the geometry into illumination values. If this is not None then the illumination values are returned, rather than the illumination inputs.
- Returns:
Either the illumination inputs, the center of each facet, and the vertices of each facet in the camera frame if
illumination_model
isNone
or the illumination values, the center of each facet and the vertices of each facet in the camera frame ifillumination_model
is notNone
.- Return type:
Tuple[ndarray, ndarray, ndarray]