RTC_GEOMETRY_TYPE_POINT(3)

πŸ’– RTC_GEOMETRY_TYPE_POINT(3) πŸ’–

Embree Ray Tracing Kernels 4 β€” the manual page for the point geometry girlies πŸŽ€

okay bestie, sit down, grab your boba, because we're about to talk about points and honestly? they ate. this is the RTC_GEOMETRY_TYPE_POINT family, living in the Embree Ray Tracing Kernels 4 manual.


✨ NAME ✨

  • RTC_GEOMETRY_TYPE_SPHERE_POINT β€” point geometry spheres 🫧
  • RTC_GEOMETRY_TYPE_DISC_POINT β€” point geometry with ray-oriented discs πŸ”†
  • RTC_GEOMETRY_TYPE_ORIENTED_DISC_POINT β€” point geometry with normal-oriented discs 🧭

🌸 SYNOPSIS 🌸

#include <embree4/rtcore.h>

rtcNewGeometry(device, RTC_GEOMETRY_TYPE_SPHERE_POINT);
rtcNewGeometry(device, RTC_GEOMETRY_TYPE_DISC_POINT);
rtcNewGeometry(device, RTC_GEOMETRY_TYPE_ORIENTED_DISC_POINT);

πŸ¦‹ DESCRIPTION πŸ¦‹

so. points with per vertex radii?? yes. they're supported, and you get three whole flavors: sphere, ray-oriented discs, and normal-oriented discs. it's giving choose-your-own-adventure but make it geometry πŸ’…

you make these point geometries by passing RTC_GEOMETRY_TYPE_SPHERE_POINT, RTC_GEOMETRY_TYPE_DISC_POINT, or RTC_GEOMETRY_TYPE_ORIENTED_DISC_POINT to the rtcNewGeometry function. iconic.

the point vertices can be specified through a vertex buffer (RTC_BUFFER_TYPE_VERTEX). and for the normal oriented discs, a normal buffer (RTC_BUFFER_TYPE_NORMAL) has to get specified additionally β€” no normal buffer, no normal-oriented disc, that's the rule bestie. want the deets on how to set buffers? go read rtcSetGeometryBuffer and rtcSetSharedGeometryBuffer. they're right there. 🫢

now, the vertex buffer lore 🌈:

  • it stores each control vertex as a single precision position and radius, in (x, y, z, r) order in memory, in RTC_FORMAT_FLOAT4 format.
  • the number of vertices is inferred from the size of this buffer. not me guessing, that's literally how it works.
  • similarly, the normal buffer stores a single precision normal per control vertex, in x, y, z order, in RTC_FORMAT_FLOAT3 format.

🌟 the three modes, ranked 🌟

RTC_GEOMETRY_TYPE_SPHERE_POINT

in this mode, a real geometric surface is rendered for the curve. it's more expensive πŸ’€ but it allows closeup views. main character mode, honestly. pay the price, get the face card.

RTC_GEOMETRY_TYPE_DISC_POINT

this flat mode is a fast mode designed to render distant points. in this mode the point is rendered as a ray facing disc. lowkey the budget-friendly baddie. distant points don't need the full glam, and that's valid.

RTC_GEOMETRY_TYPE_ORIENTED_DISC_POINT

this mode is designed as a midpoint geometrically between ray facing discs and spheres. in this mode the point is rendered as a normal oriented disc. the middle child, but like, in a cute way. the balance. the ~vibe~. ✨


πŸ” hit info, let's talk πŸ”

for all point types, only the hit distance and the geometry normal are returned as hit information. u and v are set to zero. periodt. no u, no v, zero, done. πŸ’…


πŸŒ€ multi-segment motion blur πŸŒ€

for multi-segment motion blur, the number of time steps must first be specified using the rtcSetGeometryTimeStepCount call. then a vertex buffer for each time step can be set using different buffer slots, and all these buffers must have the same stride and size. same stride, same size, every time step, no exceptions bestie 😀


also!! there's a tutorial [Points] if you want an example of how to create and use point geometries. go look at it, it's right there, it's giving study buddy energy πŸ“šβœ¨


πŸ’€ EXIT STATUS πŸ’€

on failure, NULL is returned and an error code is set that can be queried using rtcGetDeviceError. so if you get NULL back, don't panic β€” check the error code, she'll tell you what went wrong πŸ™ˆ


πŸ‘‘ SEE ALSO πŸ‘‘

  • [rtcNewGeometry]

and that's the whole page, bestie!! πŸ’œ this was RTC_GEOMETRY_TYPE_POINT(3) from the Embree Ray Tracing Kernels 4 manual. mwah. go render something gorgeous. no cap. πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from