3 ms·
> Also consider how much faster / cheaper it would be for a studio to create new graphics engines when you only have to write 1000 lines of ray tracing code ins
by pixel_fcker 6y ago
> Also consider how much faster / cheaper it would be for a studio to create new graphics engines when you only have to write 1000 lines of ray tracing code instead of 100'000 lines of rasterization hacks (for a worse-looking result!).
You were talking about games here, no? That's ultimate hard time constraint.
1000 loc gets you a very basic path tracer which isn't really going to be good for very much.
Your dispersion example is interesting - you can't really do it correctly with rasterization, no, although you can do a distorted background texture lookup with individually offset/blurred RGB channels. If you want to do rough glass you can just increase the blur amount. Not correct but looks 'good enough' in a lot of cases.
With ray tracing you can just trace 3 rays (one for one for each of red, green and blue). Simple! Except can you really afford 3 rays? Also how much do offset them by? You could use Cauchy's formula and use real refraction indices, but then you're going to get ugly separation between the channels. You could sample the whole visible spectrum and use temporal accumulation to build up the correct color, but now you've got color noise. What happens if you want to simulate rough glass? That's going to be very noisy indeed.
What about shadows from the glass? You can't afford to render caustics to do it correctly after all. Do you just ignore them? That'll look weird. Use a fresnel-weighted transparent shadow? Probably but now you have to handle that correctly everywhere and running a shader for shadow rays is expensive too so maybe you have to special-case that situation so most of your scene lands on the happy path.
My point is that anyone can write a basic path tracer in a weekend that will correctly simulate light transport given an infinite amount of time. Writing a renderer that will produce an image of a given quality in a given amount of time, incorporating a list of effects that an art director has decided are essential to the look of you product, is a very hard task still. It's simpler in a lot of ways, but also has to handle a lot of other complexities for the things that aren't possible in a rasterizer but are still very expensive to compute in a ray tracer.
- bryal 6y agoYou make many good points, but I still feel like you're really underselling the potential of simple ray tracing. Hardware acceleration of intersection testing and BVH construction/traversal is only going to become more prevalent, and with temporal reprojection and spatial denoising methods, many kinds of noise can be mitigated. It doesn't even have to be that complex -- "An Efficient Denoising Algorithm for Global Illumination" by Mara et al. is only 7 pages (more like 5, really). Regarding spectral path tracing and colored noise, Wilkie et al. have written a good paper on this, "Hero Wavelength Spectral Sampling", if you're interested.