Live data from Hacker News

Spectral Ray Tracing

larswander.com

21–30 of 45 posts

Re: Spectral Ray Tracing

#21
post #7

Spectral rendering imho is good example how ray tracing in itself is not the end-game for rendering, it's more just starting point. Occasionally I see sentiment that with real-time ray tracing rendering is a solved problem, but imho it's far from truth. Afaik most spectral rendering systems do not do (thin-film) interference or other wave-based effects, so that is another frontier. Reality has surprising amount of de…

It's like a fractal; the closer you look, the more details you notice affecting what you see. It's like we're creeping to 100% physically accurate rendering, but we'll probably never get to 100%, instead we'll just keep adding fractions.

Re: Spectral Ray Tracing

#22

If anyone wants to make their own: The free e-book Ray Tracing Gems II [1] covers realtime GPU ray tracing with modern APIs and hardware acceleration, and has a chapter about spectral rendering (Chapter 42: Efficient spectral rendering on the GPU for predictive rendering). [1] https://www.realtimerendering.com/raytracinggems/rtg2/

I can't take time to fiddle with raytracing (however much I'd want to!) but I skimmed the first half of that book and alias sampling is a very elegant and nice technique. Wish I had known about it earlier! It is useful in a far broader context than graphics.

Re: Spectral Ray Tracing

#24
post #14

If you want to play with ray tracing implementation, it's surprisingly easy to write one by yourself. There's a great free book ( https://raytracing.github.io/books/RayTracingInOneWeekend.ht... ) or, if you know a bit of Unity a very nice GPU-based tutorial ( https://medium.com/@jcowles/gpu-ray-tracing-in-one-weekend-3... ). The Unity version is easier to tinker with, because you have scene preview and other GUI that…

when i wrote my very first ray tracer it didn't take me an entire weekend; it's about four pages of c that i wrote in one night

http://canonical.org/~kragen/sw/aspmisc/my-very-first-raytra...

since then i've written raytracers in clojure and lua and a raymarcher in js; they can be very small and simple

last night i was looking at Spongy by mentor/TBC https://www.pouet.net/prod.php?which=53871 which is a fractal animation raytracer with fog in 65 machine instructions. the ms-dos executable is 128 bytes

i think it's easy to get overwhelmed by how stunning raytraced images look and decide that the algorithms and data structures to generate them must be very difficult, but actually they're very simple, at least if you already know about three-dimensional vectors. i feel like sdf raymarching is even simpler than the traditional whitted-style raytracer, because it replaces most of the hairy math needed to solve for precise intersections with scene geometry with very simple successive approximation algorithms

the very smallest raytracers like spongy and Oscar Toledo G.'s bootsector raytracer https://github.com/nanochess/RayTracer are often a bit harder to understand than slightly bigger ones, because you have to use a lot of tricks to get that small, and the tricks are harder to understand than a dumber piece of code would be

Re: Spectral Ray Tracing

#25

If anyone wants to make their own: The free e-book Ray Tracing Gems II [1] covers realtime GPU ray tracing with modern APIs and hardware acceleration, and has a chapter about spectral rendering (Chapter 42: Efficient spectral rendering on the GPU for predictive rendering). [1] https://www.realtimerendering.com/raytracinggems/rtg2/

I would also recommend Ray Tracing in One Weekend [1] if you want a very quick introduction, and Physically Based Rendering [2] if you want to then go really in depth.

[1] https://raytracing.github.io/

[2] https://pbrt.org/

Re: Spectral Ray Tracing

#26
post #9

Are there any good resources for spectral ray tracing for other frequencies of light, e.g. radio frequencies?

It's the same thing! What are you trying to do with it?

One thing you'll run into is that there isn't a clear frequency response curve for non-visible, so you need to invent your own frequency to RGB function (false color).

Another thing is that radio waves have much longer wavelengths than visible, so diffractive effects tend to be a lot more important, and ray tracing (spectral or otherwise) doesn't do this well. Modeling diffraction is typically done using something like FDTD.

https://en.wikipedia.org/wiki/Finite-difference_time-domain_...

Re: Spectral Ray Tracing

#27

If anyone wants to make their own: The free e-book Ray Tracing Gems II [1] covers realtime GPU ray tracing with modern APIs and hardware acceleration, and has a chapter about spectral rendering (Chapter 42: Efficient spectral rendering on the GPU for predictive rendering). [1] https://www.realtimerendering.com/raytracinggems/rtg2/

I would also recommend Ray Tracing in One Weekend [1] if you want a very quick introduction, and Physically Based Rendering [2] if you want to then go really in depth. [1] https://raytracing.github.io/ [2] https://pbrt.org/

Highly recommend Physically Based Rendering. As a book, Pbrt is to the study of path tracers, as Gravity is to the field of general relativity. Wholly encompassing and rigorous.

Re: Spectral Ray Tracing

#28
I was thinking of implementing refraction in my distribution raytracer (stochastic, not parallel). https://en.m.wikipedia.org/wiki/Distributed_ray_tracing

I would randomly sample a frequency, calculate its color and use it to modulate ray color. I would have to scale the result by 3 to account for the pure refracted color being 1/3 brightness.

Re: Spectral Ray Tracing

#29
post #24
post #14

If you want to play with ray tracing implementation, it's surprisingly easy to write one by yourself. There's a great free book ( https://raytracing.github.io/books/RayTracingInOneWeekend.ht... ) or, if you know a bit of Unity a very nice GPU-based tutorial ( https://medium.com/@jcowles/gpu-ray-tracing-in-one-weekend-3... ). The Unity version is easier to tinker with, because you have scene preview and other GUI that…

when i wrote my very first ray tracer it didn't take me an entire weekend; it's about four pages of c that i wrote in one night http://canonical.org/~kragen/sw/aspmisc/my-very-first-raytra... since then i've written raytracers in clojure and lua and a raymarcher in js; they can be very small and simple last night i was looking at Spongy by mentor/TBC https://www.pouet.net/prod.php?which=53871 which is a fractal anima…

> when i wrote my very first ray tracer it didn't take me an entire weekend

It’s just a catchy title. You can implement the book in an hour or two, if you’re uncurious, or a month if you like reading the research first. Also maybe there are meaningful differences in the feature set such that it’s better not to try to compare the time taken? The Ray Tracing in One Weekend book does start the reader off with a pretty strong footing in physically based rendering, and includes global illumination, dielectric materials, and depth of field. It also spends a lot of time building an extensible and robust foundation that can scale to a more serious renderer.

Re: Spectral Ray Tracing

#30
post #7

Spectral rendering imho is good example how ray tracing in itself is not the end-game for rendering, it's more just starting point. Occasionally I see sentiment that with real-time ray tracing rendering is a solved problem, but imho it's far from truth. Afaik most spectral rendering systems do not do (thin-film) interference or other wave-based effects, so that is another frontier. Reality has surprising amount of de…

The closer rendering comes closer to underlying physical principles, the more game engines will become world simulation engines. Various engine parts commonly seen today will converge towards a common point, where, for example, we'll observe less distinction between physics and rendering layers. I wonder if this trend can be traced to some degree even today. Several orders of compute growth later, we'll look upon cur…

I disagree. The goal for most games is not to simulate the real world accurately, but to be a piece of entertainment (or artwork). That sets different requirements than just "world simulation", both from mechanics point of view and from graphics point of view. So engines will for a long time be able to differentiate on how they facilitate such things; expressivity is a tough nut to crack and real-world physics gets you only so far.

Even photorealism is a shifting target as it turns out that photography itself diverges from reality; there is this trend of having games and movies look "cinematic" in a way that is not exactly realistic, or at least not how things appear to human eye. But how scenes appear to human eyes is also tricky question as humans are not just simple mechanical cameras.

Post reply on HN