Download presentation
Presentation is loading. Please wait.
1
Qt driver status / new drivers ?
Laurent Garnier OSUR / INSU / CNRS Geant4 Collaboration Meeting – Ferrara – 12 September 2016 Laurent Garnier - OSUR / Geant4 Collaboration Meeting - 12 Sept Ferrara
2
Updates and bug fixes Laurent Garnier has move from LAL to OSUR, less time to play with Geant4 last year Fix a major bug called « setVisible » on * Linux/Windows * Mac with Qt4 (or with Qt5) Crash log : #1 do_system (line=<optimized out>) at ../sysdeps/posix/system.c:148 #2 TUnixSystem::StackTrace() () from /home/gate/Progs/root_v5/lib/libCore.so #3 TUnixSystem::DispatchSignals(ESignals) () from /home/gate/Progs/root_v5/lib/libCore.so #4 <signal handler called> #5 QWidgetPrivate::showChildren(bool) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #6 QWidgetPrivate::show_helper() () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #7 QWidgetPrivate::showChildren(bool) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #8 QWidgetPrivate::show_helper() () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #9 QWidget::setVisible(bool) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #10 G4UIQt::SessionStart() () from /home/gate/Progs/Geant4/geant p02-install/lib/libG4interfaces.so #11 main () Laurent Garnier - OSUR / Geant4 Collaboration Meeting - 12 Sept Ferrara
3
Updates and bug fixes Making movies : Update parameters to improve the quality Migration to newer OpenGL, ongoing Laurent Garnier - OSUR / Geant4 Collaboration Meeting - 12 Sept Ferrara
4
Newer OpenGL …ongoing G4 CPU GPU G4 CPU GPU G4 CPU GPU
Immediate Mode – OpenGL1.x Geometry specified by vertices Each time a vertex is specified in application, its location is sent to the GPU Old style uses glVertex Creates bottleneck between CPU and GPU Removed from OpenGL 3.1 Stored mode – OpenGL1.x Put all vertex and attribute data in Display List Send Display List to GPU to be rendered immediately Better, but have to send Display List over each time we need another render of it Better than Display List, store on GPU for multiple renderings – OpenGL2.x “Vertex buffer objects” G4 CPU GPU G4 CPU GPU Laurent Garnier - LAL / Geant4 Workshop - 30 Sept Okinawa
5
Newer OpenGL …ongoing But, instead of OpenGL.x, OpenGL2.x had 3 steps : Initialization => InitializeGLView() in OGL Drivers => Not too difficult to implement, all glXXX functions are almost in one function. Filling VBO => ComputeView() in OGL Drivers => Tricky part, glXXX functions are spread in lot of classes ! Rendering => DrawView() in OGL Drivers => Not too difficult to implement, all glXXX functions are almost in one function. Laurent Garnier - LAL / Geant4 Workshop - 30 Sept Okinawa
6
Newer OpenGL …ongoing Example of glOrtho function : VBO
Redefine glOrtho function #define glOrtho fVboDrawer->vboGlOrtho Fragment shader Call our vboGlOrtho function void G4OpenGLVboDrawer::vboGlOrtho(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar) { if (fVboViewer) { if (fVboViewer->isInitialized()) { float a = 2.0f / (right - left); float b = 2.0f / (top - bottom); float c = -2.0f / (zFar – zNear); float tx = - (right + left)/(right - left); float ty = - (top + bottom)/(top - bottom); float tz = - (zFar + zNear)/(zFar - zNear); float ortho[16] = { a, 0, 0, 0, , b, 0, 0, , 0, c, 0, tx, ty, tz, }; glUniformMatrix4fv(fVboViewer->getShaderProjectionMatrix(), 1, 0, ortho); } else { G4cerr << "glFrustum could only be used in GL_PROJECTION mode" << G4endl; } } } } Vertex shader void main(void) { gl_Position = uPMatrix * uCMatrix * uMVMatrix * uTMatrix * vec4(aVertexPosition, 1.0) … Have to change projection matrix Laurent Garnier - LAL / Geant4 Workshop - 30 Sept Okinawa
7
Other drivers ? (from our workplan)
G4DAE exporter: Creation of a new driver in order to export/import Collada format « COLLADA defines an XML Namespace and database schema to make it easy to transport 3D assets between applications without loss of information, enabling diverse 3D authoring and processing tools to be combined into a content production pipeline. » Supported by many softwares: 3ds Max (ColladaMax) / Adobe Photoshop/ Allplan/ ArtiosCAD/ Blender/ Bryce/ Carrara/ Cheddar Cheese Press (model processor)/ Chief Architect Software/ Cinema 4D (MAXON)/ CityEngine/ CityScape/ Clara.io/ DAZ Studio/ Delphi/ E-on Vue 9 xStream/ Esko Studio/ FreeCAD/ FormZ/ GPure/ Houdini (Side Effects Software)/ iBooks Author/ LightWave 3D (v 9.5)/ MakeHuman/ Maya (ColladaMaya)/ MeshLab/ Mobile Model Viewer (Android)/ Modo/ OpenRAVE/ Poser Pro (v 7.0)/ Presagis Creator/ Robot Operating System/ SAP Visual Enterprise Author/ Shade 3D (E Frontier, Mirye)/ Softimage|XSI/ Strata 3D/ Ürban PAD/ Vectorworks/ Visual3D Game Development Tool for Collada scene and model viewing, editing, and exporting/ Wings 3D/ Xcode (v 4.4) / Laurent Garnier - OSUR / Geant4 Collaboration Meeting - 12 Sept Ferrara
8
Other drivers ? (from our workplan)
New tool to support high resolution transparent visualization with abilty to rotate and zoom, able to show, for example, trajectories and hits within a HEP detector Vis driver for ParaView: Creation of a new driver in order to export in a format readable by Paraview (see complete list here, or here for vtk formats) Add PDF3D driver - Universal 3D (U3D) The format is natively supported by the PDF format and 3D objects in U3D format can be inserted into PDF documents and interactively visualized by Acrobat Reader (since version 7). Supported by many sofwares: Adobe Acrobat / Adobe Photoshop CS3, CS4 and CS5 Extended / ArchiCAD/ Bluebeam Revu/ DAZ Studio/ iText/ Jreality/ MeshLab/ MeVisLab/ MicroStation/ Poser 7/ Autodesk Inventor/ SolidWorks/ ArtiosCAD/ SimLab Composer/ SpaceClaim/ SAP VE Author Laurent Garnier - OSUR / Geant4 Collaboration Meeting - 12 Sept Ferrara
9
Other drivers ? (from our workplan)
New tool to support high resolution transparent visualization with abilty to rotate and zoom, able to show, for example, trajectories and hits within a HEP detector Vis driver for ParaView: Creation of a new driver in order to export in a format readable by Paraview (see complete list here, or here for vtk formats) Add PDF3D driver - Universal 3D (U3D) The format is natively supported by the PDF format and 3D objects in U3D format can be inserted into PDF documents and interactively visualized by Acrobat Reader (since version 7). Supported by many sofwares: Adobe Acrobat / Adobe Photoshop CS3, CS4 and CS5 Extended / ArchiCAD/ Bluebeam Revu/ DAZ Studio/ iText/ Jreality/ MeshLab/ MeVisLab/ MicroStation/ Poser 7/ Autodesk Inventor/ SolidWorks/ ArtiosCAD/ SimLab Composer/ SpaceClaim/ SAP VE Author Laurent Garnier - OSUR / Geant4 Collaboration Meeting - 12 Sept Ferrara
10
Other drivers ? Driver for huge amount of small volumes, hide them at some resolution to improve speedup. Octree structure ? Laurent Garnier - OSUR / Geant4 Collaboration Meeting - 12 Sept Ferrara
11
Questions ? Laurent Garnier - OSUR / Geant4 Collaboration Meeting - 12 Sept Ferrara
12
Discussion (from last year // session)
Lots of topics : Save/restore viewpoints DONE Ability to fly-through the scene DONE Magnetic fields visualization, could be improve Newer OpenGL version To be completed Produce image files in batch jobs=> have to be documented Making more video tutorials ? YouTube account ? To be completed (See Plenary session 2) Laurent Garnier - OSUR / Geant4 Collaboration Meeting - 2 Oct Chicago
Similar presentations
© 2025 SlidePlayer.com Inc.
All rights reserved.