Problems Raytracing Doesn't Solve
blackhole12.blogspot.com
blackhole12.blogspot.com
On to the paragraphs on photorealism. Yes, ray tracing won't solve this because you haven't even given it a problem yet. They're basically three paragraphs going on about how we don't know how to define photorealism. Yes, it is a bad term. Now, let me have a shot at defining realism in computer graphics: The easier I can mistake it for a real scene, the more realistic it is. What ray tracing does here is substantial! One of the main reasons why we can easily distinguish a computer generated scene (except for some scenes in movies nowadays that have been rendered off-line using thousands of hours of processor time) is lighting. We instinctively "feel" things that are odd about lighting. We're very sensitive to that. Ray tracing can provide better reflections and better shadows than almost any other rendering method and basically does them with just a couple of additional bounces. Given an efficient data structure this is one of the quicker ways to do real time lighting effects properly. To top that off, ray tracing can do proper refraction, proper ambient occlusion, interactive indirect illumination and a few other nice effects. Altogether this means one thing: stepping closer towards realism.
Concerning complexity, ray tracing itself doesn't offer a solution. As I've pointed out already, time complexity of ray tracing algorithms depends heavily on the data structures that are used for looking up collisions of rays with geometry. There are good ones, there are bad ones. What ray tracing does though is free occlusion. Only geometry that is visible is ever rendered. That is pointed out in the article as well. What rubs me the wrong way here is "it still has to navigate through the scene representation". Obviously that is true, but as I just said, a lookup algorithm is not part of ray tracing. RT merely paves the way to use good data structures with it. It's not a problem ray tracing can solve, because it is a rendering algorithm, not a data structure.
The scale problem with the stars. Well that is really a memory problem. Again, an efficient data structure will work no matter the spatial distance a ray has to travel. How are entire solar systems simulated? Well, on that scale you get away decently with not loading everything at once into memory and fetching data when needed. I suspect that this is exactly what is done with current approaches and there's nothing that prevents you from doing the same while ray tracing the scene.
Materials like aerogel or clouds are volumetric effects. Ray tracing is perfect for this. In fact, off line rendering uses ray tracing almost exclusively to perform those stunts.
The physics argument doesn't hold properly because it assumes that we've implemented the renderer on the CPU and are therefore eating processor time in big lumps. It would be suboptimal to implement the ray tracer on the CPU, because RAM access times are usually slower than video memory access times from the GPU. Since we're dealing with large amounts of data in all 3D processing, it's a much better choice to use CUDA, Stream or OpenCL to program the GPU to do the entire raytracing and merely use the CPU for occasionally shovel data into video memory. To top that off, ray tracing is easy to parallelize, since the algorithm operates the same for each screen pixel. Modern GPUs are bloody brilliant at that. Use them! This leaves some room to process physics on the CPU, as well as game logic, AI, event processing, network code, etc.
I don't really get the content argument either. The content has to be made regardless of the rendering method. It's the same content after all. How does ray tracing make "it worse"(sic)?
TL;DR: Ray tracing is not a solution to all our problems but a good step forwards in real time rendering. What's really keeping is from implementing it in commercial engines yet is that it's not easily compatible with the polygonal representation of geometry. This is the problem that we should actually be solving.
Oh and by the way, the link labelled with "boring" is actually pretty impressive and far above anything any real-time rendering engine available today produces.
He also claims raytracing does not solve photorealism, but does not back this claim. No single argument why! [Edit: But he's right here, for photorealism you probably want a combination of methods, like ray tracing and radiosity or ray tracing and photon mapping]
Complexity: For raytracing, you can store the scene in very efficient data structures, so you do NOT have to search your "billions of triangles" for each ray. Also, you can make sure rays degrade quickly since you trace them from the camera backwards to the light source, as you have pointed out.
"How do you raytrace stars"? They are a light source at infinite distance. This is a solved problem in computer graphics - And a pretty simple one at that.
Materials, Physics, Content and AI have nothing to do with computer graphics AT ALL.
The approximation algorithms I pointed out are exactly how raytracing is done backwards, but actually still must use a combination of camera rays and light source rays in a stocastic method in order to determine a path from the camera to the light source. Brute force raytracing is, in fact, just shooting out rays from the light sources. That's obviously inefficient, which is why we have the backwards lighting attempts, as discussed in the article.
Raytracing stars is not as simply as you think, not when you can visit them. They can no longer be point sources at infinite distance because the object itself is not infinitely far away, so you therefore can only substitute an infinite light source in when its essentially a point, which gets really nasty when you are dealing with entire galaxies as light sources, and if it isn't you must deal with all the lighting effects in between.
Materials are the most important part of computer graphics. If you don't think this, you have absolutely no idea what you are talking about.
Brute-force path tracing is random sampling from camera to every direction and bouncing/interacting until light source is hit. This is the standard Monte Carlo path tracing method which is unbiased and arrives at the accurate solution given enough time. This is unbiased, accurate and very simple to implement, but very slow to compute.
Metropolis and photon mapping are bidirectional methods where rays are selectively traced back from light source to forward direction, to speed up the path tracing computation.
Regarding the data structure: the types of hierarchical structure commonly used to hold scene data for ray tracing actually lend themselves pretty well to level-of-detail, caching and streaming from disk; so it can be a help rather than a hindrance for managing memory. There's been some really promising work in the last few years on Sparse Voxel Octrees, for example.
What do you mean by computer graphics? If you restrict the job of a computer graphics programmer to purely a function of how many polygons can be rendered at once at 60fps, you may be right... But such a programmer would ignore information about the scene at his or her peril.
Materials: what should this object look like when it interacts with other objects? Does dirt stick, what does it look like inside if it gets cut in two, would a smooth cut even be possible, what about just trying to make a dent with a blunt object? If a flashlight is shined at the material, how does the material react?
Physics: help define how materials behave. (Indeed if we could model everything on the level of real-life quarks the need for explicitly defined materials goes away.) What's fluid supposed to look like? What about when a player character is swimming? Can we sacrifice polygon counts for distant objects, or are distant objects important in the game's physical world? What does wind do to the grass polygons? Could we use less polygons to represent quickly-moving things where the level of detail is going to be poor anyway?
Content: Does an artist need to create two copies of Tree so we can model-swap the low-poly one when appropriate? Do we need to cut content to be able to render at reasonable speeds? Do we need more content to render something worth rendering? Do we have any content to put on the screen at all?
AI: Depends if you consider procedural generation of content AI or not. Also depends if you consider a subroutine that helps optimize your graphics pipeline during runtime AI or not. Then there's the problem of many and nice animations, which you may or may not consider important to "computer graphics".
Same for the "AI", it only means the part that tells the "physics" when to move the stuff around.
And content is necessary for games but so is the air and food for everything. We don't usually talk about food when discussing technical issues in some field. Just because it's necessary does not make it relevant to the discussion.
Then for each light (unless you randomly sample a light each time - which introduces more noise), you need to test occlusion from each surface hit to check for shadows. So each pixel sample that has a solid alpha (it hit an object) needs to be tested against lights with a ray.
Then with GI pathtracing, you need to bounce the light around the scene even for diffuse (non-shiny) surfaces.
The article's still mostly rubbish though...
Foley et al., Computer Graphics: Principles and Practice, p. 792.
This can hardly be considered a problem of ray tracing specifically. And the A* algorithm is a perfectly decent algorithm for path-finding. The notion that an algorithm that does its job should be disregarded just because it is old is ridiculous.
At most ... indefinite.
> raytracing is the process of rendering a 3D scene by tracing the path of a beam of light after it is emitted from a light source, calculating its properties as it bounces off various objects in the world until it finally hits the virtual camera
With my limited knowledge of graphics, I was under the impression ray tracing works exactly the opposite way: one sends 1 ray per pixel (based on the size of the viewport) into the scene, bouncing it off objects (taking into account their material properties) to finally compute the color value for that pixel. It's the exact opposite of the real world (where the sun shines light on the objects and the rays end up hitting our retinas).
Reversing the process has the advantage of being finite: only 1024x768 (or 1920x1200,etc) rays will be sent from the viewport into the scene. In the author's scenario, there would be an infinite number of rays to be traced (light sources generally emit light in all direction and they try to emulate a real light source, which emits an infinite number of rays).
Am I completely wrong here? Is my whole world a lie?
http://en.wikipedia.org/wiki/Ray_tracing#Reversed_direction_...
> Am I completely wrong here?
No.
> Is my whole world a lie?
Yes.