diff options
author | Brecht Van Lommel <brecht@blender.org> | 2021-12-01 19:30:46 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2021-12-16 22:54:04 +0300 |
commit | 35b1e9fc3acd6db565e7e54252a4a4152d8343d9 (patch) | |
tree | 8599df3b2be192d1fe19d30a8afb7e8d8729499e /intern/cycles/scene/alembic_read.h | |
parent | 2229179faa44e2c685b4eabd0c51d4c7d5c1f193 (diff) |
Cycles: pointcloud rendering
This add support for rendering of the point cloud object in Blender, as a native
geometry type in Cycles that is more memory and time efficient than instancing
sphere meshes. This can be useful for rendering sand, water splashes, particles,
motion graphics, etc.
Points are currently always rendered as spheres, with backface culling. More
shapes are likely to be added later, but this is the most important one and can
be customized with shaders.
For CPU rendering the Embree primitive is used, for GPU there is our own
intersection code. Motion blur is suppored. Volumes inside points are not
currently supported.
Implemented with help from:
* Kévin Dietrich: Alembic procedural integration
* Patrick Mourse: OptiX integration
* Josh Whelchel: update for cycles-x changes
Ref T92573
Differential Revision: https://developer.blender.org/D9887
Diffstat (limited to 'intern/cycles/scene/alembic_read.h')
-rw-r--r-- | intern/cycles/scene/alembic_read.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/intern/cycles/scene/alembic_read.h b/intern/cycles/scene/alembic_read.h index 6b656b59481..e95750ce691 100644 --- a/intern/cycles/scene/alembic_read.h +++ b/intern/cycles/scene/alembic_read.h @@ -122,6 +122,26 @@ void read_geometry_data(AlembicProcedural *proc, const CurvesSchemaData &data, Progress &progress); +/* Data of a ICurvesSchema that we need to read. */ +struct PointsSchemaData { + Alembic::AbcGeom::TimeSamplingPtr time_sampling; + size_t num_samples; + + float default_radius; + float radius_scale; + + Alembic::AbcGeom::IP3fArrayProperty positions; + Alembic::AbcGeom::IInt32ArrayProperty num_points; + Alembic::AbcGeom::IFloatGeomParam radiuses; + // Those are unsupported for now. + Alembic::AbcGeom::IV3fArrayProperty velocities; +}; + +void read_geometry_data(AlembicProcedural *proc, + CachedData &cached_data, + const PointsSchemaData &data, + Progress &progress); + void read_attributes(AlembicProcedural *proc, CachedData &cache, const Alembic::AbcGeom::ICompoundProperty &arb_geom_params, |