Fill in the Blanks. Sushrut Pavanaskar History • Solid modeling (e.g. Solidworks, Catia, Pro-E..) • Use of NURBS, Trimmed – Extreme control – Well developed utilities • HEAVY Complex models • Need math to compute – GPU: Dedicated Hardware • Our research – evaluation parallelized Blanks (Gaps/Cracks) • NURBS model = many surfaces • GPU evaluation is parallel • Neighbors don’t know – So they don’t match! • CRACKS • NOT acceptable – MUST be removed Anticipated Work • Determination of cracks with IDs – Contours, external edges need not be filled • • • • Determination of edges, colors to be filled in Actual computation of areas to fill Filling in appropriate direction Challenges – – – – All this to be done on the GPU frag. Shader No neighbor information available No curvature information available This has to be quick – does no value addition Determination of a CRACK • First pass over current view port for IDs • Reads and keeps ID_Tex on the GPU itself • “Cracks” seen clearly Cracks and Neighborhood • Cracks have nonmatching IDs • But could be anything Types • SurA – Bk – SurB – Not always a crack! • SurA – SurX – SurB – SurX can be SurA/B • Bk – SurA (Silhouette) – I need not care for them Real Issue of “knowledge” • Fragment shader knows nothing @ neighbors – Just knows about that fragment, and IDs of neigh • Fragment shader (GPU) cant color anything – It can just permit rendering or not • When rendering, no “knowledge” of surfaces – So no filling there • GPU CPU data transfer takes time! – So SurfaceIDs available only to fragment shader Anticipated work • Determination of cracks with IDs – Contours, external edges need not be filled • • • • Determination of edges, colors to be filled in Actual computation of areas to fill Filling in appropriate direction Challenges – – – – All this to be done on the GPU frag. Shader No neighbor information available No curvature information available This has to be quick – does no value addition Solution (as anticipated) - Edges • Reading the edges – More technical challenge than geometrical – Read ACIS data structure – Loop through, enquire, read and store colors • Coloring for OPENGL – readily done – kdcolor, kscolor, ka use with normals • Sampled edge for 10 parametrically equidistant points, stored as “edge-points” Triangle Strip Surrounding the Edge • Can know exact properties of edge, – So draw edge quads, but render selectively (Un)anticipated Work • Model space Screen space – Wanted triangle strips on screen space – But edges in model space • Use OPENGL transformation + view matrix – Invert, calculate quad dimensions, re-invert • All drawing is done in model space Dealing with Silhouette Edges • Used out-normal of edge • Dot prod with view vector – Same sign => render – Diff sign => don’t • Still a preliminary test – Sometimes “ab”-normals Preliminary Result