Engine: Graphics vs Rendering

Started by
4 comments, last by OctDev 21 years, 1 month ago
In this article, the author lays out some high-level architecture for an engine. Among the primary components on the same highest level are System and Renderer. System is made up of sub-systems. One such, Graphics, “deals with putting things on the screen.” System is also the “only part that should need major modifications if porting to a different platform.” Renderer is made up of distinct modules. “Each one of these sections needs to have an interface that easily allows for changes in settings, position, orientation, or any other setting that may be associated with the system.” Additionally, “one thing that is nice and convenient is to have all triangles (or faces) ultimately pass through the same point in the render pipeline.” I am having trouble seeing the author’s intent as to the proper correlation between the two, and exactly when he intends to send the polygon/lighting/texturing/etc information from the Renderer to the Graphics component. Additionally, shouldn’t Renderer eventually handle rendering itself? Perhaps my confusion lies in his naming…maybe Graphics really is the renderer where as Renderer is more along the lines of a scene manager. To achieve API independence, the actual rendering process must be abstracted, where-as scene management would not directly correlate to any graphics API. Am I missing something? How would you approach this design in general? The Tyr project is here. [edited by - OctDev on March 7, 2003 8:44:01 PM]
The Tyr project is here.
Advertisement
What a coincidence, I was reading that very same article just the other day trying to base my engine design on it. I was also confused by exactly that! It'd be great if someone could lend some input on this, but after reading this I think the author should have explained things a little better than he did.

[edited by - Ivyn on March 7, 2003 10:53:08 PM]
-- Ivyn --
Let me try to shed some light on what I think the author of this article is meaning.

Suppose you have 3 classes, sky, terrain, billboard.

You dont want to render the sky, then set a billboard, then set the matrix for the terrain, then set the texture for the terrain, then render the terrain. then another billboard.

You dont want to pass it all at seperate times. You want to find a way to do this:

SetAllMatrixes;

SetTexture1;

All the primitives that have texture 1 render them, and try to get all of them into as little ammount of triangle lists as necessary.

SetTexture2
Do the same.

It would be very ugly and inneficient to

SetBillboardMatrix
SetBillboardTexture
RenderBillboard

SetSkyMatrix
SetSKyTexture
RenderSky

SetBillboardMatrix
SetBillboardTexture
RenderBillboard

SetLandscapeTexture(s)
SetMatrix
Render

get the idea?

You want to find a way in your engine to design it in a way where you

This would be the GRAPHIC system of your engine.

::SetMatrices
::SetTextureStages
::SetTexture1
::RenderEverythingWithTexture1
::SetTexture2
::RenderEverythingWithTexture2

::ChangeTextureStagesIfNecessary
::SetTExture1
::RenderEverythingWithTexture1
//etc

TechleadEnilno, the Ultima 2 projectwww.dr-code.org/enilno
quote:Original post by Ivyn
What a coincidence, I was reading that very same article just the other day trying to base my engine design on it. I was also confused by exactly that! It''d be great if someone could lend some input on this, but after reading this I think the author should have explained things a little better than he did.

[edited by - Ivyn on March 7, 2003 10:53:08 PM]


lol exactly the same here!

| Panorama 3D Engine | Contact me |
| MSDN | Google | SourceForge |
The difference between rendering and graphics systems isn''t really clear in this article, but I think I know what the author meant.

The graphics system is basicaly an interface for whatever API(s) you choose. It doesn''t deal with skyboxing, billboarding, or any of that, just triangles, textures, display lists, and low-level graphics stuff. The rendering system is a layer above that, which takes care of higher level stuff like billboarding, particle systems, skyboxing, etc.
Ok so what is the best method of coupling for a graphics system and a rendering system in that manner?

In your rendering system you generate all of your scene data into some format of your choosing, and then send that to the graphics system, which in turn sends it to hardware? Hmm, I am not sure of the best way to approach this.

The Tyr project is here.
The Tyr project is here.

This topic is closed to new replies.

Advertisement