RuneStorm
http://www.runestorm.com/forums/

How does a 3D scene get rendered?
http://www.runestorm.com/forums/viewtopic.php?f=6&t=66838
Page 1 of 1

Author:  Tyster [ Mon Oct 06, 2008 10:41 am ]
Post subject:  How does a 3D scene get rendered?

I was wondering how game engine renders 3D geometry on the screen. I tried a Google search, but I must have the wrong key words because I don’t get anything. I have a theory. If you know much about this, please let me know how close I am.

Ok, here is my theory on how a game engine (or something like Blender/Maya) renders 3D objects on a screen in laymen terms. A camera shoots out a bunch of rays in a rectangular pattern that matches the screen resolution. For example, if the screen resolution is 1024x768, then the rectangular array of rays is 1024 wide and 768 high. If the view angle is 90 degrees, then the angle between any two consecutive rays is 90/1024 degrees horizontally and 90/768 degrees vertically. Each ray strikes a surface and reports back to the rendering engine the distance it traveled, its position in the rectangular array, and the color of the specific pixel on the material (paint) that is on the surface it struck. Then, the rendering engine does some fancy math to distort how it would render the two-dimensional image on screen to make it look 3D.

Then, for the bloom effect, which I’ve heard go by HDR, bloom, or specularity (in UE3), each pixel in a material has not just 3 parameters (red, green, blue), but an additional parameter for brightness. I believe this would be how one would get volumetric lighting and bloom. When a ray hits this pixel on the material on a surface, as describe above, the ray reports back its specularity value in addition to color, distance from camera, etc. The higher this brightness value, the brighter it makes its nearby pixels (on the screen) by modifying the image on screen after it has been rendered, but before it is displayed. This would be called post-processing, I think, where an image is modified after it is rendered, but before it is displayed on the screen, right?

Any thoughts? I haven’t really learned about this, just making a guess. How close am I?

Author:  Bjossi [ Mon Oct 06, 2008 5:19 pm ]
Post subject:  How does a 3D scene get rendered?

Wikipedia knows very much about this stuff.

Author:  cyberax [ Mon Oct 06, 2008 11:47 pm ]
Post subject:  How does a 3D scene get rendered?

Well...sort of...what you are talking about is very close to "ray tracing".

Here is some info, with links to some of the game engines with more detail:
http://en.wikipedia.org/wiki/Game_engine

Author:  ShadowBlade [ Thu Oct 09, 2008 4:46 am ]
Post subject:  How does a 3D scene get rendered?

i believe the 'Ray Casting' method is used.. (at least older 3d games, perhaps newer ones)..

Bloom, HDR and specularity are seperate things ;) Bloom is a blurrly bloom effect applied over very bright areas, specularity is the shininess of something, and HDR i'm not 100% sure on..

Author:  Tyster [ Thu Oct 09, 2008 12:33 pm ]
Post subject:  How does a 3D scene get rendered?

Intersting. I think I may have confused specularity for illumination. Thanks for the replies.

Author:  Bjossi [ Fri Oct 10, 2008 6:35 am ]
Post subject:  How does a 3D scene get rendered?

Ray tracing has not yet been used in any game as far as I know. But when it does become the typical rendering method, effects like AA, bloom and HDR will not cost any extra resources.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/