First of all I am completely new to OptiX and OptiX Prime, so if these are trivial questions please do forgive me. I am yet to go over the programming guide and api documentation. Even if you cannot give complete answers, I would greatly appreciate if you can point me in the right direction.
I am involved in an application which maps aerial quadcopter images to digital elevation maps. So primeInstancing project in Optix SDK samples seemed as a great point to start. The elevation data is defined completely on a regular grid (every 1m along x and y axes on the ground). This regular mesh is completely opaque.
- How can I import the above mentioned regular mesh to my program? I have checked PrimeMesh class in primeCommon.h and Mesh struct in Mesh.h itself but I am not sure how tri_indices and mat_indices are defined. Let us assume I have such a grid, do I need to define indices as in:
(I am currently trying to create .obj files of my regular grid mesh, but this cannot be a long term solution)
In order to make things faster I do wish to use a BVH structure (sBVH or TrBVH). Does OptiX Prime handle this by itself (for instance when I define a Model Object) or do I need to define this? If so, how?
If I can construct these BVHs, is there a mechanism to serialize BVHs? Even though the portion of the elevation data at an instance I need to plan is small, total area to cover is not and loading precomputed BVHs from disk to ram to device memory in a predictive manner may be desirable.
When I use RTP_BUFFER_FORMAT_HIT_T_TRIID_U_V, how can I determine which corner of the triangle correspond to u, which one to v and which one to w=1-u-v?
I wanted to make sure that ray intersection operations to be watertight and I have come across RTP_QUERY_HINT_WATERTIGHT, but it says the following in its enumeration “Use watertight ray-triangle intersection, but only if the RTP_BUILDER_PARAM_USE_CALLER_TRIANGLES builder parameter is also set”. Could you please explain this a little bit more?
I do wish to use u and v values of the intersection to compute actual physical coordinates and I do wish to do this with another CUDA kernel. Is there anything I need to consider while accessing, RTP_BUFFER_TYPE_CUDA_LINEAR type buffer.
Thank you very much and sorry for the barrage of questions