<p>OpenGL (scanline rendering) is always going to be way faster than ray tracing.</p>

<p>Ray tracing computes pixels one by one using physics (at least a good 90% of the time it's going to be real physics). Although some of it can now be done with a GPU, it is not really helping as much as one would expect. Calculating speculative lightning is not something you can easily do in parallel (ray 1 will bounce from object A to object B, ray 2 will bounce from object A to object C... you can't parallelize the computations on B and C.) The GPU helps with the matrix math, though.</p>

<p>In comparison, OpenGL is a total fake in comparison. It renders triangles really fast with shades coming from textures and fast gradient computations from your various light sources.</p>

CC BY-SA 3.0
2018-04-20T21:09:27.623Z
You can raytrace a silhouette without any kind of shading. No need to involve physics. Also, scanline rendering is not always faster. The algorithmic complexity is different so there are cases where a raytracer will win.
Olivier
CC BY-SA 3.0
2018-04-20T15:56:31.030Z
2018-04-20T16:53:12.957Z
2018-04-20T16:53:12.957Z
Alexis Wilke
<p>Using VTK 7.0 I have found that rendering a 20k triangle STL model takes approximately 17ms on my Nvidia GTX970. However, I am only interested in the silhouette of this model (like the image below) and was wondering if: a) such speeds are reasonable for this model size, and b) since I am not really interested in a full render, is there a much faster way to compute just that silhouette? I considered a ray tracing approach where I just compute whether or not each pixel hits the model, but since I am only interested in speed I do not know if this is a good route to pursue. As a side note, these questions need not be specific to VTK - I am really just conerned with the fastest way to utilize a GPU to compute a silhouette (suggestions algorithms, theory, or libraries are all all welcome!) and what reasonable times I can expect for such model sizes.</p>

<p><a href="https://i.sstatic.net/CBp4P.jpg" rel="noreferrer"><img src="https://i.sstatic.net/CBp4P.jpg" alt="enter image description here"></a></p>

CC BY-SA 3.0
2016-06-19T07:57:28.473Z
17 milliseconds sounds more like the synchronisation to screen refresh rate than a actual rendering speed since that would be 1/60 (or well 16.666ms) of a second. So most likely your render is faster than that is just that displaying is restricted to one cycle. You can disable screen sync or render to a offscreen buffer for a more representative rendertime.
joojaa
CC BY-SA 3.0
2016-06-19T22:48:34.840Z
sounds indeed like a vsync, turn it off and try again or render it several times to see when you get any slowdown.
ratchet freak
<rendering><silhouette><vtk>
How fast should I expect to render the silhouette of a 20k triangle model?
Tetao879
# How fast should I expect to render the silhouette of a 20k triangle model?

(Asked by: username_0 on 2016-06-19)

Using VTK 7.0 I have found that rendering a 20k triangle STL model takes approximately 17ms on my Nvidia GTX970. However, I am only interested in the silhouette of this model (like the image below) and was wondering if: a) such speeds are reasonable for this model size, and b) since I am not really interested in a full render, is there a much faster way to compute just that silhouette? I considered a ray tracing approach where I just compute whether or not each pixel hits the model, but since I am only interested in speed I do not know if this is a good route to pursue. As a side note, these questions need not be specific to VTK - I am really just conerned with the fastest way to utilize a GPU to compute a silhouette (suggestions algorithms, theory, or libraries are all all welcome!) and what reasonable times I can expect for such model sizes.

[![enter image description here](https://i.sstatic.net/CBp4P.jpg)](https://i.sstatic.net/CBp4P.jpg)

**Tags:** rendering, silhouette, vtk

> **Comments:**
> **username_1**: 17 milliseconds sounds more like the synchronisation to screen refresh rate than a actual rendering speed since that would be 1/60 (or well 16.666ms) of a second. So most likely your render is faster than that is just that displaying is restricted to one cycle. You can disable screen sync or render to a offscreen buffer for a more representative rendertime.  
> **username_2**: sounds indeed like a vsync, turn it off and try again or render it several times to see when you get any slowdown.  

---

## 1 answers

### Answer by username_3 on 2018-04-20. Score: -2

OpenGL (scanline rendering) is always going to be way faster than ray tracing.

Ray tracing computes pixels one by one using physics (at least a good 90% of the time it's going to be real physics). Although some of it can now be done with a GPU, it is not really helping as much as one would expect. Calculating speculative lightning is not something you can easily do in parallel (ray 1 will bounce from object A to object B, ray 2 will bounce from object A to object C... you can't parallelize the computations on B and C.) The GPU helps with the matrix math, though.

In comparison, OpenGL is a total fake in comparison. It renders triangles really fast with shades coming from textures and fast gradient computations from your various light sources.

> **Comments:**
> **username_4**: You can raytrace a silhouette without any kind of shading. No need to involve physics. Also, scanline rendering is not always faster. The algorithmic complexity is different so there are cases where a raytracer will win.  

---

