2d ray tracing for fun and profit back

(L) [2007/03/14] [lycium] [2d ray tracing for fun and profit] Wayback!

ok, ok, just for fun ;)


long, long ago, when the earth was still cooling (circa june 2002) i wrote an article on my then-website outlining how to to write a 2d ray tracer. since then i've picked up that decrepit source code and had some more fun with it, and this stimulated the interest of two of my friends, one of whom is on ompf (greenhybrid). the other hasn't put his renders online yet, so i hope he doesn't mind me hosting them in my "propaganda" directory ;)


the article is preserved (in formaldehyde) for posterity here: [LINK http://mysticgd.com/thomas/lycium.cfxweb.net/2dgi.html]


it's a great little playground for flexing one's monte carlo muscles (and very forgiving to poor/partial implementations), so i hope others on this forum will invest the 10 minutes necessary to join in the fun ;) bonus points if you write a little xml-based scene editor and/or solidify some of the theoretical underpinnings - for example, a 2d analogue of malley's method (see [LINK http://www.cs.kuleuven.ac.be/~phil/GI/]) might be to pick a random x in [-1,1] and then get y as sqrt(1 - x*x), though i've not yet checked that it does indeed produce the cosine-weighted distribution necessary to drop the respective weighting term in the rendering equation. also, in the context of bidirectional methods, i'm not sure whether veach's classification of non-symmetric scattering events carries over to 2d, which matters if you're trying to have some 2d-metropolis-fun ;) in time i hope to release some fun opensource code, co-developed with the mighty tbp, which will do some simple 2d metropolis sampling for rendering this and other little fun things (i'm a bit over-committed time-wise atmo unfortunately).


anyway without further ado, enjoy the shiny pix!


(my stuff)


[LINK http://www.deviantart.com/deviation/49805046/] - a specular 2d fractal (julia set) "surface"

[LINK http://www.deviantart.com/deviation/50301864/] - a negatively reflecting glossy julia set

[LINK http://www.deviantart.com/deviation/50451723/] - multiple scattering in inhomogeneous participating media (field due to a fractal iteration function), windows binary here: [LINK http://www.fractographer.com/binaries/volume_scatter.zip]


(greenhybrid's stuff)


instead of spamming a zillion deviantart links, you can see his fine wares at [LINK http://greenhybrid.net/]


(piotr dubla aka darnal's stuff)


[IMG #1 ]


... he's done some others but this is by far the best (neat scene-modelling!), and since his pics aren't hosted i'll only be posting this ;) edit:  his pix are also available at his deviantart gallery: [LINK http://darnal.deviantart.com/gallery/]
[IMG #1]:Not scraped: https://web.archive.org/web/20071029233836im_/http://www.fractographer.com/propaganda/Mixing_Pot_by_Darnal.jpg
(L) [2007/03/14] [Ono-Sendai] [2d ray tracing for fun and profit] Wayback!

2d raytracing... heh, how peculiar!

Great image tho!
_________________
[LINK http://indigorenderer.com/]
(L) [2007/03/14] [lycium] [2d ray tracing for fun and profit] Wayback!

heh my buddy piotr/darnal finally got his stuff on deviantart btw: [LINK http://darnal.deviantart.com/]


did you check the multiple scattering pic nik? i see you've also got that in indigo now, sexy sexy stuff :) i did a 12ghz+ render of an evil cornell box scene (heavy specular + media), looks great.


btw, i'll be visiting you sometime this year probably ;) if that's ok...
(L) [2007/03/15] [greenhybrid] [2d ray tracing for fun and profit] Wayback!

The funny thing is I've just taken some source code from gladius and eliminated one dimension^^


lyc, how do render your pics at the moment? Pure Path Tracing on top of MLT, or explict tracking of luminaires? Tell me more about the techniques you've applied so far (esp. about your Metropolis efforts:))
_________________
[LINK http://greenhybrid.net/ greenhybrid.net]

Real Men code Software Graphics.
(L) [2007/03/15] [lycium] [2d ray tracing for fun and profit] Wayback!

i had direct lighting in my code for a while but it didn't seem to help much (most of the light is indirect); as for the metropolis sampling, it's a very crude implementation for now, just 2d sampling by luminance. when it's been cleaned up a bit and merged with tbp's opengl basecode, made cross-platform etc it'll be released as opensource (no eta on that i'm afraid, it's on halt until i've caught up with my work). not very exciting of course, but still fun to play with i hope :)


anything cool in your implementation?
(L) [2007/03/15] [greenhybrid] [2d ray tracing for fun and profit] Wayback!

erm, not really [SMILEY Sad]


I've just worked a few hours on the thingie (last friday+saturday). I don't know how good ERPT is gonna be tested on the 2d-path-tracer because there are just two mutations given in the paper, and I did no further examination  how I should apply lense-subpath mutations, so, what I did was to begin my new ray tracer (xiphos, more on that in a few days, I think).


a bit off-topic: about my bih implementation: the version I had in backup had no bih [SMILEY Sad] But I am re-implementing it atm, if you are still interested, leave me a message, think I can share some code in some days [SMILEY Wink] Maybe the whole new ray tracer will be GPL'ed.
_________________
[LINK http://greenhybrid.net/ greenhybrid.net]

Real Men code Software Graphics.
(L) [2007/03/20] [beason] [2d ray tracing for fun and profit] Wayback!

Beautiful!


Are you doing ray-hemicircle intersection? Ray-fractal intersection? What sort of acceleration method?


FWIW, for my thesis I did some 2D photon mapping of a modified cornell box containing a bumpy heightfield.

This is a little different... the scattering is 2D but the geometry is 3D. I did this for illustration purposes for my thesis,

the ideas of which I am still trying to get published :/ We worked out everything in 2D, including the importance sampling for photon emission, area light integration, reflection,

photon density irradiance estimate, and irradiance integration [SMILEY Very Happy]


This illustrates the scattering:

[IMG #1 ]


Overhead shot:

[IMG #2 ]
[IMG #1]:Not scraped: https://web.archive.org/web/20071029233836im_/http://people.scs.fsu.edu/~beason/thesis/images/scatter2D.jpg
[IMG #2]:Not scraped: https://web.archive.org/web/20071029233836im_/http://people.scs.fsu.edu/~beason/thesis/images/scatter2Doverhead.jpg
(L) [2007/03/20] [greenhybrid] [2d ray tracing for fun and profit] Wayback!

really neat images and visualization [SMILEY Very Happy]


I also thought about expanding the 2d ray tracing to three dimensions and trace a lot of layers, in the end having a 3d-volume texture/light-map.


What's the subject of your thesis if I am allowed to ask? Any chance to get it somewhere?


EDIT: Big soooory [SMILEY Neutral] already found it on your homepage: [LINK http://people.scs.fsu.edu/~beason/thesis/]
_________________
[LINK http://greenhybrid.net/ greenhybrid.net]

Real Men code Software Graphics.
(L) [2007/03/20] [lycium] [2d ray tracing for fun and profit] Wayback!

yes, uniform marching and then bisection. it's really dumb to use bisection that close to the root, i know...


given the lack of spatial subdivision (which i can't see how to do for general implicit surfaces without doing a ton of sampling) it's reaaaaally slow. that's not even the end of it though, my participating media was a 2 second hack of that code: i removed the root refinement, set the stepsize to < 1 pixel, multiplied the potential function by like 1000 and return the sine of that [SMILEY Shocked] if you've tried the exe i linked and found it to be somewhat slow, now you know why [SMILEY Wink]

back