RTCSETGEOMETRYTIMESTEPCOUNT(3)

✨ rtcSetGeometryTimeStepCount ✨

okay so bestie, you're in the Embree Ray Tracing Kernels 4 manual, section 3, and today's main character is rtcSetGeometryTimeStepCount πŸŽ€. yes it's a mouthful. yes it's iconic. let's go πŸ’…


🌸 NAME 🌸

rtcSetGeometryTimeStepCount β€” sets the number of time steps of the geometry πŸ¦‹


✨ SYNOPSIS ✨

#include <embree4/rtcore.h>

void rtcSetGeometryTimeStepCount(
  RTCGeometry geometry,
  unsigned int timeStepCount
);

πŸ’– DESCRIPTION πŸ’–

so rtcSetGeometryTimeStepCount sets the number of time steps for multi-segment motion blur β€” that's the timeStepCount parameter, bestie β€” for the geometry you point at with the geometry parameter. it's giving "how many snapshots of this thing exist in time" energy πŸ•°οΈβœ¨

now here's where it gets type-dependent, and honestly? the way each geometry type handles this is so different, pay attention πŸ™ˆ

  • for triangle meshes (RTC_GEOMETRY_TYPE_TRIANGLE), quad meshes (RTC_GEOMETRY_TYPE_QUAD), curves (RTC_GEOMETRY_TYPE_CURVE), points (RTC_GEOMETRY_TYPE_POINT), and subdivision geometries (RTC_GEOMETRY_TYPE_SUBDIVISION), the number of time steps directly corresponds to the number of vertex buffer slots available (RTC_BUFFER_TYPE_VERTEX buffer type). so for these ones, you must specify one vertex buffer per time step when you're creating multi-segment motion blur geometries. one buffer per step, no skipping, periodt πŸ’€
  • for instance geometries (RTC_GEOMETRY_TYPE_INSTANCE), a transformation must be specified for each time step β€” go peek at rtcSetGeometryTransform for that 🫢
  • for user geometries, the registered bounding callback function must provide a bounding box per primitive and per time step, and the intersection and occlusion callback functions should properly intersect the motion-blurred geometry at the ray time. yes both. yes at the ray time. iykyk πŸ”₯

πŸ’€ EXIT STATUS πŸ’€

on failure an error code is set that can be queried using rtcGetDeviceError. so if something's off, go ask rtcGetDeviceError what happened, she'll tell you πŸ’…


πŸ‘‘ SEE ALSO πŸ‘‘

  • [rtcNewGeometry]
  • [rtcSetGeometryTimeRange]

and that's the whole page bestie, no notes πŸ’– you just read the rtcSetGeo...eStepCount(3) page out of the Embree Ray Tracing Kernels 4 manual, so go forth, set those time step counts, and slay 🌈⭐ mwah 🫢

πŸ“¦ where this page comes from