RTC_GEOMETRY_TYPE_POINT(3embree3)

πŸ“¦ version 3.13.5, in epel 9, fedora 43, fedora 44

πŸ’– NAME πŸ’–

okay bestie, listen up β€” this is the page for the Embree Ray Tracing Kernels 3 manual, section 3, and it's all about three point-geometry glow-ups:

  • RTC_GEOMETRY_TYPE_SPHERE_POINT β€” point geometry spheres, no cap 🫢
  • RTC_GEOMETRY_TYPE_DISC_POINT β€” point geometry but with ray-oriented discs
  • RTC_GEOMETRY_TYPE_ORIENTED_DISC_POINT β€” point geometry with normal-oriented discs

✨ SYNOPSIS ✨

#include <embree3/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 basically, points with per vertex radii are supported, and you get to pick between three whole geometric representations: spheres, ray-oriented discs, and normal-oriented discs. it's giving choose your fighter πŸ’…

you make these point geometries by passing RTC_GEOMETRY_TYPE_SPHERE_POINT, RTC_GEOMETRY_TYPE_DISC_POINT, or RTC_GEOMETRY_TYPE_ORIENTED_DISC_POINT into the rtcNewGeometry function. the point vertices can be specified through a vertex buffer (RTC_BUFFER_TYPE_VERTEX). and for the normal oriented discs, you also have to specify a normal buffer (RTC_BUFFER_TYPE_NORMAL) on top of that β€” it's not optional, bestie, it's required πŸ™ˆ

want the deets on how to actually set buffers? go look at rtcSetGeometryBuffer and rtcSetSharedGeometryBuffer. they've got you.


🌸 the buffers, explained 🌸

the vertex buffer stores each control vertex as a single precision position and radius, laid out in (x, y, z, r) order in memory, in RTC_FORMAT_FLOAT4 format. and the number of vertices? it's inferred from the size of this buffer β€” the buffer tells you how many there are, you don't tell it. iconic behaviour honestly ✨

similarly, the normal buffer stores a single precision normal per control vertex, in x, y, z order and 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. yes it's more expensive πŸ’€ but it lets you do closeup views, and honestly? worth it. main character energy.
  • RTC_GEOMETRY_TYPE_DISC_POINT β€” this flat mode is the fast mode, designed to render distant points. in this mode the point gets rendered as a ray facing disc. speedrun strats fr fr πŸ”₯
  • RTC_GEOMETRY_TYPE_ORIENTED_DISC_POINT β€” this mode is designed as a midpoint, geometrically speaking, between ray facing discs and spheres. in this mode the point is rendered as a normal oriented disc. it's the in-between girlie πŸ¦‹

πŸ‘‘ hit info, aka what you actually get back πŸ‘‘

for all point types, only the hit distance and the geometry normal come back as hit information. u and v? both set to zero. periodt. that's the whole menu.


⏱️ multi-segment motion blur ⏱️

for multi-segment motion blur, the number of time steps must be specified first using the rtcSetGeometryTimeStepCount call β€” first, bestie, don't skip this step 🫢

then you can set a vertex buffer for each time step using different buffer slots. and important: all of these buffers must have the same stride and size. no mixing, no matching, no chaos 🌈

also go check the tutorial [Points] for an example of how to create and use point geometries β€” it's basically the group chat receipts for this whole page.

πŸ’€ EXIT STATUS πŸ’€

on failure, NULL is returned and an error code gets set. you can query that error code using rtcGetDeviceError. so if things go sideways, that's your 911 call.


πŸ”₯ SEE ALSO πŸ”₯

  • [rtcNewGeometry]

and that's the whole page, bestie!! this was the RTC_GEOME...PE_*_POINT(3) page from the Embree Ray Tracing Kernels 3 manual, section 3 β€” go forth and render some gorgeous points, you absolute icon πŸŽ€βœ¨πŸ’–

πŸ“¦ where this page comes from