Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

bob_the_third

Breaking the reality barrier

This topic is 5561 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

The holy grail of rendering (or at least one of them) is to achieve photorealistic rendering in real-time. [INSERT DEBATE ON DEFINITION OF REALTIME HERE] Okay, let''s just say that realtime is fast enough that the user never notices a slowdown. I understand that radiosity is a method employed in the movie industry for super-realistic CGI. There is a concerted effort going on to achieve a form of this in a realtime PC environment (i.e games, etc.). In addition the "tricks" have been increasing in sophistication: light-mapping, pixel-shaders, shaddow-mapping, (and from what I''ve heard around these parts lately, but know nothing about so please correct me gently if I''m wrong in so labeling this last one...) spherical harmonics to name a few. So here''s the question I pose: 1) Can radiosity or some variant be made to run in realtime without sacrificing the accuracy of the solution significantly. 2) If it can''t at this time, why not? What are the technical obsticals and how would you get around them (if you have any suggestions or feel like bending your mind around this problem). 3) Is there any point to the solving GA in realtime? Are the "tricks" good enough?

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
Solving GI in realtime would be awesome
The main obstacle is still processing power. The amount of computations needed with most current GI methods is insane.

Share this post


Link to post
Share on other sites
quote:
The main obstacle is still processing power. The amount of computations needed with most current GI methods is insane.

Why? (Yes I know I''m asking for flames. But bear with me. I have a point). Clearly the processing power required depends entirely on the algorithm used to acheive GA.

Opened ended question ahead. Answer as much or as little as you please:

Which algorithms require too much power and why? What is it about current approaches that overtax modern PCs? For example, the most naive approach to radiosity as I understand it conveys energy from each poly to every other poly and runs in O(n^2) time, thus scaling horribly for large poly counts. However not every algorithm will necessarily share this run-time characteristic.

What I''m trying to start is a round-table discussion that opens up the question of feasibility and tries to evaluate it honestly. If you say it''s too slow let''s look at why and see if there''s a better way.

Share this post


Link to post
Share on other sites
quote:
Original post by bob_the_third
The holy grail of rendering (or at least one of them) is to achieve photorealistic rendering in real-time.


There is none. Approaching photorealism depends on numerous little details that must match. GI is surely one of the most important, but far from the only one. Realistic material properties, expressed as BRDFs is another important point. We still don't have optimal hardware support for those on consumer level hardware (would need 4D textures, only supported on highend workstations).

quote:

1) Can radiosity or some variant be made to run in realtime without sacrificing the accuracy of the solution significantly.


Of course, that's no problem at all. You can go very far with this, and achieve almost 100% photorealistic scenes in full realtime. But keep in mind that a precomputed GI solution is not interactive. You'll get the "museum-effect": walk around, look, but don't touch/move anything. Recently, more and more interactive GI approaches exist, but they are all limited in several respects. They will allow limited dynamic environments, but still not 100% interactive (as with eg. perpixel lights and shadowmaps). A combination between traditional methods and precomputed GI often gives very nice effects, though.

quote:

3) Is there any point to the solving GA in realtime? Are the "tricks" good enough?


If you mean GI (=global illumination), then there is definitely a point. Full realtime GI is an important step towards full photorealism. The tricks we have today are pretty good, and can be quite convincing. But they are not yet the real thing.


[edited by - Yann L on July 26, 2003 4:11:24 PM]

Share this post


Link to post
Share on other sites
Current GI solutions are too much to do in realtime for one reason: computational expense. Real illumination of a single point in space is the integral of all incoming light from all directions. Some of this light is reflected off of the point (if the point corresponds to a surface or a particle suspended in a volume, such as dust or silt underwater). Some light is absorbed. Some is transmitted through the point.

Global illumination is not a simple equation to solve. All GI approximations amount to summing incoming light at a large number of points in the scene, and then visualizing the estimates. To obtain anything remotely resembling a realistic image, one must consider a large number of light contributions for each point. The larger the scene, the more lights involved, etc., the more computations it takes to make an approximation.

Remember, real illumination is an integral. The only way to achieve a true solution is to perform an infinite sum. However, we can use what basically amounts to Monte Carlo integration (virtually all GI methods make use of some kind of disguised MCI). This is a way of approximating an integral by adding up random slices and weighting them. It is possible to approximate certain sums using only a few hundred samples without losing too much accuracy. Applied MCI is a great way of approximating GI -- but it still is essentially doing a whole lot of math and fudging the numbers to obtain something vaguely realistic.

There are good and bad ways of obtaining such GI approximations, but all of them involve a huge number of computations. I personally have been doing some research in realtime GI over the past several months, and even using some ridiculous hacks it is hard to break the seconds-per-frame barrier for nontrivial scenes. Until someone discovers a brilliant way of cutting down on the calculations needed to approximate GI, or of escaping the need for performing MCI at what amounts to millions of discrete points, we simply don''t have the processing power to solve GI at realtime rates.


As Yann mentioned, it is certainly possible to do museum-style GI with precomputed solutions, but this just doesn''t cut it. I look forward to the day when real GI approximations are feasible in realtime, and I can finally illuminate a room by setting a piece of furniture on fire

Share this post


Link to post
Share on other sites
quote:
Original post by JohnBolton
Spherical harmonics is a good real-time approximation to radiosity.

No, they are not. They are actually a pretty bad way to store a GI solution, from a quality point of view (compared to lightmaps). SH in their current form are absolutely unusable for point lights.

For skylight, however, you are right, they are a pretty good approximation.

Oh and BTW: SH do not approximate radiosity, they store an approximation of a lighting solution (global or not).


[edited by - Yann L on July 26, 2003 5:50:15 PM]

Share this post


Link to post
Share on other sites
It is a common misconception that SH is a lighting method; to build on what Yann said and hopefully dispell the mistaken notion, SH can represent lighting data from any GI method. It simply stores the lighting data in a compact and relatively efficient form (point lights excepted).

I still lean heavily towards a solution based on photon mapping; that road seems to have the best balance of robustness and efficiency.

Share this post


Link to post
Share on other sites
There are some realtime raytracers and photonmappers around on the net... or at least they claim to be realtime. Not sure what scene complexity they can handle though.

Michael K.,
Co-designer and Graphics Programmer of "The Keepers"



We come in peace... surrender or die!

Share this post


Link to post
Share on other sites
I'd be interested to see such an animal... got any links?


[edit] And before anyone asks, yes, I've googled realtime photon mapping. Like I said, I've spent several months researching it, and all that I know of is a few proposition-type white papers.

[edited by - ApochPiQ on July 26, 2003 7:43:24 PM]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!