Can I build a scene with 4D meshes and make some ray tracing operations?
Hi @Kewaqi, can you give me more insight into “4D meshes”? Is that animated 3D mesh?
OptiX can accelerate ray tracing 3D geometry by
- traversing the acceleration structure (BVH) and
- intersecting 3D triangles, spheres, curves via special fast hardware units. You can provide your own intersection routines e.g. for non-triangles but that will be somehow slower.
Not animated 3D mesh. Just mesh with 4D coordinates. To be more specific, it’s a 2D mesh locating on the 3D unit sphere in a 4D space.
Sphere: so those primitives aren’t planar triangles, so you should implement some mapping from non-planar to planar and back or use a custom intersection program. Not sure this is possible with the info you gave me, just speculating.
And what kind of processing do you need? to create an image?
That said, the vertex formats supported by OptiX are 3D and 2D, see Types
You could transform the 4D into 2D (or 3D with constant z) and then feed OptiX with it. Alternatively use 4D data and set the vertex stride value accordingly (see OptixBuildInputTriangleArray Struct Reference)
The vertices are on the 3D unit sphere, but the triangles are still planar.
This requirement comes from my academic research.
Indeed, I can project the mesh into 3D spaces, but that will introduce some numerical problems. I wonder that can I perform ray tracing in 4D space directly, thus no need to projection and no numerical problems.
Hi @Kewaqi,
OptiX does not support 4D vertices, thus you would need to perform OptiX ray tracing on 3D projections or slices of your 4D space. OptiX does have built-in sphere intersections in addition to triangle support, in case that helps at all. Otherwise, building a 4D BVH, and doing traversal of 4D rays through a 4D space is something that would require a custom software implementation.
–
David.
Thanks! I will try the projection.