ray tracing

found this nice ray tracing tutorial online
http://www.codermind.com/articles/Raytr-…-blobs.html

hooked it up to OF using a thread to do the rendering - outputting tgas
http://www.openframeworks.cc/files/vide-…-ceTest.mov

the testApp loads the rendered frames (takes a couple of frames to get going) so you can watch the progress .

in data/scene.txt you can set the quality setting with ‘complexity’ - a high number makes it crazy slow though. the noise you see in the clear blob I think is to do with a low complexity value.

the other examples on that site have example code to and I aim to hook them up - but just did one for now.

Codeblocks - 005 - Windows - FAT (throwit in the examples folder)
http://www.openframeworks.cc/files/rayT-…-xample.zip

theo

Nice one!

I’ve been meaning to dig into multi-threading and threadingbuildingblocks ( http://www.threadingbuildingblocks.org/ ), this would definitely make the whole exercise much more exciting.

/A

Just stumbled across these two links - looks very useful for raytracing / high quality rendering / global illumination.

Global illumination in 99 lines of code - the links at the bottom are also very interesting:
http://www.kevinbeason.com/smallpt/

One of the links from that page - minilight - looks quite awesome!
http://www.hxa7241.org/minilight/minilight.html

EDIT: this one looks even more promising - Pane
http://kevinbeason.com/scs/pane/

Theo

Hmm - also looks like the sunflow developer is considering switching back to C++!

http://forum.openframeworks.cc/index.php/topic,371.0.html">http://sunflow.sourceforge.net/phpbb2/v … c&start=15

That would be awesome for OF.
Otherwise I was thinking about how hard it would be to have OF use sunflow via a java interpreter - ugggh.

Theo

I bought this book a while back:
http://www.raytracegroundup.com/

I think it’s pretty useful. I definately wanted to try a simple ray tracer myself!

… and in real-time (well, real time radiosity at least):

http://w3studi.informatik.uni-stuttgart.de/~schillas/radiosity.htm

Just found this:
http://math.ucsd.edu/~sbuss/MathCG/RayTrace/

Crossplatform raytrace / rendering code with OpenGL preview.
Supports loading OBJ which could be quite interesting.

I feel this could be easily shoehorned into a nice OF addon.
Anyone want to take a stab?

:smiley:

Theo

Sunflow in c++ will be killer cant wait :slight_smile:

Got it working!

http://impssble.com/movs/quickraytest.mov

If I can get some decent quality output (softer edges etc) I will try and wrap it in a similar way to ofxVectorGraphics.

Made a quick OBJ OF logo test.
I had to hack the code a bit to get a material for the obj.

check the video:
http://vimeo.com/5234524

Theo,

Did you ever finish this off?
Care to share your code?

Thanks,

Karl

Very interesting ! there are some news about? :slight_smile:
thanks
Walter