Star-3D Manage 3D geometries
Star-3D 0.8 is available
- Get source code: git
The Star-3D C library manages surfacic geometries and provides operators to access them efficiently by uniform sampling, ray-tracing or a closest point query. To ensure the efficiency of these operators, Star-3D internally relies on Intel(R) Rendering Framework: Embree that provides highly optimized acceleration structures as well as traversal kernels for a wide range of data workloads. The main targets of Star-3D are programmers that want to efficiently handle complex and arbitrary 3D content.

The main concept exposed in Star-3D is the shape. A shape represents a 3D object such as a triangular mesh or a sphere, whose data are user defined and can be updated at any time. A virtual environment is built by attaching one or several shapes to a scene. A scene can be instantiated into one or several shapes that can be then attached to a scene as any regular shapes. Each instance has its own position and orientation while the instantiated geometry is stored once even though it is instantiated several times. This feature can thus be used to create extremely complex environment with a low memory footprint.
To access the scene data through uniform sampling or ray-tracing, one has to create a view of the scene. On its creation, the view internally builds data structures required by the aforementioned access operators. These data structures are built from the scene geometry as defined at the moment of the view creation; a view is thus insensitive to scene updates following its creation. This means that several views can be used to register different states of the same scene, giving to the caller a great flexibility to manage the scene data.
Release notes
Version 0.8
Update the API of the filtering function: add the range of the ray as input argument. For closest point queries, this range is from 0 to query radius.
Version 0.7.4
- Fix the barycentric coordinates of the intersection of the ray onto the triangle: the coordinates could lie outside the triangle.
- Fix compilation warnings.
Version 0.7.3
- Fix the
s3d_scene_view_closest_point
function on the scenes containing instantiated meshes: the rotation of the instances was wrongly taken into account. - Speed up the
s3d_scene_view_closest_point
query on instantiated meshes.
Version 0.7.2
- Fix a precision issue in the
s3d_scene_view_closest_point
function: the returned hit could have invalid barycentric coordinates.
Version 0.7.1
- Fix an invalid memory read at the setup of the scene view when the
S3D_TRACE
flag was set. The Embree backend assumes that the last vertex position is at least 16 bytes length while its size was only of 12 bytes (i.e. 3 single-precision floating-point values).
Version 0.7
- Add the
s3d_scene_view_closest_point
function. This function retrieves the closest point into the scene to a query position in a radius from ]0, INF]. This closest point is returned as a regular hit which means that the function returns to the caller not only the distance to the query position, but also the geometric primitive onto which the point lies and its location onto this primitive. If no surface lies around the query position in a distance lesser than the one defined by the query radius, the returned hit is invalid which can be checked with the regularS3D_HIT_NONE
macro. Finally, this function supports the filter functions so that the caller can choose to discard closest hits according to its own criteria. - Add the
s3d_scene_view_create2
function that allows the user to configure the acceleration structure used to partition the scene geometry. The caller can thus control the quality of the structure and thus the compromise between the building time and the query performances. - Improve the performances of the scene bounding box computation. First of all,
if the scene view is created with the
S3D_TRACE
flag, Star-3D directly retrieves the scene bounding box from Embree that already computed it to build the acceleration structure. Finally, it internally tries to avoid to recompute the bounding box if the scene was not updated between 2 scene view creations.
Version 0.6.2
- Fix an issue in
s3d_scene_view_compute_area
: the returned area was wrong when the scene view was created with theS3D_SAMPLE
flag.
Version 0.6.1
- Fix an issue in
s3d_scene_view_sample
: the samples were not uniformly distributed if the scene contained meshes and spheres.
Version 0.6
- Migrate the ray-tracing back-end from Embree2 to Embree3.
Version 0.5.1
- Fix a compilation issue on VC2017.
Version 0.5
- Add the support of spherical shapes. A sphere is composed of one primitive that can be sampled and/or ray-traced as any other primitives of the scene. Hit filtering is also fully supported.
Version 0.4.2
- Update the version of the RSys dependency to 0.6: replace the deprecated
[N]CHECK
macros by the new macroCHK
.
Version 0.4.1
- Fix the
s3d_scene_view
consistency when it is created from a scene containing instances: the geometries might be not correctly synchronised and thus could be outdated.
Version 0.4
- Implement the
s3d_scene_view
API; it replaces thes3d_scene_<begin|end>_session
functions that were removed. A view registers the state of the scene from which it is created. It is used to retrieve the scene data through ray-tracing, sampling or indexing. Several views can be created on the same scene. - Add the possibility to attach a same shape to several scenes.
- Fix a memory overconsumption with instantiated shapes: the instantiated back-end data were copied rather than shared.
- Add the
s3d_scene_shapes_count
function that returns the overall number of shapes in the scene. - Add the
s3d_instance_set_transform
ands3d_instance_transform
functions that sets or gets the transformation matrix of the instance, respectively. - Add the
s3d_primitive_get_transform
function that gets the transformation matrix of a primitive. - Add the
s3d_primitive_has_attrib
function that returns if a primitive has a specific attribute or not. - Add the
s3d_triangle_get_vertex_attrib
function that retrieves the vertex attributes of a triangular primitive.
License
Copyright © 2015-2021 |Méso|Star> (contact@meso-star.com). Star-3D is released under the CeCILLv2.1 license. You are welcome to redistribute it under certain conditions; refer to the COPYING files for details.