ROOT Users Workshop 28-30 Sep 2005 3D Viewers In ROOT Richard Maunder / Timur Pocheptsov.

Slides:



Advertisements
Similar presentations
COMPUTER GRAPHICS CS 482 – FALL 2014 NOVEMBER 10, 2014 GRAPHICS HARDWARE GRAPHICS PROCESSING UNITS PARALLELISM.
Advertisements

CS 352: Computer Graphics Chapter 7: The Rendering Pipeline.
Graphics Pipeline.
Computer Graphics Lecture 8 Arbitrary Viewing II: More Projection, Clipping and Mathematics of 3D Viewing.
3D Graphics Rendering and Terrain Modeling
CHAPTER 12 Height Maps, Hidden Surface Removal, Clipping and Level of Detail Algorithms © 2008 Cengage Learning EMEA.
CHEP06, Mumbai, India February 2006 ROOT 3 D Graphics René Brun, Olivier Couet, Richard Maunder, Timur Pocheptsov * CERN, Geneva, Switzerland * JINR,
Chapter 6: Vertices to Fragments Part 2 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley Mohan Sridharan Based on Slides.
Vertices and Fragments I CS4395: Computer Graphics 1 Mohan Sridharan Based on slides created by Edward Angel.
LYU0603 A Generic Real-Time Facial Expression Modelling System Supervisor: Prof. Michael R. Lyu Group Member: Cheung Ka Shun ( ) Wong Chi Kin ( )
Tomas Mőller © 2000 Speeding up your game The scene graph Culling techniques Level-of-detail rendering (LODs) Collision detection Resources and pointers.
1 Model View Controller. 2 Outline Review Definitions of MVC Why do we need it? Administiriva Changing the display Event flow Dragging at interactive.
1 CSCE 441: Computer Graphics Hidden Surface Removal (Cont.) Jinxiang Chai.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Models and Architectures Ed Angel Professor of Computer Science, Electrical and Computer.
Ch 1 Intro to Graphics page 1CS 367 First Day Agenda Best course you have ever had (survey) Info Cards Name, , Nickname C / C++ experience, EOS experience.
Introduction to 3D Graphics John E. Laird. Basic Issues u Given a internal model of a 3D world, with textures and light sources how do you project it.
University of Texas at Austin CS 378 – Game Technology Don Fussell CS 378: Computer Game Technology Beyond Meshes Spring 2012.
Hidden Surface Removal
Desktop Publishing Features Designing Documents. Publication Terms  Graphics - Objects used to convey a message.  Multiple Columns - Layout used to.
Pygame Dick Steflik.
AE4131 ABAQUS Lecture Part IV
1 Perception, Illusion and VR HNRS 299, Spring 2008 Lecture 19 Other Graphics Considerations Review.
Zubanov Alexei, 2006 Aug 07 – Sep 28 QtROOT package extension with Coin3D lib.
Technology and Historical Overview. Introduction to 3d Computer Graphics  3D computer graphics is the science, study, and method of projecting a mathematical.
CSE 381 – Advanced Game Programming Basic 3D Graphics
NVIDIA PROPRIETARY AND CONFIDENTIAL Occlusion (HP and NV Extensions) Ashu Rege.
Week 2 - Wednesday CS361.
CS 450: COMPUTER GRAPHICS REVIEW: INTRODUCTION TO COMPUTER GRAPHICS – PART 2 SPRING 2015 DR. MICHAEL J. REALE.
COMPUTER GRAPHICS Hochiminh city University of Technology Faculty of Computer Science and Engineering CHAPTER 01: Graphics System.
CSC 461: Lecture 3 1 CSC461 Lecture 3: Models and Architectures  Objectives –Learn the basic design of a graphics system –Introduce pipeline architecture.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
1Computer Graphics Lecture 4 - Models and Architectures John Shearer Culture Lab – space 2
Lecture 11: Exam Revision 1  Principles of Interactive Graphics  CMSCD2012  Dr David England, Room 718,  ex 2271  Coursework.
Learning Unity. Getting Unity
Computer Graphics Chapter 6 Andreas Savva. 2 Interactive Graphics Graphics provides one of the most natural means of communicating with a computer. Interactive.
1Computer Graphics Implementation II Lecture 16 John Shearer Culture Lab – space 2
Implementation II Ed Angel Professor of Computer Science, Electrical and Computer Engineering, and Media Arts University of New Mexico.
1 Perception and VR MONT 104S, Fall 2008 Lecture 21 More Graphics for VR.
WIRED 4 An extensible generic Event Display Mark Donszelmann SLAC, Stanford, U.S.A. CHEP2004, 27 september – 1 october Interlaken, Switzerland.
PowerPoint Basics Tutorial 3: Graphics In this tutorial we’ll be looking at graphics, and the various types of illustrations that can be included in a.
3D Viewers Two main uses: –Detector/event exploration – interactivity priority (15fps min). –Generate presentation material (still/movie renders) – quality.
Implementation II.
CSCE 552 Spring D Models By Jijun Tang. Triangles Fundamental primitive of pipelines  Everything else constructed from them  (except lines and.
INTRODUCTION GORT is a virtual 3D modeling environment for computer programmers. Its main area of focus is to aid in the education of programmers learning.
Review on Graphics Basics. Outline Polygon rendering pipeline Affine transformations Projective transformations Lighting and shading From vertices to.
In the name of God Computer Graphics.
ROOT: 3D Graphics R. Maunder 1), T.Pocheptsov 4) 1) CERN – European Organization for Nuclear Research, Geneva, Switzerland 4) Joint Institute for Nuclear.
Ray Tracing Fall, Introduction Simple idea  Forward Mapping  Natural phenomenon infinite number of rays from light source to object to viewer.
Computer Graphics I, Fall 2010 Implementation II.
COMPUTER GRAPHICS CS 482 – FALL 2015 SEPTEMBER 29, 2015 RENDERING RASTERIZATION RAY CASTING PROGRAMMABLE SHADERS.
Visualization Recreate the ping pong scene in 3D using ball and racket coordinates.
Chapter 1 Graphics Systems and Models Models and Architectures.
1 E. Angel and D. Shreiner: Interactive Computer Graphics 6E © Addison-Wesley 2012 Models and Architectures 靜宜大學 資訊工程系 蔡奇偉 副教授 2012.
UNIT 11: 3D AutoCAD Objectives: How to print or plot a drawing How to setup a layout using title blocks and viewports Create and manage new layouts Be.
Microsoft Publisher 2010 Lesson 4 Graphics in Publications.
Chapter 7 Vector Editing © 2013 Cengage Learning. All Rights Reserved. May not be scanned, copied or duplicated, or posted to a publicly accessible website,
Image Fusion In Real-time, on a PC. Goals Interactive display of volume data in 3D –Allow more than one data set –Allow fusion of different modalities.
Institute for Computer Graphics and Vision Computer Graphics and Interactive Systems 1 Grabner HS i4, 2006/03/08 Web3D, VRVU, SGP Web3D ( ) VRVU.
GL Viewer Status. Work Done Rewrite of prototype (shape drawing code kept) Support for: Scene container – shared between viewers. Scene Rebuilds – viewer.
COMPUTER GRAPHICS CHAPTER 38 CS 482 – Fall 2017 GRAPHICS HARDWARE
Scene Manager Creates and places movable objects like lights and cameras so as to access them efficiently, e.g. for rendering. Loads and assembles world.
Computer Graphics Implementation II
In the name of God Computer Graphics.
Static picture effects for PowerPoint slides
ROOT: 3D Graphics Viewer Architecture
Static picture effects for PowerPoint slides
Models and Architectures
Implementation II Ed Angel Professor Emeritus of Computer Science
Lecture 13 Clipping & Scan Conversion
Implementation II Ed Angel Professor Emeritus of Computer Science
Presentation transcript:

ROOT Users Workshop Sep D Viewers In ROOT Richard Maunder / Timur Pocheptsov

Richard Maunder ROOT Users Workshop Sep Overview General Viewer Architecture GL Architecture GL Features GL Performance Conclusion

Richard Maunder ROOT Users Workshop Sep General Architecture I All current and future 3D viewers share common external infrastructure: TVirtualViewer3D interface: Test viewer preferences and capabilities. Adding objects – including composite operations. Control the viewer via scripting etc. TBuffer3D class hierarchy: Describe 3D objects ("shapes"). Split into sections, filled by negotiation with viewer. Base TBuffer3D for common sections TBuffer3D sufficient for any object in raw tessellated* form Subclasses for abstract shapes which viewer(s) can tessellate natively These enable: Decoupling of producers (geometry packages etc) who model collection of 3D objects from consumers (viewers) which display. Producer free of explicit drawing code & viewer specific branching. Support differing viewers and clients efficiently: Local/global frame Bounding boxes Individual objects / placed copies

Richard Maunder ROOT Users Workshop Sep General Architecture II

Richard Maunder ROOT Users Workshop Sep GL Architecture X3D and Pad simple viewers: Accept all objects send – with no caching or detection of copied placements. No viewer side tessellation – always request Raw section of TBuffer3D to be filled. By contrast GL: Only accept subset of objects considered ‘of interest’ at present into viewer. Viewer can prompt external client to rebuild scene of objects when camera limits have changed significantly. Can request client not to send contained children of object via TVV3D::AddObject() return – for efficiency. Enables viewer to connect to very large geometries without overloading - pull required parts on demand. Detect repeated placement of same object (logical) in different 3D locations (physical). Lazy caching of logicals (with expensive internal or externally created tessellation) and physicals. Native OpenGL shapes: TBuffer3DSphere - solid, hollow and cut spheres* TBuffer3DTubeSeg - angle tube segment TBuffer3DCutTube - angle tube segment with plane cut ends. Scene rebuild through binding to pad –TPad::Paint. Remove – make all communication with external client via signals (publish scene, selection change)

Richard Maunder ROOT Users Workshop Sep GL Architecture : Scene Rebuilds I

Richard Maunder ROOT Users Workshop Sep GL Architecture : Scene Rebuilds II

Richard Maunder ROOT Users Workshop Sep GL Architecture : Scene Rebuilds III

Richard Maunder ROOT Users Workshop Sep GL Features : Rendering 3 draw styles Added support for single frame pdf and eps output. Composite (CSG) shapes Both TGeoComposite and general cases via TVirtualViewer3D interface: virtual Bool_t OpenComposite(const TBuffer3D & buffer, Bool_t * addChildren = 0) = 0; virtual void CloseComposite() = 0; virtual void AddCompositeOp(UInt_t operation) = 0; kCSUnion, kCSIntersection, kCSDifference, kCSNoOp Not supported in X3D/Pad viewers – each composite component treated as individual object. Wireframe Filled polygons Outline +=+=

Richard Maunder ROOT Users Workshop Sep GL Features : Cameras Improved interactions Shift: x 10 Ctrl: x 0.1 Shift+Ctrl: x 0.01 Double click reset ‘Heads up’ camera – first person shooting games. Orbit round own axis with mouse – truck with arrow keys. Box zoom, frame all/selected. Orbit rotate round scene center Left Mouse + Drag Dolly move camera in/out along eye line Right Mouse + Horizontal Drag Truck pan parallel to film plane Middle Mouse + Drag arrow keys Zoom adjust lens field of view Mouse Wheel j / k keys

Richard Maunder ROOT Users Workshop Sep GL Features : Manipulators Add in-viewer manipulators for direct control of object Translation & scaling along objects local axis. Rotation of these local axis. Implemented for clipping objects – trivial to extend for all objects.

Richard Maunder ROOT Users Workshop Sep GL Features : Clipping

Richard Maunder ROOT Users Workshop Sep GL Features : Clipping Two techniques OpenGL® Clip Planes: Multiple renders, each with one or more clip planes, combine together ++ = + Fast and simple, interactive (few planes) - Accurate only for shapes described by planes – bounding box approx otherwise. - Clipped solids not capped –hollow. CSG Operation: Add all object meshes (o1..on), subtract clipping object mesh (c) o1 + o2 + …… + on – c + Any arbitrary clipping shape possible + Proper capping of solids - Cannot adjust interactively Can clip away inside or outside the clip shape by negating planes or CSG operation. Separate 3D object collections with different clipping – e.g. detector geometry inside, events outside. Support both methods: clip planes for interactive setup (soon), CSG for high quality renders.

Richard Maunder ROOT Users Workshop Sep GL Features : GL – in - TPad Existing TPad/TCanvas has support for: 2D via TVirtualX (X11/Win32 platform APIs) 3D outlines via TView 3D -> 2D projection 3D filled objects via ray tracing New method added: Embedded OpenGL view, mixed with normal 2D graphics 2D via TVirtualX (as now) 3D via OpenGL Enable with gStyle->SetCanvasPreferGL(kTRUE) OpenGL is rendered into offscreen pixmap Bitmap and normal GL Window handled by TGLManager Advantages: Gain all the features of the standalone GL viewer. Only minor modifications in existing TPad \TCanvas code. No need to duplicate 2D drawing in OpenGL. Disadvantages: OpenGL may not be accelerated by graphics hardware – not ideal for complex geometries. But still faster than ray tracing. 2D 3D TView TPad/TCanvas TVirtualX Window Pixmap OpenGL

Richard Maunder ROOT Users Workshop Sep GL Performance : Culling Frustum Culling: Discard objects outside camera. Test scene bounding first – if visible, all objects visible. Otherwise test each shape BB - skip drawing those outside. Significant 5-10x speed up (when viewing portion of scene) Contribution Culling: Discard small objects – part of LOD. Occlusion Culling: Object masked by others. Potentially v useful given ‘onion’ layout of detector geometries. But complicated - transparency, cut objects. Left to OpenGL at present.

Richard Maunder ROOT Users Workshop Sep GL Performance : Object Draws Added generic support for: Level of Detail (LOD) scheme Tessellate object at detail suitable for projected size + GL performance. Distribute GPU power better: 5-10 x speed up for ‘same quality’ Draw() methods take UInt_t LOD – quality factor 0 – 100% LOD found from object bounding box projected onto screen Combined with Global LOD to factor in overall GL performance. Display Lists ‘Pre-compile’ draw command into efficient hardware specific GL format. Added singleton DL cache – based on object ID and LOD. Simple auto capture of any TGLDrawable by setting flags. Only TGLSphere (gluSphere) taking advantage at present – major Add more native shape types (common) supporting LOD + enable DL caching. Support high quality tessellation - degrade internally in response to LOD (various techniques) Add memory management in DisplayList cache – purge least frequent / oldest one to avoid thrashing.

Richard Maunder ROOT Users Workshop Sep GL Performance : Scene Draws Two-pass rendering of scene Interactive – speed: Lower Global LOD – fixed 50% presently. Skip very low Draw LOD (projected size) objects Use sorted draw list: large -> small based on object bbox volume (true size). Time limited – 100msec (10 fps) – rest discarded. Ensure responsiveness with wide variety of hardware / software GL performance. Final – quality: Unlimited time, everything drawn, Global LOD = 100% Interrupt/pause final pass render when GUI event enters queue – continue/terminate. Skip interactive if can complete final render in time slot. Make Global LOD settings dependent on performance. Split ‘quality’ pass into multiple accumulations – so low performance hardware can gradually ‘fill in’ details over extended (10 sec+) period, without stalling. Retain static draw buffers (geometry) – redraw varying (tracks/particles) over top.

Richard Maunder ROOT Users Workshop Sep Conclusion 3D Architecture: Now stable – can extend easily for extra shapes etc Add extensions for: Scripted control of viewer via TVV3D - clipping, cameras, lights. Efficient collections of particles/tracks. Need user input on these. GL Viewer: Internal structure now fairly stable + suitable for detector geometry. Complete clipping and GL-in-Pad. More native GL shapes to take advantage of performance/quality features. General components for event display.