fluka raytracer 04/09
DESCRIPTION
Presentation of the FLUKA Raytracer. It is finished now ;)TRANSCRIPT
Fluka Raytracer - Outline
● Why?● Alternative solutions● How raytracing works● Implementation in FLUKA● Problem solving● Samples● Time schedule● Future improvements
Fluka Raytracer - Why?
● The current geometry is complex to visualize● External visualization tools with separate
development● FLUKA only plots 2 dimensional plane cuts● Lack of interactivity
Fluka Raytracer – Alternative Solutions
● OpenGL: Realtime viewport of the geometry mesh in Flair
● Raytracing● External: Using Povray as renderer● Internal: Using the FLUKA geometry engine
Fluka Raytracer – AlternativesSpeed Correction Dependencies Features
OpenGL viewport in Flair
●Initial conversion &syncrhonization●Realtime visualization
Lots of inaccuracies
●Opengl libraries●External math. libraries
●Hardware?
✔Realtime✔ Interactive✔User friendly
External RT.With PovRay
Internal FLUKA RT.
Fluka Raytracer – AlternativesSpeed Correction Dependencies Features
OpenGL viewport in Flair
●Initial conversion &syncrhonization●Realtime visualization
Lots of inaccuracies
●Opengl libraries●External math. libraries
●Hardware?
✔Realtime✔ Interactive✔User friendly
External RT.With PovRay
●Slow Some inaccuracies
●PovRay ✔PovRay is a well-known raytracer
✔Optimized✔Community
Internal FLUKA RT.
Fluka Raytracer – AlternativesSpeed Correction Dependencies Features
OpenGL viewport in Flair
●Initial conversion &syncrhonization●Realtime visualization
Lots of inaccuracies
●Opengl libraries●External math. libraries
●Hardware?
✔Realtime✔ Interactive✔User friendly
External RT.With PovRay
●Slow Some inaccuracies
●PovRay ✔PovRay is a well-known raytracer
✔Optimized✔Community
Internal FLUKA RT.
●Slow Same geometry as the simulation
●No external needs*image conversion
✔Accuracy✔Lattices✔Built-in
Fluka Raytracer – How it works?
General raytracing algorithm(Image by Wikipedia)
Fluka Raytracer – Implementation
● Input cards● CAMERA● LIGHT● MATERIAL PROPERTIES
● FLUKA functions used● GEOREG: Region number● GEOFAR: Intersection detection & distance● GEONOR: Compute normals
Fluka Raytracer – Problem solving
● FORTRAN 77: doesn't allow recurrency● Implementation of a binary tree in a fixed size array
– Maximum depth level in subrays
● Performance: Raytracing is slooow● Use of FLUKA geometry engine (optimizations)● Adaptative Sampling with heuristic
– Estimate the complexity of the scene on each point and compare it to neightbours
● Caching as much as possible
Fluka Raytracer – Samples
Fluka Raytracer – Samples
Sample input fileFeatures:● Camera model ● Material ambient, diffuse and specular colors● Material transparency, reflectivity and fuzziness● Index of refraction of materials● Diffuse and specular illumination● Shadow casting with transparent shadows● Light colors● Adaptative antialiasing
ITER GeometryGeometry by Elias Lebbos
ITER Geometry – Adaptative sampling heuristic for detail detectionGeometry by Elias Lebbos
ITER Geometry –Detail with shadowsGeometry by Elias Lebbos
Fluka Raytracer – Schedule
● Currently converting from C to FORTRAN● We can have a working code in about 1 or 2
months
Fluka Raytracer – Future improvements
● Textures (procedural or images)● Implement spotlights● Performance optimizations● Orthogonal projection● Show USRBIN data as texture● Plane cut of the scene?
Fluka Raytracer
Thank youDavid Siñuela Pastor <[email protected]>