Monday, February 15, 2010

How to manage extremely complex 3D models in FSX

One of the issues I had devoping the F-35 was the extreme complexity of the model in terms of polycount - which led to several issues while compiling the model.
The problem I had was related to some of the "undocumented" FSX limitations. It was advertised that FSX models had no restrictions in terms of poly count, making it possible to create extremely complex models - far beyond FS2004 limits.... And this is true, with a catch.

There is still a 64K buffer limit for the draw calls - which in FSX are "grouped" by material. That is, you cannot have a unlimited number of vertices/polygons using EXACTLY the same material - as the polys of every part (even if disconnected) using the same material concur in the same draw calls buffer: this may result in:

  • FSX exporter fails to compile
  • Mdl is compiled but some parts are not showing correctly in FSX (either do not show at all, or they appear black or they cast shadows and don't show at all... I've seen every kind of weirdness)

SOLUTION:
  • Create several slightly different copies of the material in gmax (e.g. Engine_material_1, Engine_material_2, Etc. which may differ just by 1 point of specular power in the basic material proprieties so they will look the same in FSX)
  • Assign Engine_material_1 to some of the engine parts, Engine_material_2 to others, etc. so that each engine part goes into a different buffer
  • Compile and be happy
This is the magic "trick" that allows extremely complex models in FSX.
ONE CAVEAT: if this is your case, it is likely you have exceeded the visual complexity reccomended by Microsoft. That means you may have users that will complain about the frame rates when compare your model to default ones...

To be honest this was not the first time I've encountered this problem - but I saw that this trick was unknown to some designers and I wanted to share the knowledge. By the way, I'm told that similar issues (and solutions) happen in FS9.

As for the F-35... in Italy we say "appetite comes with eating", meaning that once you started making one thing it may be difficult to stop. In this case, I started a minor rework of the MFD to add some functionality...and it turned into a major remake (which was also helpful to reduce the number of textures). As of today, HSI,MAP,ENGine,FUEL,FCS sub-screens are working and 99% complete... The other functions (COM,ICAWS and WEApon subscreens) are much easier to make - the problem is that I do not have much time to work in
I promise I will post some images tonight.

No comments: