项目作者: sinanislekdemir

项目描述 :
Raylar Raytracing Engine
高级语言: Go
项目地址: git://github.com/sinanislekdemir/raylar.git
创建时间: 2020-01-13T21:17:50Z
项目社区:https://github.com/sinanislekdemir/raylar

开源协议:MIT License

下载


raylar render engine

Work in progress :)

install: you need golang to install

  1. go install github.com/sinanislekdemir/raylar

glasses

  • Raytracing
    • KD-Tree
  • Texture support (png, jpeg)
  • Ambient Occlusion
  • Ambient Color
  • Point lights
  • Light Objects (and area light)
  • Basic Reflections
  • Bump Mapping
  • Alpha Channel
  • [X] Environment Map

Stages of rendering (without Caustics)

Ambient Occlusion Only

ao_kitchen

Ambient Occlusion with Colors

ao_kitchen_color

AO with Colors and Reflections/Refractions

ao_kitchen_ref_color

Render with AO + Lights + Colors

kitchen_full

Environment Map

kitchen_full

residential

metro_int

Happy Buddha Example (1088700 triangles in 1h55m37s 3200x1800 in January 2020, only 9 minutes in March 2020)

(This is a raw cropped image - No after-effects applied)
(Scene can be downloaded from https://www.islekdemir.com/buddha.tar.gz)

budha

  1. 2020/01/27 17:57:06 Loading configuration from config.json
  2. 2020/01/27 17:57:06 Unmarshal JSON
  3. 2020/01/27 17:57:06 Loading file: scene.json
  4. 2020/01/27 17:57:06 Unmarshal JSON
  5. 2020/01/27 17:57:17 Fixing object Ws
  6. 2020/01/27 17:57:17 Flatten Scene Objects
  7. 2020/01/27 17:57:17 Transform object vertices to absolute and build KDTrees
  8. 2020/01/27 17:57:17 Prepare object house
  9. 2020/01/27 17:57:17 Local to absolute
  10. 2020/01/27 17:57:17 Unify triangles
  11. 2020/01/27 17:57:18 Build KDTree
  12. 2020/01/27 17:58:15 Built 2004709 nodes with 26 max depth, object ready
  13. 2020/01/27 17:58:15 Parse material textures
  14. 2020/01/27 17:58:15 Calculating ambient parameters
  15. 2020/01/27 17:58:15 Ambient max radius: 3.406166
  16. 2020/01/27 17:58:15 Exterior Scene
  17. 2020/01/27 17:58:15 Number of vertices: 0
  18. 2020/01/27 17:58:15 Number of indices: 1088700
  19. 2020/01/27 17:58:15 Number of materials: 8
  20. 2020/01/27 17:58:15 Number of triangles: 1088700
  21. 2020/01/27 17:58:15 Loaded scene in 69.398893 seconds
  22. 2020/01/27 17:58:15 Start rendering scene
  23. 2020/01/27 17:58:15 Output image size: 3200 x 1800
  24. 5760000 / 5760000 [====================================] 100.00% 1h55m37s
  25. 2020/01/27 19:53:53 Rendered scene in 6937.625351 seconds
  26. 2020/01/27 19:53:53 Post processing and saving file

After optimizations by 9th of March 2020:

  1. 2020/03/09 09:14:30 Initializing the scene
  2. 2020/03/09 09:14:30 Loading configuration from /home/sinan/Desktop/buddha/buddha/config.json
  3. 2020/03/09 09:14:30 Unmarshal JSON
  4. 2020/03/09 09:14:30 Loading file: /home/sinan/Desktop/buddha/buddha/scene.json
  5. 2020/03/09 09:14:30 Unmarshal JSON
  6. 2020/03/09 09:14:38 Fixing object Ws
  7. 2020/03/09 09:14:38 Loaded scene in 8.879676 seconds
  8. 2020/03/09 09:14:38 Render 100 percent of the image
  9. 2020/03/09 09:14:38 Set size to 3200x1800
  10. 2020/03/09 09:14:38 Start rendering scene
  11. 2020/03/09 09:14:38 Init scene
  12. 2020/03/09 09:14:38 Flatten Scene Objects
  13. 2020/03/09 09:14:38 Transform object vertices to absolute and build KDTrees
  14. 2020/03/09 09:14:38 Prepare object happy_vrip
  15. 2020/03/09 09:14:38 Local to absolute
  16. 2020/03/09 09:14:39 Unify triangles
  17. 2020/03/09 09:14:40 Loaded object with 1087716 triangles
  18. 2020/03/09 09:14:40 Prepare object Cube.001
  19. 2020/03/09 09:14:40 Local to absolute
  20. 2020/03/09 09:14:40 Unify triangles
  21. 2020/03/09 09:14:40 Loaded object with 12 triangles
  22. 2020/03/09 09:14:40 Prepare object Sphere
  23. 2020/03/09 09:14:40 Local to absolute
  24. 2020/03/09 09:14:40 Unify triangles
  25. 2020/03/09 09:14:40 Loaded object with 960 triangles
  26. 2020/03/09 09:14:40 Prepare object Cube
  27. 2020/03/09 09:14:40 Local to absolute
  28. 2020/03/09 09:14:40 Unify triangles
  29. 2020/03/09 09:14:40 Loaded object with 54 triangles
  30. 2020/03/09 09:14:40 Build KDTree
  31. 2020/03/09 09:15:46 Built 2019287 nodes with 26 max depth, object ready
  32. 2020/03/09 09:15:46 Parse material textures
  33. 2020/03/09 09:15:46 Scanning pixels on view
  34. 5760000 / 5760000 [==========================] 100.00% 4s
  35. 2020/03/09 09:15:51 Done scanning pixels
  36. 2020/03/09 09:15:51 Done init scene
  37. 2020/03/09 09:15:51 Initial rendering: 3200 x 1800
  38. 5760000 / 5760000 [==========================] 100.00% 7m35s
  39. 2020/03/09 09:23:27 Rendered scene in 455.947010 seconds
  40. 2020/03/09 09:23:27 Second pass for antialiasing and image generation
  41. 5760000 / 5760000 [==========================] 100.00% 2m10s