460 likes | 636 Views
"Powerful GPU techniques for next generation visualization engines” spring 2010 . Henrik Lieng Tomas Osland Tobias Lie Andersen. Sf Constructor. - Interactive visualization of CAD data. Bachelor Description. - "Powerful GPU techniques for next generation visualization engines".
E N D
"Powerful GPU techniques for next generation visualization engines”spring 2010 Henrik Lieng Tomas Osland Tobias Lie Andersen.
Sf Constructor - Interactive visualization of CAD data
Bachelor Description - "Powerful GPU techniques for next generation visualization engines"
Raw LASER SCAN DATA Laser scanners produce point clouds
OUTLIER REMOVAL Use standard deviation to trim the point set.
simplification Consider our world as a grid. Each cell in this grid can only contain one point
DELAUNAY BASED SURFACE RECONSTRUCTION USING SCALAR FIELDS • Some key concepts: • Convex and concave set: convex set concave set property of: Wikipedia
Key consepts • Convex hull • Scalar field • Voxel
Delaunay 3D triangulation • A polygon is valid if its circumscribed sphere is empty • Figure taken from cgal.org
Delaunay and concave sets • Delaunay triangulation is a projection of a convex hull
Comparison with other methods Ball Pivoting • Our method
Comparison with other methods Ball Pivoting • Our method
Project assessment • Initial milestone plan
Ray-tracing Principles of Ray tracing: We cast a ray for every point on the screen. What this point will show depends on what the ray hits.
Optix realtime ray-tracer • Ray tracing engine with extreme performance. • Take advantage of the multi-thread capabilities of graphics cards. • Programming language: Cuda (like C) CUDA SceniX
Sub tasks Create a scene that uses Optix shaders Create a Optix Program with reflections Create a Optix Program that creates a specular reflection map
Sub tasks (part 2) Create the reflections without rendering the scene to the screen. Obtain the specular reflection map from the Optix shader Render scene with both rasterization and ray tracing.
Optimization • Two limits: • How far rays can travel • How far from the eye reflections can be made
Optimization Optimized: 26% performance improvement Original
Project assessment • Good looking results • Optimization gave a performance boost • The two renderings can be better merged
Milestones Set up environment OpenGL light sprites SceniX light sprites with models Procedural light sprites with Cg shader
Loading positions intFileLoader::loadCoordinates( const std::string &filename, std::vector< nvmath::Vec3f > &coords) { std::ifstreaminstream; intnumVecs = 0; intnumElm = 0; float x, y, z, input; instream.open(filename.c_str()); while(instream >> input) { if(numElm % 3 == 0) { z = input; } else if(numElm % 3 == 1) { x = input; } else if(numElm % 3 == 2) { y = input; numVecs++; coords.push_back( nvmath::Vec3f( x, y - 15.0, z) ); } numElm++; } return numVecs; }
Vertex shader VertexOutputVertexMain(float4 position: POSITION, float4 color: COLOR, uniform float4x4 modelviewproj) { VertexOutput OUT; float n = 0.0; n = noise(position.xy) + 2.0 * 0.4; OUT.position = mul(modelviewproj, position); OUT.texcoord = position; OUT.color = color * (n / 4.0); return OUT; }
Fragment shader FragmentOutputFragmentMain(float4 color: COLOR, VertexOutput IN) { FragmentOutput OUT; float n = 1.0; if(IN.texcoord.y > 0.0) { n *= (100.0 - IN.texcoord.y) / 100.0; } else if(IN.texcoord.y < 0.0) { n *= (100.0 + IN.texcoord.y) / 100.0; } if(IN.texcoord.x < 0.0) { n *= (450.0 + IN.texcoord.x) / 100.0; } else if(IN.texcoord.x > 0.0) { n *= (450.0 - IN.texcoord.x) / 100.0; } OUT.color = color * n; return OUT; }
Project assessment The assignment were completed according to Stormfjords requirements. Efficiency boost using procedural textures. Image texture 53.0 fps Procedural texture 59.9 fps Some downsides Light data must be found manually Two procedural shaders are used
Overall Conclusion A difficult but educational project Much research Good planning on all parts of the assignment Employer expressed satisfaction with our work