NVIDIA Scene Graph Leveraging the World's Fastest Scene Graph
Total Page:16
File Type:pdf, Size:1020Kb
NVSG – NVIDIA Scene Graph Leveraging the World's Fastest Scene Graph © 2008 NVIDIA Corporation. Agenda • Overview NVSG • Shader integration • Interactive ray tracing • Multi-GPU support © 2008 NVIDIA Corporation. NVIDIA Scene Graph (NVSG) The first cross-platform scene graph with full hardware shading support through latest visual computing technology to achieve a new level of realism. © 2008 NVIDIA Corporation. Why use NVSG? Performance Support from NVIDIA Reduces amount of data The global leader in Structures data to allow computer graphics culling and sorting Productivity No-cost tool Manages graphics hardware, reducing requirement for License free of charge OpenGL coding Shading Takes full advantage of Scalability Cg/CgFX/MetaSL Works seamlessly with Abstracts low-level shader complex hardware work configurations NVIDIA SLI ready © 2008 NVIDIA Corporation. Markets • Automotive • Training & Visualization • Vis-Sim • Virtual Reality • Broadcasting • Digital Studio • Gaming • Oil&Gas • Misc... © 2008 NVIDIA Corporation. NVSG - „NVIDIA Scene Graph” • C++ scene-graph API • OS Independent • Multi-thread safe • Fast • Shader support • Cluster aware • Latest GPU support • Easy to use • Easy to extend • Future proof • Free to NVIDIA developers © 2008 NVIDIA Corporation. NVSG Software Stack 3D Application Loader & Saver Plug-ins NVSG Cg-Runtime 3D API CUDA GPU © 2008 NVIDIA Corporation. Device-Independent Rendering NVSG OpenGL DirectX Ray Tracing Vendor-Neutral CUDA- Compatible Hardware Hardware © 2008 NVIDIA Corporation. Plug-in Architecture NVSG Plug-In Framework I18N Translation Loader API Saver API DLL / SO I U I U D M S D M S B A E B A E G R G R E E © 2008 NVIDIA Corporation. Interchange Formats DCC • Creator Shader Authoring •Catia •Maya • FXComposer • 3D Studio Max • mental mill COLLADA OpenFlight OBJ VRML PLY nbf/nvsg CgFX MetaSL others... Image Generator • NVSG © 2008 NVIDIA Corporation. Differing Render Targets • Framebuffer • FBO • 2D Overlay • Ray Tracing • Broadcast Graphics Hardware • Transform Feedback • Gelato © 2008 NVIDIA Corporation. Shadows, Effects, Skinning © 2008 NVIDIA Corporation. GUI, Menus, overlays,... © 2008 NVIDIA Corporation. GVO / SDI Broadcast Graphics • Uncompressed 8-, 10-, or 12-bit SDI formats • Enabling a direct connection to broadcast monitors, switchers, tape decks, or SDI projectors. • Source code example GVOWinRenderArea NVAPI © 2008 NVIDIA Corporation. Multipass Rendering • Depth of Field • Order Independent Transparency • FSAA • Stereo (implementation dependent) © 2008 NVIDIA Corporation. Order Independent Transparency Without OIT With OIT © 2008 NVIDIA Corporation. Improved FSAA Quality No FSAA 16x MPAA MPAA: Combine HW FSAA with Software controlled FSAA to get benefits from both worlds: maintain speed and quality © 2008 NVIDIA Corporation. Stereo • Quadbuffered Stereo • Passive stereo with independent outputs © 2008 NVIDIA Corporation. Active Stereo Sequential Projection of both Views left/right Eye flipping -> Active Compute R left/right Eye 3D Modell L Views Screen 3D Effect through Shutter Glasses -> Active © 2008 NVIDIA Corporation. Passive Stereo Permant L Horizontal Projection of both Polarization Views Filter no left/right Eye flipping -> Passive L Compute left/right Eye 3D Modell Screen Views R R Vertical 3D Effect through Polarization Polarized Glasses no Filter Shutter -> Passive © 2008 NVIDIA Corporation. Improved Skinning • Usage of skinning processors • CPU skinning processor • GPU skinning • minimal requirement: Shader Model 4 • Future: CUDA skinning Scene Old Skinning CPU Skinning GPU Skinning Chameleon.nbf 12 66 975 Hatealien.nbf 12 61 760 Seymour.dae na 66 850 © 2008 NVIDIA Corporation. Skinning Implementation Scene Preparation App Traverser Skinning Processor Cull Traverser Cull Traverser Render Traverser CPU GPU CUDA © 2008 NVIDIA Corporation. Skinning Processors - CPU Vertex Attribute INPUT VBO Set R A S T E Influence Data (Sys Mem) R CPU Processor OUTPUT VBO I Z Skin Weights / Indices A v′ = w M v T Xform ∑ j j I Matrices j O N CgFX Effect © 2008 NVIDIA Corporation. Skinning Processors - GPU Vertex Attribute INPUT VBO Set R A S T E Influence Data (Textures) Cg Geometry R Program OUTPUT VBO I Z Skin Weights / Indices A T Transform I Xform Feedback Matrices O N ′ v= ∑ wj M j v j CgFX Effect © 2008 NVIDIA Corporation. Shaders - Cg • GPU Shading language inspired by C • API-independent • OpenGL or Direct3D • Platform-independent • NVIDIA, AMD/ATI, PS3 • Windows, Linux, MacOS X, Solaris • Hardware and API variation managed with “profiles” • Profile = execution environment + compiled program format • Profiles can determine • How types are represented • Available standard library routines • Semantics of execution • Part of 3D content creation tool chains Write your shaders in Cg; deploy them to any API or platform © 2008 NVIDIA Corporation. Cg software stack 3D Application or Game Cg Run-time Cg Compiler API Cg 3D API interface: CgGL or CgD3D 3D API OpenGL or Direct3D Graphics Processing Unit (GPU) © 2008 NVIDIA Corporation. CgFX support Metafile format used for shader description. The CgFX runtime takes care where to put textures and other information for the shader No shader specific C/C++ code needed! Shader Authoring Tool Integration • Shader authoring tools • FXComposer • mental mill Visual programming Drag & Drop Debugging © 2008 NVIDIA Corporation. mental mill® Shader creation for all levels of technical expertise • Shader creation without programming for non-technical users and Artists • Familiar graph editing paradigm • Simple parameter editing © 2008 NVIDIA Corporation. MetaSLTM Easy to use meta language for shader writers • Shaders can be exported for use in: mental ray® FX Composer 2.5 NVSG © 2008 NVIDIA Corporation. Workflow – Shader Integration FXComposer MetaSL MetaSL & Phenomenon Compiler CgFX NVSG API CgFx StateAttribute Cg-runtime & Compiler © 2008 NVIDIA Corporation. Interactive Ray Tracing • CUDA Everywhere • Low Level: SDK • High Level: NVSG Integration © 2008 NVIDIA Corporation. Ray Tracing SDK • C++ SDK • Shader-based (CUDA*) • Dynamic Scenes • Hybrid rasterization/ray tracing • Use the right tools to get maximum performance and quality © 2008 NVIDIA Corporation. RT Scene Traversal in NVSG NVSG Scene App Traverser App Traverser Ray Tracing Traverser Cull Traverser Cull Traverser RT-API CUDA GL Traverser OpenGL OpenGL © 2008 NVIDIA Corporation. Ray Tracing Shaders in NVSG NVSG Scene CgFX MetaSL CgFX CgFX Rasterized MetaSL Compiler Cg Runtime Ray Traced OpenGL / DX iRT SDK Ray Tracing Engine © 2008 NVIDIA Corporation. MGPU SDK - NVScale • Image compositor for sort first and sort last based applications • Screen tiling, alpha and depth based compositing • Platforms: win32/64, linux 64 • Compositor implementation based on latest technologies, no migration effort for applications (next gen hardware will provide faster transport) • Configurable: 1-1, n-1, hierarchical 1 2 1 2 + + 1 2 12 Screen Tiling Alpha compositing + + + + Depth compositing Hierarchical compositing© 2008 NVIDIA Corporation. Distributed rendering with NVSG GLDistributedRenderArea RenderTraverser • Clients must derive from this and integrate with windowing system • Optionally select GPUs to be used DistributedRendGLTraverser • Uses MGPUSDK for image composition GLDistributedTraverser DistributionTraverser RenderArea • Assigns GPUs to handle scene graph objects based on distribution scheme DistributedRenderArea • Distribution scheme assigns objects to optimally balance load on GPUs GLDistributedTraverser GLDistributedRenderArea • Multiple instances (one per GPU) • Instances run in parallel ClientDistributedRenderArea • Each instance only renders objects assigned to its GPU • Triggers image composition when ready © 2008 NVIDIA Corporation. Dinosaurs in the Museum Model characteristics: • Model designed in Maya, AutoDesk • 217 Million Triangles Rendering Hardware: • HP xw8600 with 32 GB System Memory • 2xD2’s with 16GB total video memory Rendering Performance: © 2008 NVIDIA Corporation. Total max. triangle throughput = 1.3 GTri/s Thank You! Feedback & Questions: [email protected] © 2008 NVIDIA Corporation..