Monday, September 22, 2008

The Future of Triangles Part 3: X-Plane 9

Before I post anything to my blog saying what might happen, standard disclaimers:
  • This blog represents my rambling about the directions I am considering for X-Plane's rendering engine.
  • This blog is not a promise or commitment of any kind to deliver any particular feature.
  • If I say I am looking at doing feature X, and feature X does not materialize, either in the near or far future, or, like, ever, consider this to be one big fat "I told you so."
With that in mind, I think the direction for lighting in version 9 is to introduce per-pixel lighting.

I don't know what other set of features we'll get with per-pixel lighting, but I am reviewing normal maps, specular maps, and the material attributes.  Per pixel lighting will mean smooth, round, shiny looking surfaces without using a huge number of triangles.

Now there are two sets of hardware that will not be able to support per-pixel lighting:
  • Cards without pixel shaders.  (GeForce 2,3,4, Radeon 7000-9200.)  You might know your card does not have pixel shaders because the pixel shader check box is not available in the rendering settings.
  • Cards with first generation shaders.  (This is the GeForce FX series and the Radeon 9500-9800 and X300-X600.)  These cards can actually perform per-pixel lighting, but they are so slow that per-pixel lighting will bring them below minimum frame-rate.
So unfortunately, there will be an authoring decision: add more triangles so that per-vertex lighting looks good, or use fewer triangles and rely on per-pixel lighting.  The decision will depend on what hardware you want to target at what performance level.  (For what it's worth, hardware that cannot support per-pixel lighting usually isn't very powerful, so there is something to be said for not having a lot of triangles on these lower end machines.)


krz said...

thats very good news that you consider this :)

means in the future we maybe have a:
- color-map
- normal-map
- specular-map

since my background is offline-rendering i hate specular-maps and prefer real reflection-maps (wich look the same, but produce reflections like on x-planes water instead of just a "fake" highlight). i know that some racing games like project gotham for the xbox360 use reflection-maps for the carpaint parts on the cars. every few "seconds" a car-centric cubemap is generated and applied to the carpaint-materials reflection slot.

i wonder if such a high-end tecnique makes sense for xplane? (i have no clue if there are planes that are highly reflective in real life, i think i have seen a p51 in il2 with a imitated chrome-look).

what do you think personaly about this?

AWC said...

So does this mean "IF" implemented that Cards without pixel shaders will no longer be able to run X-plane?

Benjamin Supnik said...

"So does this mean "IF" implemented that Cards without pixel shaders will no longer be able to run X-plane?"


The decision on minimum hardware requirements and the decision on rendering effects are separate.

- If we continue to support non-shader cards AND we do per-pixel lighting, then you simply won't get per pixel lighting on old cards.

- I cannot say what future requirements will be.

- I can say we are NOT going to CHANGE the hardware requirements in the MIDDLE of a version run to DISALLOW cards that used to work.

If your card works in v9, it will work for the rest of v9. I can say absolutely nothing about what will happen in v10, v11, v12, etc.

Actually, I can say this: I think it will be relatively unlikely for us to REQUIRE shaders -- too many cards have too many problems with their drivers...I expect we will always support some kind of really primitive "no features required" mode that works, so that users don't get stuck with a DVD they can't run at all, no matter how toasted their drivers are.

But I don't think we'll do any more new eye candy that doesn't require shaders...the non-shader pipeline is just about as maxed out as it can be already - we're not going to invest more work in 1990's graphics technology.

The future is shaders - even if they are not required for compatibility/troubleshooting reasons. You'd certainly be insane to pick up a new graphics card without them.