rnd-team-dev / plotoptix

Data visualisation and ray tracing in Python based on OptiX 7.7 framework.
https://rnd.team/plotoptix
Other
499 stars 26 forks source link

benchmarking #12

Closed kwea123 closed 4 years ago

kwea123 commented 4 years ago

Is there some sort of benchmarking? A scene with some geometry, image size of HxW, and the time to render? I would like to compare with other libraries.

robertsulej commented 4 years ago

I am about to release updates today. Let me add to examples a simple notebook with a timer.

Though, keep in mind that the frame time is one factor, while another can be a time to converege to some level of noise.

robertsulej commented 4 years ago

The updated code is in the repository, and on PyPI. There is also a new notebook with sample benchmarking. You can extend it to any scene.

If you are interested in scenes based on meshes from .obj everything should be fine, but you'll need to redo materials (.mtl import is not implemented). All effects, shading and textures should be possible to redo, but it is a bit of typing.

kwea123 commented 4 years ago

What's the difference between frame_time and image_time? Also what does the histogram in cell 19 represent? Does that mean that the total render time is the area under the histogram?

robertsulej commented 4 years ago

An image is rendered in multiple passes, e.g. 128. image_time is the time to complete all these passes. Intermediate stages are available to display before the image is completed, e.g. every 4 passes. Time to get each next intermediate stage (out of 32 in this case) is the frame_time. There is a small impact on performance of having these intermediate results, but this way you can see the image quickly and have a better experience in the interactive interface.

The image is recalculated after changes to the scene, camera, render parameters, etc. The upper step plot shows frame_times of recalculated the image, and the lower plot shows the image_time. So each time you trigger recalculation there will be one more entry in the lower plot, and a bunch of new entries in the upper plot (e.g. 32 entries if you set rt.set_param(min_accumulation_step=4, max_accumulation_frames=128) like it is now in the notebook). frame_times sum up to corresponding image_time.