• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Draw Calls

Messages
158
Country
unitedkingdom
Having been designing scenery for FS9 and FSX for many years, it wasn't until a couple of years ago that I learned how to do it with good performance in mind. The breakthrough came in the form of an article from Microsoft about polygons, texture vertices and draw calls:

http://blogs.technet.com/b/torgo3000/archive/2007/06/19/performance-art-3-polygons-don-t-matter.aspx

In essence, what it means for scenery is that the fewer draw calls the better. That's achieved by large Gmax scenes with objects attached together and texture vertices welded together at every opportunity. In crude terms a draw call for a scenery object could be defined as 1 Gmax scene and 1 material. That's supplemented with LODs of course.

Having started some aircraft designing, I'm keen to understand what constitures a draw call in an aircraft model (FS9 and FSX, if there is any difference). Models I have examined so far might typically have 6-8 LODs (AI) and perhaps 30-40 draw calls, sometime s a lot more.

Could someone please outline how a draw call is defined for an aircraft model please? I would of course like to be able to interpret from that, how to create them efficiently.

Thanks in anticipation,

John
 
Hi John,

I feel the scenery definition is a bit crude. The idea is indeed to use as little materials (and textures) on an object as possible. But putting everything in one GMax scene will in general not give better performance. FS determines per object if it has to be drawn or not and if everything is in one object, it can only decide to draw the entire object or not. While if you have smaller objects, it can be decided per object (or group of objects). That will give better performance.

Also many complex sceneries can't be made with just one texture (material). So you will still need to use multiple. But if you use only 1 texture per object that will result in better performance.

If you do not have LODs in a scenery object, you can also benefit from drawcall batching. This means that all polygons with the same material from different objects are still drawn in one drawcall. Using LODs breaks the drawcall batching.

For scenery welding vertices will in general not reduce your texture vertex count. This is because vertices can only be shared if the position, normal and texture mapping is the same. In many cases the normal is not the same on different polygons for example. In general only if you have smooth objects vertex sharing will really help.

For aircraft the same rules apply. But with a few small differences. Aircraft are normally the center of the scene. So they require a lot of detail. Which usually means many textures and polygons. So you would still try to minimize the amount of drawcalls, but having a few dozen is quite normal.
 
Arno

i know about welding vertices in the model...building a model with an attempt to reduce unneccesary complexity....i know what a texture,and a material is.

but welding tex vertices......what is the basic concept...and how practicaly would you do this....

some things i know well, and some things i dont...i dont have the basic background...have read torgo articles, but they presume a certain level of knowledge.....

you weld the tex verts?....in the uvw editor?...weld the uvw maps of one mapped object, to make one uvw of an object?.....

uvw map a cube,planar,6 squares,place in position and weld into one map,sort of a cruciform shape?

is that the principle?

how about a fusalage.....top...bottom...left....right....line up the maps, oriented correctly.....but they will only meet at some verts...would you weld verts that meet?

what about the normals...?

sorry for the list of questions....as you can see ime self taught...ime a lousy teacher......can you put the contents of all you geniuses brains on the wiki,so i can download them into my brain.....jim

ps, i think the problem is terminology, when someone mentions tex i think of my bitmap...the uvw map brings to mind, my models verts....jim
 
Last edited:
Hi,

Welding texture vertices is not directly the same as editing your UV coordinates.

A texture vertex is unqiue when it has the same:
  • position (XYZ)
  • normal
  • texture coordinates (UV)

So if you weld the position of vertices in your modelling tool, it can still happen that you get more vertices in your MDL because the normal or UV coordinates are not the same.

Think of a simple cube. If I ask you how many vertices it has you will probably say 8. But how many texture vertices does it have? The normal for each plane is different, so that means you have at least 24 texture vertices. If each triangle as a unique texture mapping you can even have up to 32 texture vertices.

I think most developers don't active try to lower the texture vertex count. But if you just apply smoothing where needed and make sure that the texture mapping of different triangle match (so that the UVs can be shared), then you will at least not waste texture vertices.
 
The large multiple object scene, sharing a single material (1024 x 1024 sheet) with welded common Tverts method and LODs has paid huge dividends for us at ACG. The frame rates in our Bentwaters/Woodbridge, Marham and new Coningsby sceneries are way ahead of the performance than our earlier sceneries, like Waddington and my older Coningsby that uses much larger numbers of objects and multi-materials. I too didn't understand the jargon of the article, but having experimented with what we thought it meant, we certainly improved drastically.

For my AI aircraft I use only 1 material/texture, except for a prop disc where that's necessary. Could you possibly give me some examples of what each of the 30 or so draw calls in an aircraft might represent please Arno?
 
Just to reiterate what Arno said.

You don't need to create a single large scene to batch drawcalls, although certain aspects of it are easier if you do create a single scene.

The LOD / animation part of the FSX drawing engine is markedly different to the optimised batch part.

Still .. if it works for you then that's fine.

I think on aircraft, the same principle applies, except that you are only dealing with the Animated / LOD engine.

So Unique material settings = 1 drawcall.

What I don't know is if you have part animated and part non-animated using the same material, whether that is a single drawcall or two.
 
An example of how a large scene works well for me is the placement of several hundred trees in a scenery. I have 1 texture sheet with a few varieties of tree. I can vary the height and size of the cruciform planes in Gmax to give variation. I then attach all the trees together to form one object and weld all the common Tverts together. That might only amount to 12 points (3 trees) with several hundred sitting below each, so the welding is easy. The frame rate penalty in FSX at Woodbridge (Rendlesham Forrest) for the trees is only about 2 fps on my PC. I can't get anywhere near that level of performance, even when placing from a library, in other ways I have tried.

So, for AI aircraft, although each part uses the same material/texture sheet, does each part represent 1 draw call because they are not attached together in those cases where individual animations are needed? I presume also that where several LODs are included in the file, there's a draw call at every switch? I'm just trying to understand what influences frame rate in aircraft design apart from the number of polygons and Tverts.
 
Hi,

LODs are not drawn at the same time, so they do not give more drawcalls. Each LOD is drawn with the amount of drawcalls it has.

Animations will give more drawcalls though. Animated parts become their own drawcall because of the animation.
 
So for example if there are 100 mdl objects in scenery and all use 1 texture is that 1 or 100 draw calls?
 
It depends. If drawcall batching is enabled for the mdl files and all material settings are equal, then it will be one drawcall. Else it will be 100 drawcalls.
 
I'm trying to get the grasp on things. So if I have for example 30 light poles on an airport. Can I enable draw call batching for those objects (so 1 draw call) and keep LODs on other objects like hangars which mostly use separate texture files?
 
Yes you can, the drawcall batching is enabled or disabled per mdl file. So you can use it for certain objects and not for others.
 
Back
Top