Huge CPU Memory+Time Expense
Not a Photo, a Calculation
Much in common : geometry, light sources, optical physics
Many Applications of ray tracing :
OptiX Raytracing Pipeline
Analogous to OpenGL rasterization pipeline:
OptiX makes GPU ray tracing accessible
NVIDIA expertise:
https://developer.nvidia.com/rtx
User provides (Yellow):
[1] Turing+ GPUs eg NVIDIA TITAN RTX
GPU Ray Tracing APIs Converged
NVIDIA OptiX 6->7 : drastically slimmed down
More control/flexibility over everything.
Demands much more developer effort than OptiX 6
NEWS: Major Progress on 6->7 (p11,..)
Opticks : GPU Optical Photons
ε, ε [θ, φ] -> GPU Tex
Separate Textures for each sensor type
On GPU Efficiency Culling
CUDA Thrust stream compaction
Mock angular efficiency test of GPU texture machinery :
IAS < Inst < Solid < Prim < Node
struct CSGFoundry { void upload(); // to GPU ... std::vector<CSGSolid> solid ; // compounds (eg PMT) std::vector<CSGPrim> prim ; std::vector<CSGNode> node ; // shapes, operators std::vector<float4> plan ; // planes std::vector<qat4> tran ; // CSG transforms std::vector<qat4> itra ; // inverse CSG transforms std::vector<qat4> inst ; // instance transforms // entire geometry in four GPU allocations CSGPrim* d_prim ; CSGNode* d_node ; float4* d_plan ; qat4* d_itra ; };
referencing by offset, count
Simple intersect headers, common CPU/GPU types
GAS : Geometry Acceleration Structure
IAS : Instance Acceleration Structure
CSG : Constructive Solid Geometry
1st JUNO Opticks OptiX 7 Ray-trace
Very New CSG "Foundry" CPU/GPU Geometry
Factorize ~300,000 vol -> 10 comp
"progeny digest" characterizes subtree of every volume-node
ridx | plc | prim | component | note |
---|---|---|---|---|
0 | 1 | 3084 | 3084:sWorld | non-repeated remainder |
1 | 25600 | 5 | 5:PMT_3inch_pmt_solid | 4 types of PMT |
2 | 12612 | 5 | 5:NNVTMCPPMTsMask | |
3 | 5000 | 5 | 5:HamamatsuR12860sMask | |
4 | 2400 | 5 | 5:mask_PMT_20inch_vetosMask | |
5 | 590 | 1 | 1:sStrutBallhead | 4 parts of same assembly, BUT not grouped as siblings (not parent-child) |
6 | 590 | 1 | 1:uni1 | |
7 | 590 | 1 | 1:base_steel | |
8 | 590 | 1 | 1:uni_acrylic3 | |
9 | 504 | 130 | 130:sPanel | repeated parts of TT |
Increasing instancing : reduces memory for geometry -> improved performance
Vary Geom. Compare Render Times
Fast render -> Fast simulation
Same viewpoint, vary GPU geometry
Very large range of times 1:600
Table identifies slow geometry to fix :
Good performance for ONLY PMTs :
idx | -e | time(s) | relative | enabled geometry description |
---|---|---|---|---|
0 | 9, | 0.0017 | 0.1702 | ONLY: 130:sPanel |
1 | 7, | 0.0017 | 0.1714 | ONLY: 1:base_steel |
2 | 6, | 0.0019 | 0.1923 | ONLY: 1:uni1 |
3 | 5, | 0.0027 | 0.2780 | ONLY: 1:sStrutBallhead |
4 | 4, | 0.0032 | 0.3268 | ONLY: 5:mask_PMT_20inch_vetosMask |
5 | 1, | 0.0032 | 0.3287 | ONLY: 5:PMT_3inch_pmt_solid |
6 | 2, | 0.0055 | 0.5669 | ONLY: 5:NNVTMCPPMTsMask |
7 | 3, | 0.0074 | 0.7582 | ONLY: 5:HamamatsuR12860sMask |
8 | 1,2,3,4 | 0.0097 | 1.0000 | ONLY PMT |
9 | t8,0 | 0.0099 | 1.0179 | EXCL: 1:uni_acrylic3 3084:sWorld |
10 | 0, | 0.1171 | 12.0293 | ONLY: 3084:sWorld |
11 | t8, | 0.1186 | 12.1769 | EXCL: 1:uni_acrylic3 |
12 | t0, | 0.5278 | 54.2066 | EXCL: 3084:sWorld |
13 | 8, | 0.5310 | 54.5298 | ONLY: 1:uni_acrylic3 |
14 | t3, | 0.6017 | 61.7954 | EXCL: 5:HamamatsuR12860sMask |
15 | t2, | 0.6043 | 62.0620 | EXCL: 5:NNVTMCPPMTsMask |
16 | t5, | 0.6171 | 63.3787 | EXCL: 1:sStrutBallhead |
17 | t6, | 0.6196 | 63.6301 | EXCL: 1:uni1 |
18 | t7, | 0.6226 | 63.9458 | EXCL: 1:base_steel |
19 | t0 | 0.6240 | 64.0879 | 3084:sWorld |
20 | t4, | 0.6243 | 64.1169 | EXCL: 5:mask_PMT_20inch_vetosMask |
21 | t9, | 0.6335 | 65.0636 | EXCL: 130:sPanel |
22 | t1, | 0.6391 | 65.6384 | EXCL: 5:PMT_3inch_pmt_solid |
Next Steps
Opticks : state-of-the-art GPU ray traced optical simulation integrated with Geant4. Geometry progress with OptiX 7 suggests integration within months is achievable.
- Efficiency culling decision moved to GPU, reducing CPU hit memory
- "Foundry" geometry model implemented to support NVIDIA OptiX 7 API.
- First JUNO OptiX 7 renders achieved.
https://bitbucket.org/simoncblyth/opticks | code repository |
https://github.com/simoncblyth/opticks/releases | .zip .tar.gz archives |
https://simoncblyth.bitbucket.io | presentations and videos |
https://groups.io/g/opticks | forum/mailing list archive |
email:opticks+subscribe@groups.io | subscribe to mailing list |