Hi Andy, > J-S, did you get to do any timing with my proposed use of doubles in the > intersection code?
I did some tests last night. Full results below. The "executive summary" is this: For 2,244,800 samples (individual ray tests), Floats: 113.121566 seconds (original) Doubles: 113.954178 seconds (your patch) Difference: ~0.730655 % Floats: 19844.138 samples / second Doubles: 19699.146 samples / second So with doubles, it is less than one percent slower, which I don't think is significant over that many samples... I did not have the time to do multiple tests though (because that 0.7% might even be due to some other activity on my machine) but I think we can safely say it's not a significant difference. You can quote me on that :-) BTW, for reference, using the kdtree took 13.366302 seconds to do the same thing :-) See below. Hope this helps, J-S Detailed results: =================================================================== LineSegmentIntersector, float (original) =================================================================== - Parsing command-line arguments. Using 5 bands (25 coefficients) and 400 samples per vertex. Deleting previously calculated data files to recalculate them. - Loading model file data/PRT_test_scene_9b.ive. - Optimizing model data/PRT_test_scene_9b.ive. - Loading/Computing SH coefficients for lighting [L] Checking for precomputed radiance transfer data file data/PRT_test_scene_9b/lighting_25_400.prt: Not found. Computing. 0.534819 seconds. (747.917 samples/sec) [DS] Checking for precomputed radiance transfer data file data/PRT_test_scene_9b/Wall2_geode_0_25_400_DS.prt: Not found. Computing. (1017 vertices) 15.1999 seconds. (26763.4 samples/sec) [DS] Checking for precomputed radiance transfer data file data/PRT_test_scene_9b/Wall1_geode_0_25_400_DS.prt: Not found. Computing. (930 vertices) 13.9724 seconds. (26624 samples/sec) [DS] Checking for precomputed radiance transfer data file data/PRT_test_scene_9b/Floor_geode_0_25_400_DS.prt: Not found. Computing. (1596 vertices) 21.7206 seconds. (29391.5 samples/sec) [DS] Checking for precomputed radiance transfer data file data/PRT_test_scene_9b/Sphere_geode_0_25_400_DS.prt: Not found. Computing. (1040 vertices) 40.901 seconds. (10170.9 samples/sec) [DS] Checking for precomputed radiance transfer data file data/PRT_test_scene_9b/Cube_geode_0_25_400_DS.prt: Not found. Computing. (1029 vertices) 21.3278 seconds. (19298.8 samples/sec) Total time for loading transfer functions: 113.121566 seconds. Total loading/computing time: 113.657229 seconds. Precalculation done, exiting. =================================================================== LineSegmentIntersector, double (Andy Skinner's modification) =================================================================== - Parsing command-line arguments. Using 5 bands (25 coefficients) and 400 samples per vertex. Deleting previously calculated data files to recalculate them. - Loading model file data/PRT_test_scene_9b.ive. - Optimizing model data/PRT_test_scene_9b.ive. - Loading/Computing SH coefficients for lighting [L] Checking for precomputed radiance transfer data file data/PRT_test_scene_9b/lighting_25_400.prt: Not found. Computing. 0.524556 seconds. (762.55 samples/sec) [DS] Checking for precomputed radiance transfer data file data/PRT_test_scene_9b/Wall2_geode_0_25_400_DS.prt: Not found. Computing. (1017 vertices) 15.6853 seconds. (25935.1 samples/sec) [DS] Checking for precomputed radiance transfer data file data/PRT_test_scene_9b/Wall1_geode_0_25_400_DS.prt: Not found. Computing. (930 vertices) 14.2079 seconds. (26182.6 samples/sec) [DS] Checking for precomputed radiance transfer data file data/PRT_test_scene_9b/Floor_geode_0_25_400_DS.prt: Not found. Computing. (1596 vertices) 21.8676 seconds. (29193.9 samples/sec) [DS] Checking for precomputed radiance transfer data file data/PRT_test_scene_9b/Sphere_geode_0_25_400_DS.prt: Not found. Computing. (1040 vertices) 40.8934 seconds. (10172.8 samples/sec) [DS] Checking for precomputed radiance transfer data file data/PRT_test_scene_9b/Cube_geode_0_25_400_DS.prt: Not found. Computing. (1029 vertices) 21.3 seconds. (19324 samples/sec) Total time for loading transfer functions: 113.954178 seconds. Total loading/computing time: 114.479672 seconds. Precalculation done, exiting. =================================================================== Adrian Egli's kdtree =================================================================== - Parsing command-line arguments. Using 5 bands (25 coefficients) and 400 samples per vertex. Deleting previously calculated data files to recalculate them. - Loading model file data/PRT_test_scene_9b.ive. - Optimizing model data/PRT_test_scene_9b.ive. - Loading/Computing SH coefficients for lighting [L] Checking for precomputed radiance transfer data file data/PRT_test_scene_9b/lighting_25_400.prt: Not found. Computing. 0.524088 seconds. (763.23 samples/sec) [DS] Checking for precomputed radiance transfer data file data/PRT_test_scene_9b/Wall2_geode_0_25_400_DS.prt: Not found. Computing. (1017 vertices) 2.50832 seconds. (162181 samples/sec) [DS] Checking for precomputed radiance transfer data file data/PRT_test_scene_9b/Wall1_geode_0_25_400_DS.prt: Not found. Computing. (930 vertices) 2.11397 seconds. (175972 samples/sec) [DS] Checking for precomputed radiance transfer data file data/PRT_test_scene_9b/Floor_geode_0_25_400_DS.prt: Not found. Computing. (1596 vertices) 3.74179 seconds. (170614 samples/se c) [DS] Checking for precomputed radiance transfer data file data/PRT_test_scene_9b/Sphere_geode_0_25_400_DS.prt: Not found. Computing. (1040 vertices) 2.27624 seconds. (182758 samples/sec) [DS] Checking for precomputed radiance transfer data file data/PRT_test_scene_9b/Cube_geode_0_25_400_DS.prt: Not found. Computing. (1029 vertices) 2.72599 seconds. (150991 samples/sec) Total time for loading transfer functions: 13.366302 seconds. Total loading/computing time: 13.891279 seconds. Precalculation done, exiting. -- ______________________________________________________ Jean-Sebastien Guay [EMAIL PROTECTED] http://www.cm-labs.com/ http://whitestar02.webhop.org/ _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org