• 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.

A question about drawcall batching

Messages
108
Country
france
I am not sure I understand the full concept in all its details (although I carefully listened to Arno's conference on this very topic last year over the internet).

Are drawcalls batched for all instances of a single scenery object, whatever their respective position in the scene? Or only for objetcs having the very same scale/heading/pitch/bank?

Something is evident to me:
1- Say I do create an area full of 1000 times the same object (1000 instances of the same one, scale/heading etc as said above). And I fly by over my scene and look.

2- Now I create the same area full of 1000 times this object, but now with different headings for instance (Whisplacer is very useful to handle this way of filling). And I fly over and look.

Obviously, my first flight is clean and easy, buttersmooth, when my second flight will be more difficult (some stutters, lags etc).

So it is evident to me that drawing 1000 times the very same object is easier for the sim than displaying 1000 instances of the same object but with different headings.

Can I conclude that drawcall batching applies only to "cloned" objects and not to objects with different positions?

In other words, if I include here and there in my scene multiple instances of a single MDL (with different positions: heading/pitch/banking) will it have a bad impact on scenery fluidity?
 
Any objects with the same material will benefit from drawcall batching, regardless of placement.

Say you have a car .mdl, import it into MCX and export again with the batching enabled. Then you can put it into a library and place it many, many times with ADE, IS3 or place them with .xml and the batching will work.

I don't know if objects with separate GUIDs but the same materials will benefit from it.

A good thing to do, if you can, is place all of the instances in a single .mdl, it will require only a single material call and you can make LODs of the model too. But if it's not all at airport level, this is very difficult.
 
There are a couple of limitations, though. You cannot use LOD models, and you cannot place them (in FSX) with pitch or bank other than 0.
 
Yep, seems that batching doesn't apply to texturing only, but to the whole object display process (textures AND geometry).
Because as I said in the example given in the beginning of this thread: 1000 times the same unique object are obviously displayed more quickly than 1000 times this object placed in various positions.
 
I think if you place anything 1000 times, the FSX will be slower than duplicate it in Gmax and export them as one MDL. FSX is not good if you place the same thing so many times in XML.
 
Hi,

Interesting question. I am not sure if scaling influences the drawcall batching. I don't think so, but I'm not sure.

The idea is that all polygons with the same material settings in the scene are combined into one batch for drawing. So for sure this goes over multiple instances. Setting a heading and scaling is another transformation, but I assume that the batching algorithm handles this correctly. Else the drawcall batching could never work over multiple objects.
 
Hello:

IIUC, the FSX Autogen placement engine prefers (requires ?) that objects be "pre-sized" as unique individually sized scenery library objects (without LODs in the MDL, but with MIPs in mapped textures), so that FS performance may be more efficient when batched Autogen objects are rendered in FSX at run time.

Thus, AFAIK no "re-scaling" of a MDL up / down from its original size 'should' take place in FSX at run time when a autogen object is displayed via the autogen "batched" rendering sub-system method rather than the BGLComp method.

So, IMHO, this would mean that X-Y Quad Matrix Autogen object placement vector offset coordinates and object heading are the only parameters allowed to be processed when a library object is defined for use as an Autogen object via the Terrain.Cfg / Autogen sub-folder XML and SPB files.

I suppose the "read once / write multiple" instancing routines in the FSX rendering engine work more efficiently that way. :scratchch

GaryGB
 
Last edited:
For library autogen objects there is indeed no scaling possible. But on the other hand vegetation autogen objects do have a variable scaling and those are also MDL files.

From technical point of view rotating and scaling are also the same, both are just a transformation matrix in your rendering scene.

But we never know how the internal code really works. I'll see if I can do some testing with and without scaling to see if I can notice a performance difference.
 
In the SPC configuration file you define which MDL files are used (by their GUID). But in the vegetation class you can also specify the min and max scaling value to use for the object. That way you can get variation in the sizes.
 
I usually turn that off because I had problems with the dc batching when I placed the same object multiple times in one obx bgl with SBX. Strange things happened, like part of the texture became invisible (e.g. wheels) or the whole model was not shown at all. I link that to the drawcall batching because if I save the model with that option being off, everything is OK.

There always was a certain breakpoint, being number of concurrent objects (which was different from one model to the other) until that started to happen and if that number is further increased you end up with the no show.

I don't have an explanation for that but since there's the work around, I never really bothered.

Cheers,
Mark
 
There is a maximum number of polygons per drawcall, around 43000, if you get above that the object will disappear. So it depends on the complexity of the object how many instances that is.

For autogen vegetation objects you have to enable drawcall batching btw, else they don't show at all.
 
For library autogen objects there is indeed no scaling possible. But on the other hand vegetation autogen objects do have a variable scaling and those are also MDL files.

From technical point of view rotating and scaling are also the same, both are just a transformation matrix in your rendering scene.

But we never know how the internal code really works. I'll see if I can do some testing with and without scaling to see if I can notice a performance difference.
You can scale an autogen vegetation object? How do you do that?
In the SPC configuration file you define which MDL files are used (by their GUID). But in the vegetation class you can also specify the min and max scaling value to use for the object. That way you can get variation in the sizes.

Hi Arno:

Many thanks for that "heads-up" to clarify that we do have options for variable sizing of Vegetation when placed as Autogen via ScenProc ! :)


I was only able to find a few links regarding a ScenProc Configuration file (aka "*.spc file") to supplement ScenProc.PDF in the ZIP file:

General info on ScenProc and download:

http://www.fsdeveloper.com/forum/threads/manual-tutorials.111459/

http://www.scenerydesign.org/scenproc/

http://www.scenerydesign.org/development-releases/


Info regarding the ScenProc Configuration file (aka "*.spc file")


http://www.fsdeveloper.com/wiki/index.php?title=ScenProc#Configuration_file

http://blogs.msmvps.com/arnogerretsen/

http://translate.google.com/translate?hl=en&sl=fr&u=http://www.pilote-virtuel.com/viewtopic.php?id=38265&prev=search

http://www.fsdeveloper.com/forum/threads/error-configuration-file-not-valid.317810/page-2

http://www.scenerydesign.org/2014/01/06/


Hope the info linked above helps readers of this thread with understanding and implementing that feature in ScenProc. :cool:

GaryGB
 
Last edited:
Hi,

Sorry, must have been a typo on my phone. Here I meant the SPB autogen configuration file, not the scenProc SPC file.
 
There is a maximum number of polygons per drawcall, around 43000, if you get above that the object will disappear. So it depends on the complexity of the object how many instances that is.

For autogen vegetation objects you have to enable drawcall batching btw, else they don't show at all.

Hi Arno:

The discussion above raises a few questions regarding use of draw call batching with MDLs when displayed as Autogen.


So, IIUC, vegetation object MDLs (ex: "crossed-plane-type" Trees, Grass etc.) MUST be called from inside a 'object library' ...if one wishes to display them as Autogen without draw call batching ?


And, IIUC, vegetation object MDLs (ex: "crossed-plane-type" Trees, Grass etc.) must NOT be called from inside a 'object library' ...if one wishes to display them as Autogen with draw call batching ?


Also, when you refer to "library autogen" objects, would I be correct in assuming you mean Autogen library "meta-objects" as defined in ex:

[FS install path]\Autogen\Default.xml


...placed via FS Autogen (*.XML and/or *an.agn-based) methods, and not BGLComp-compiled 'scenery library objects' that have instead been placed via (BGLComp XML-based) 'BGL-placement' methods ? :scratchch

http://en.wikipedia.org/wiki/Metaobject


https://msdn.microsoft.com/en-us/library/cc526979.aspx#Editingthedefaultxmlfile

"default.XML - Defines the library objects associated with each region and class of automatically generated scenery"


http://www.fsdeveloper.com/forum/th...ry-objects-using-scenproc.428708/#post-659640

http://www.fsdeveloper.com/forum/threads/creating-custom-autogen-trees.295122/

http://www.fsdeveloper.com/forum/threads/drawcalls-perf-one-scene-or-many.11315/



PS: An additional note regarding FS2004 (aka "FS9") Autogen trees:

http://www.fsdeveloper.com/forum/threads/replacing-autogen-tree-models.424469/

http://www.fsdeveloper.com/forum/threads/custome-autogen-tree-textures.426659/


Thanks in advance for your further clarification of this. :teacher:

GaryGB
 
Last edited:
Hi Gary,

Yes, when I write library autogen, I (usually) mean the objects from the default.xml file that can be placed with agn files. Not the BGL library objects as compiled with BGLComp.

I think the choice for drawcall batching is not as simple as you suggest. Also for BGLComp placed objects you might want to use drawcall batching for performance reasons. But then you have to be careful to stay within the triangle limit per drawcall (so the objects should not be too complex).

For autogen vegetation drawcall batching has to be on. But with complex objects you might also get issues of objects not showing in the autogen. So it seems a similar triangle limit is there. Although I don't know if the actual limit is at the same triangle count.

For autogen library objects I don't think that drawcall batching is required, but it might still be good for the performance of course.
 
Back
Top