Ray Tracing...

I just have a question avbout ray tracers… do the majority of ray tracers use an API like OpenGL or Direct3D to display the pixels or do they use something else… coz what im thinking is just for each pixel get teh colour of it by ray tracing, and then draw the actual pixel useing an opengl call… but im like totally new to this, so id like some help :slight_smile:

Hi !

Most (open source) raytracers today use some kind of C++ API that is very different from OpenGL, another reason is that OpenGL is based on a pipe line rendering engine, this does not work with a raytracer so the API look’s a bit different, with that said there is a raytracer available that has an API that is almost identical to OpenGL, but I don’t remember the name of it at the moment.

Mikael

Hi again !

Was a bit quick with the “Submit” button, you can of course do the raytracing and use OpenGL to render the final pixel, but you will not win anything by doing it, unless you have some kind of interactive update while the rendering is going on. In that case you could use progressive raytracing.

Trace one pixel in a grid of say 8x8 pixels and draw a quad, when you come back you trace a pixel in a grid of 4x4 pixels and draw new quads and so on, with smooth shading you can get a pretty nice preview of the image.

Mikael

In raytracing I think opengl or direct x is used more for a real time preview of the scene, which show some lighting and position of the objects. This gives you a better idea of how the scene will look.

The rendering engine for the raytracing is it own API (like the POVray engine). Which does the advanced image rendering.

Originally posted by MrShoe:
I just have a question avbout ray tracers… do the majority of ray tracers use an API like OpenGL or Direct3D to display the pixels or do they use something else… coz what im thinking is just for each pixel get teh colour of it by ray tracing, and then draw the actual pixel useing an opengl call… but im like totally new to this, so id like some help :slight_smile:

i had to make a ray tracer for a class last year, it was really cool, taught me lots about shading lighting, intersection tons of stuff. We only used a couple of glut calls to make a window, and a gl call to read the pixels, and plot the pixels. You should try making one, it’s pretty damn cool once you finish…
…kc…

Ok thanks… im probably gonna use opengl to plot the pixel, coz whats the point of using something else if there is basically no difference, and i already know opengl… afaik there should be no performance hit since 99% of the rendering is CPU tracing.