FLUKA Raytracer 04/09

1,448 views
1,368 views

Published on

Presentation of the FLUKA Raytracer. It is finished now ;)

Published in: Technology, Spiritual
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,448
On SlideShare
0
From Embeds
0
Number of Embeds
7
Actions
Shares
0
Downloads
10
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

FLUKA Raytracer 04/09

  1. 1. Fluka Raytracer Implementing a Raytracer inside FLUKA David Siñuela Pastor <dsinuela@cern.ch>
  2. 2. Fluka Raytracer - Outline ● Why? ● Alternative solutions ● How raytracing works ● Implementation in FLUKA ● Problem solving ● Samples ● Time schedule ● Future improvements
  3. 3. 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
  4. 4. 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
  5. 5. Fluka Raytracer – Alternatives Speed Correction Dependencies Features OpenGL ●Initial conversion Lots of ● Opengl libraries ✔ Realtime viewport in &syncrhonization inaccuracies ● External math. ✔ Interactive Flair ●Realtime libraries ✔ User friendly visualization ● Hardware? External RT. With PovRay Internal FLUKA RT.
  6. 6. Fluka Raytracer – Alternatives Speed Correction Dependencies Features OpenGL ●Initial conversion Lots of ● Opengl libraries ✔ Realtime viewport in &syncrhonization inaccuracies ● External math. ✔ Interactive Flair ●Realtime libraries ✔ User friendly visualization ● Hardware? External RT. Slow ● Some ● PovRay ✔ PovRay is a With PovRay inaccuracies well-known raytracer ✔ Optimized ✔ Community Internal FLUKA RT.
  7. 7. Fluka Raytracer – Alternatives Speed Correction Dependencies Features OpenGL ●Initial conversion Lots of ● Opengl libraries ✔ Realtime viewport in &syncrhonization inaccuracies ● External math. ✔ Interactive Flair ●Realtime libraries ✔ User friendly visualization ● Hardware? External RT. Slow ● Some ● PovRay ✔ PovRay is a With PovRay inaccuracies well-known raytracer ✔ Optimized ✔ Community Internal Slow ● Same geometry ● No external needs ✔ Accuracy FLUKA RT. as the simulation *image conversion ✔ Lattices ✔ Built-in
  8. 8. Fluka Raytracer – How it works? General raytracing algorithm (Image by Wikipedia)
  9. 9. Fluka Raytracer – Implementation ● Input cards ● CAMERA ● LIGHT ● MATERIAL PROPERTIES ● FLUKA functions used ● GEOREG: Region number ● GEOFAR: Intersection detection & distance ● GEONOR: Compute normals
  10. 10. 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
  11. 11. Fluka Raytracer – Samples
  12. 12. Fluka Raytracer – Samples Sample input file Features: ● 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
  13. 13. ITER Geometry Geometry by Elias Lebbos
  14. 14. ITER Geometry – Adaptative sampling heuristic for detail detection Geometry by Elias Lebbos
  15. 15. ITER Geometry – Detail with shadows Geometry by Elias Lebbos
  16. 16. Fluka Raytracer – Schedule ● Currently converting from C to FORTRAN ● We can have a working code in about 1 or 2 months
  17. 17. Fluka Raytracer – Future improvements ● Textures (procedural or images) ● Implement spotlights ● Performance optimizations ● Orthogonal projection ● Show USRBIN data as texture ● Plane cut of the scene?
  18. 18. Fluka Raytracer Thank you David Siñuela Pastor <dsinuela@cern.ch>

×