GSoC/GCI Archive
Google Code-in 2014 BRL-CAD

Profile NURBS prep performance

completed by: Andromeda Galaxy

mentors: Isaac Kamga, Kesha Shah

BRL-CAD implements support for rendering of NURBS representation geometry. If you import a solid 3DM or STEP format model into BRL-CAD, it will import as BREP/NURBS geometry. Opening that geometry in BRL-CAD's MGED editor will tell you what objects are available and our 'rt' tool will raytrace it. When geometry is ray traced, it first goes through a ''prep'' phase and then it starts shooting rays. Our prep phase is entirely unoptimized so we'd like to know where all the time is presently being spent during prep..

This task involves importing some NURBS geometry into BRL-CAD and ray tracing that geometry with a profiler watching our prep performance. Any profiler will do, including gprof, but a performance monitor like oprofile or the Mac ''Instruments'' application (or Shark) are preferred.

Learning how to use a profiler is beyond the scope of this task, so it make take you considerably longer to provide us with useful information if you've never run a profiler before.

To capture prep performance, you will need to import some fairly complex geometry. You should be able to search google with ''filetype:3dm'' or ''filetype:step'' or find something on to import

Running ''tops'' within mged will tell you what geometry is available for rendering.

Running ''rt -o file.png -s32'' on the system command line (not inside mged) should minimize the ray overhead or you can specifically isolate the prep phase we care about. Prep is the time between when rt is run where it opens a window until the first pixels are fired and pixels start filling in.