5 ms·
I'd say that it is rather obvious that ray tracing is not a new thing, since it is simulates how light physically behaves. I consider this 3d rendering as a sp
by rollulus 8y ago
I'd say that it is rather obvious that ray tracing is not a new thing, since it is simulates how light physically behaves.
I consider this 3d rendering as a spectrum: rasterization requires little computation but has little to do with physics. Ray tracing is what requires a lot of computation and has everything to do with physics. Somewhere in between are hybrid methods: rasterization with ray tracing components added to it, or ray tracing with approximations.
For instance, pure rasterization cannot do shadows. It is approximated by rendering the scene from the viewpoint of a light and test the rasterized scene for occlusions casting shadows. And the other way around: real time ray tracing cannot compute all indirect lighting paths, a subset is only considered at the cost of e.g. variance.
- GuB-42 8y agoRasterization has just as much to do with physics as raytracing. They can both get you a correct solution to the rendering equation (i.e. be physically correct) if you wait long enough, or get you an approximation of it in a reasonable time scale. For example if all you need are shadows cast from a point light source, a rasterization technique like stencil shadows will give you the same exact result as simple raytracing, and neither will be physically correct. It is just that depending on your rendering time budget, some things are better done with rasterization and others are better done with raytracing. Real time engines, with simplified models typically work better with rasterization, while precalculated scenes, with more realistic models work better with raytracing.
- toolslive 8y ago> since it is simulates how light physically behaves. I think ray tracing is at best an ad-hoc model for light that produces nice results, but physically based it isn't.
- mattnewport 8y agoIt's physically based, it's just not a complete simulation of all the physics involved. It's at least as physically based as most rigid body, cloth or fluid physics simulation.
- toolslive 8y agoRadiosity would qualify better as `based on physics` than ray tracing, but can't do things like mirrors. I could live with classifying ray tracing as `geometry based`, like Newton studied mirrors. (You could do something that uses ray tracing to determine what's visible and what isn't and radiosity to determine the colour, but that's an entirely different story).
- ctrl-j 8y agoWhat is your qualm with calling ray-tracing physically based? Don't most models even include transmissivity and refraction? I mean, unless you're expecting them to calculate absorption/re-emission at every bounce... It still seems pretty "physical" to me.
- toolslive 8y agoHere you're using geometrical optics which models is a narrow beam (ray) which is idealized as a line. It all becomes simple vector math form there onwards. However, Physics knows since the end of the 18th century light is a wave. https://en.wikipedia.org/wiki/Young%27s_interference_experiment https://en.wikipedia.org/wiki/Young%27s_interference_experim... It's not that the model breaks down only in extreme conditions (like Newton's laws of mechanices), but in day to day situations as well. I think that's the essence of my qualm.
- ctrl-j 8y agoThe wave-like nature of photons does not exclude the particle behavior. Light is both a particle and a wave. Physicists still rely on snells law. Optics courses still includes path tracing when studying refraction and dielectrics. Excluding the particle behavior of light just because the wave nature exists, is not something a physicist would do.
- toolslive 8y agoTrue, but the concept of ray used here is neither particle nor wave. The whole thing is way more geometry than physics.
- mbel 8y ago> For instance, pure rasterization cannot do shadows. Well... the technique that you describe (shadow mapping) is actually pure rasterization it just requires more than one rasterization pass. This also ignores the fact that there are other techniques for getting shadows in rasterizing renderers (stencil volumes and other stuff that is rather considered historical today). I get your point that rasterization doesn't support shadows "naturally" like ray tracing, but in my opinion your wording and the example is rather unfortunate. The same goes for reflections, I would say SSS or caustics probably are better examples since they are really only done with techniques based on ray tracing.
- swerner 8y agoSSS has been done with point clouds for a long time. Only recently have films switched to ray tracing for SSS. Games these days implement SSS in screen space using rasterisation, no rays tracing either.
- octachron 8y agoEven ray tracing does not capture all physics of electromagnetism and only works at the level of geometrical optics: any effect, like diffraction or iridescence, that arises due to the wave-like nature of light still need to be implemented in ad-hoc way in a ray tracing algorithm. But fully simulating Maxwell's equations (or QFT) to keep track of those minor effects would be insanely expansive.
- swerner 8y agoIt's much simpler than that: Both rasterisation and ray tracing are methods to solve visibility. The main difference is that one answers the question "given a primitive, what pixels does it overlap?", the other "given a pixel, what primitives does it overlap?" Light transport, shading, shadowing are all just implemented on top and not a direct result of the visibility calculation.
- pcwalton 8y agoRasterization and raytracing are formally equivalent in a sense. You should be able to algebraically rearrange ray/triangle intersection tests performed in raytracing to get Pineda rasterization. So I don't really see one as more physical than the other. Rather the difference is that rasterization starts with each triangle and determines which rays intersect it, while raytracing starts with each ray and determines which triangles intersect it.
- theoh 8y agoHistorically, rasterization has been away of putting triangles onto the screen, maybe with a Z-buffer to determine visibility. It's basically an image space idea, with things like Gouraud shading happening in image space, and though you could extend it put it to use in calculating shadow volumes or shadow maps, it doesn't implicitly deal with light transport. That's the first difference. Ray tracing, on the other hand, has always been about (forward or backward) rays of light propagating through object space. It wasn't about light transport in the early days (just visibility and shading, based on simple models like Phong) but it is very well-suited to modelling transport, because it addresses the notion of fully-spatial rays in object space. Writing a physically based (light transport)renderer which was internally based purely on rasterization to rectangular images would be an odd choice, partly because many of the intermediate images would be have to somehow be parameterized to represent locations on a hemisphere, etc. I'm open to correction on this, but rasterization algorithms are really tied to projections onto a rectilinear grid, orthographic or perspective. Ray-tracing doesn't need to assume/know about this raster grid idea and as a result can be used with other geometries. This makes it strictly more powerful than rasterization. This kind of thing, for example: https://www.glassner.com/computer-graphics/graphics-research/cubism-for-computer-graphics/ https://www.glassner.com/computer-graphics/graphics-research... is a very bad fit for polygon rasterizers because each triangle is going to be warped in image space.
- pcwalton 8y agoYou can actually extend the rasterization concept to 3D, as shown in this paper: http://cg.ivd.kit.edu/publications/p2012/3dr/gi2012.pdf http://cg.ivd.kit.edu/publications/p2012/3dr/gi2012.pdf