Very cool, but wouldn’t a 2D raytracer have a 1D output in the same way 3D raytracing has 2D output? Im trying to imagine a 3D ray tracer with a 3D output but my brain isn’t smart enough.
ah yeah true. in 3d, you are projecting the 3d world into a 2d camera. if you were to do the same in 2d, that would indeed then be a 1d result.
that's why this camera is different. it shows how much light is passing through a pixel, rather than how much arrives at it... so it can be the same dimension as the world. similar to how volumetric fog is in a 3d world... if that makes sense?
2D: in two dimensions. In this case height and width.
Raytracer: a thing that does raytracing.
Raytracing: a computer technique by which individuals"rays" of light are calculated to determine where lighting or line-of-sight would lead. Most useful in theory for dynamic lighting and reflections in computer graphics, but until recently primarily used for things like bullet trajectory and line-of-sight checking. This is because lighting and reflective calculations that use ray-tracing are absurdly calculation heavy and thus time consuming, and would thus up render times severely. New technology in first Nvidia, and later AMD as well, made it viable a few years back, and now most new graphics cards even for consumer PCs can run the calculations fast enough for even videogames
So put it all together: a thing that does (possibly realtime?) ray traces in two dimensions
I want to use it for a game in the future. unity will make it very easy to deploy to multiple platforms. I started developing this on pc, and had to do only minor changes, to then run it on a Macbook, and create this animation.
Also, unity has lots of buildt-in functionality, and I am used to it. but you could do the same in webgl, or without much of an engine at all.
there are several implementation out there which trace from the light, and then draw the line on the screen. which gives you lots of pixel values per ray intersections. mathematically speaking, that is cheaper: https://benedikt-bitterli.me/tantalum/
i decided to trace per pixel, so for each pixel, trace in all directions, and accumulate light. which is much easier to denoise with current techniques like taa.
maybe even a hybrid could work. solve caustics with light->pixel, solve diffuse scattering with pixel->light... maybe on another day...
I’m gonna have to play with this sometime, thanks for the info! I’ve never gone super in depth but I really enjoy build simple 3D ray racers so this would be a fun challenge.
it is rendering in 16bit float, and then tone mapped to screen. the banding might be due to the taa, or due to video compression... maybe a combination of both
Interesting... If the rays are traced only in 2 dimensions, how are you handling the light spilling onto the 'floor'? I thought that would require atleast 3 dimensions in order for the light to bounce off the wall at an angle and hit the floor, then bounce in to the camera? If you only have two dimensions then wouldn't the light never be able to angle down on to the ground?
there is no ground in that sense. instead, the brightness is defined by how much light passes through a pixel. so if there is lots of light passing through, the pixel will be brighter. you can imagine it beeing like a "slice" of a 3d world...
this has unlimited potential for graphic design. well done being ahead of everyone, i'm sure we're gonna see a lot more of this in the near future. 🌸🌸🌸
oh yeah! the idea has been around for years, but there are few implementations, and only hard to use software. I think apple had a wallpaper on the iphone13 with a similar style.. maybe it is starting to be a thing...
24
u/[deleted] Apr 23 '22
Sorry what? 2D Raytracer.
10
u/dasomen Apr 23 '22
Wow! Looks amazing! What did you use to make this?
9
u/fenasi_kerim Apr 23 '22
Nice. but do you have the options to render in 16 bit? I'm seeing lots of banding on the gradients. is it an artefact from the compression?
7
u/Airyz_ Apr 24 '22
Interesting... If the rays are traced only in 2 dimensions, how are you handling the light spilling onto the 'floor'? I thought that would require atleast 3 dimensions in order for the light to bounce off the wall at an angle and hit the floor, then bounce in to the camera? If you only have two dimensions then wouldn't the light never be able to angle down on to the ground?
2
u/barbo57 Apr 24 '22
this has unlimited potential for graphic design. well done being ahead of everyone, i'm sure we're gonna see a lot more of this in the near future. 🌸🌸🌸
2
u/[deleted] Apr 23 '22
So smooth 👌🏻
2
u/fanzel71 Apr 24 '22
Love this one
2
u/Chris-CFK Apr 24 '22
stunning.