Back to home page

EIC code displayed by LXR

 
 

    


Warning, /eic-opticks/sysrap/SOPTIX.rst is written in an unsupported language. File is not indexed.

0001 SOPTIX.rst : triangulated machinery 
0002 ======================================
0003 
0004 Overview
0005 ----------
0006 
0007 The SOPTIX,SCUDA,SMesh,SGLFW structs were developed to learn how to 
0008 implement a triangulated geometry workflow with the NVIDIA OptiX 7+ API
0009 and also to implement interactive OpenGL rendering of the triangulated geometry.  
0010 
0011 
0012 Structs
0013 ---------
0014 
0015 * SOPTIX.h : top level coordinator of triangulated raytrace render
0016 * SOPTIX_Scene.h : holds vectors of SCUDA_MeshGroup SOPTIX_MeshGroup and OptixInstance 
0017 * SOPTIX_SBT.h : create sbt from pipeline and scene by uploading the prog and hitgroup records
0018 
0019 * SOPTIX_Context.h : OptixDeviceContext + SOPTIX_Properties  
0020 * SOPTIX_Properties.h : optixDeviceContextGetProperty results
0021 
0022 * SOPTIX_Module.h : Create OptixModule from PTX loaded from file
0023 * SOPTIX_Pipeline.h : Create OptixPipeline from OptixModule
0024 * SOPTIX_Options.h : module and pipeline compile/link options
0025 * SOPTIX_OPT.h : enum strings
0026 * SOPTIX.cu : RG, CH progs for simple triangle renderer
0027 * SOPTIX_Params.h : render control 
0028 
0029 * SOPTIX_Accel.h : builds acceleration structure GAS or IAS from the buildInputs
0030 * SOPTIX_Binding.h : CPU/GPU SBT records
0031 * SOPTIX_getPRD.h : unpackPointer from optixPayload
0032 
0033 * SOPTIX_BuildInput_Mesh.h : create OptixBuildInput via "part" indexing into SCUDA_MeshGroup (Used from SOPTIX_MeshGroup)
0034 * SOPTIX_MeshGroup.h : create SOPTIX_BuildInput_Mesh for each part of SCUDA_MeshGroup, use those to form SOPTIX_Accel gas  
0035 
0036 * SCUDA_Mesh.h : uploads SMesh tri and holds SCU_Buf 
0037 * SCUDA_MeshGroup.h : collect vectors of NP from each SMeshGroup sub, upload together with SCU_BufferView 
0038 
0039 * SMeshGroup.h : collection of SMesh subs and names
0040 * SMesh.h : holds tri,vtx,nrm NP either from original G4VSolid conversion or concatenation
0041 
0042 
0043 * SGLFW.h : Light touch OpenGL render loop and key handling
0044 * SGLFW_Keys.h : record of keyboard keys currently held down with modifiers bitfield summarization
0045 * SGLFW_Extras.h : Toggle, GLboolean, bool, GLenum, Attrib, Buffer, VAO 
0046 
0047 
0048 * SGLFW_CUDA.h : Coordinate SCUDA_OutputBuffer and SGLDisplay for display of interop buffers
0049 * SCUDA_OutputBuffer.h : Allows an OpenGL PBO buffer to be accessed from CUDA 
0050 * SGLDisplay.h : OpenGL shader pipeline that presents PBO to screen
0051 
0052 * SGLFW_Program.h : compile and link OpenGL pipeline using shader sources loaded from directory
0053 * SGLFW_Mesh.h : create OpenGL buffers with SMesh and instance data and render
0054 * SGLFW_Scene.h : manage scene data and OpenGL render pipelines 
0055 
0056 
0057 tests
0058 -------
0059 
0060 SGLFW_SOPTIX_Scene_test.{sh,cc}
0061     interactive raytrace visualization of triangulated geometry::
0062 
0063          ~/o/sysrap/tests/SGLFW_SOPTIX_Scene_test.sh
0064 
0065 
0066 SOPTIX_Scene_test.{sh,cc} SOPTIX_Scene_Encapsulated_test.cc
0067     ppm non-interactive raytrace render of triangulated geometry
0068     both non-encapsulated and encapsulated versions can be built
0069     and run with the script::
0070    
0071          ~/o/sysrap/tests/SOPTIX_Scene_test.sh
0072 
0073 
0074 
0075 SOPTIX_Module_test.{sh,cc}
0076     TODO: CHECK
0077 
0078 SOPTIX_Options_test.{sh,cc}
0079     TODO: CHECK
0080 
0081 SOPTIX_Pipeline_test.{sh,cc}
0082     TODO: CHECK
0083 
0084 
0085 
0086 SOPTIX_SBT::initHitgroup
0087 ---------------------------
0088 
0089 HMM: with analytic geometry have "boundary" that 
0090 comes from the CSGNode. To do that with triangles 
0091 need to plant the boundary indices into HitgroupData.  
0092 That means need hitgroup records for each sub-SMesh 
0093 (thats equivalent to each CSGPrim)
0094 
0095 Need nested loop like CSGOptiX/SBT.cc SBT::createHitgroup::
0096  
0097      GAS 
0098         BuildInput       (actually 1:1 with GAS) 
0099            sub-SMesh 
0100 
0101 So need access to scene data to form the SBT 
0102 
0103 
0104 
0105