scenProc and error reporting

Let me start by saying that the recent scenProc releases might be a little less robust. Some users are reporting crashes since I made the change to read the FSX autogen configuration from the FSX installation folder, instead of the SDK.

To help me to figure out what goes wrong, because as a developer would always say it works fine on my PC, I have added an error reporting function to scenProc. It works just like the error reporting in ModelConverterX. If you encounter a crash, you can send a report to me and it gets logged in my bugtracker automatically.

So please do so if you encounter a crash, as it helps me to make the tool more robust and fix issues I might not even be aware of now.

Drawcall batching settings

I have made a few small changes to the ModelConverterX settings when it comes to drawcall batching. With these changes it is now also possible to make MDL files without drawcall batching. In some cases that is needed, because the batching can give some artifacts.

Before there was one setting that controlled whether LOD worked or not. That setting was called DrawcallBatching. Now there are two settings:

DrawcallBathching, this determines if objects are exported for drawcall batching or not

DrawcallBatchingWorkingLOD, when DrawcallBatching is true, this determines if LODs are working or not.

DrawCallMonitor update

I have just made an update for DrawCallMonitor. With this update you can also load an object library BGL file and see the statistics of each object. The be able to switch between objects there is a list displayed on the right.

This update should make it easier to inspect files to see how many drawcalls they have, if they have drawcall batching enabled, etc.

Some might wonder why not use ModelConverterX for this, since it can also show this information. The difference between the two tools is that DrawCallMonitor will show the statistics as they are in the MDL or BGL file. While ModelConverterX will load the object and then derive the statistics from its internal representation of the object. In most cases that gives the same values, but not always.

Image2013-05-01 2032.44.587

scenProc and autogen configuration

From the next development release scenProc will read the autogen configuration files from a different location. Until now these were read from the XML files in the Autogen SDK folder. But these might not always reflect the configuration that is actually loaded into FSX. So from the next version the tool will read the autogen configuration from the autogen folder of FSX. This ensures that the items you use in scenProc are also available when you start FSX.

Because the autogen configuration can be stored both as XML and as SPB file in the autogen folder, scenProc can now read from both of these formats.

One word of caution, in your FSX autogen configuration there could be elements installed by other addons. Be careful not to use these in your own addon, as you can’t expect your users to have the same addons installed as you do.

Where does the light come from?

A while ago I changed the way the lighting works in the ModelConverterX preview. Before the light would always come from the view point, while now there is a separate light location. The downside of this change is that you now can see that some sides of the model are always darker.

I have been thinking about adding a nice time of day simulation where the sun moves around your object, but in the end I decided that is probably not so useful. Instead I have now added two sliders where you can manually alter the direction where the light comes from. The azimuth slider controls the direction it comes from and the elevation slider determines the height of the light compared to ground level.

You need to click on the button with the three yellow arrows you show or hide the toolbar where the sliders are location.

I hope this feature makes it even easier to inspect your model in the right conditions.

Image2013-04-15 2123.12.022

Flattens from 3D objects

Last week I got approached by different developers with suggestions for ModelConverterX to create flattens. So given multiple questions about the same subject I was trigged to look into this issue. Since I mainly create scenery for the Netherlands I have never had trouble with flattens myself. I think in the Netherlands you would even get away without any flattens, since the terrain is already flat.

But in more hilly or mountainous areas the problem is that FSX airports have to be flat, so a flatten is created for the airport. But if the terrain around the airport has quite some elevation differences, you are likely to end up with your airport on a plateau or other undesirable results.

By creating a sloped flatten you can usually make a more gradual transition from the airport to the surrounding terrain. Tools like SBuilderX and ADE allow you to create such flattens. But finding the correct elevation for the points can be tricky.

With this new functionality that will be available in the next development release another way to create sloped flattens is possible. You can now model the terrain shape in your favourite 3D modelling tool and convert it to a flatten with ModelConverterX. What this functionality does is create a sloped flatten for each polygon in the model.

Simply model the shape you want and export it to a MDL file. Then you import the MDL into ModelConverterX and enter the coordinates of the reference point. Next under export scenery you will find the new format “FSX flatten BGL file” and this will use shp2vec to create the flatten BGL from your object. Below is a picture where I turned one of my test objects into a flatten (I know, this is not a useful terrain shape, but it demonstrates the concept).

I am not sure yet how easy it will be to model a shape in your 3D modelling tool and still get a nice transition to the surrounding terrain. To do that well I guess you need to be aware of the terrain shape in your modelling tool. I would be happy to hear any feedback from developers that try this new approach on how that works and which improvements could be made there.

Image2013-04-14 2221.55.890

 

Import AGN files

Until now the scenProc tool could only be used to create AGN files. But when you want to enhance or view existing AGN files it is also useful to be able to import them again. That feature has been added to the development release versio now. To illustrate how it works I will explain two use cases where this new step is used.

Enhance existing AGN files

Let’s assyme you have made some autogen files before only containing forest polygons. You used a file like this to create this autogen:

IMPORTOSM|schier.osm|*|*
#
SPLITGRID|AGN
#
CREATEAGNPOLYVEG|FTYPE=POLYGON;landuse=forest|{e8b937fd-a1f2-4bd5-8548-2c80d30102af}
#
WRITEAGNFILES|FSX|c:\flightsim\fsx\myscenery\texture

And now you want to add autogen buildings to the same area as well. Of course you could run the entire process again, adding more rules. But now you could also import the existing autogen and add only the new buildings. This is a configuration file that would do that:

IMPORTOSM|schier.osm|*|*
#
IMPORTAGN|c:\flightsim\fsx\myscenery\texture
#
SETAGNBUILDINGHEIGHT|*|1.0;0.0;0.0;0.0
#
SPLITGRID|AGN|building=*
#
CREATEAGNGENBUILD|FTYPE=POLYGON;building=*;FWIDTH<20|{5ae04eb6-934c-4f63-bb48-5e7dee601212}|MAXRATIO=2
CREATEAGNGENBUILD|FTYPE=POLYGON;building=*;FWIDTH>20|{6089A0BD-CED1-4c47-9A9E-64CDD0E16983}
#
WRITEAGNFILES|FSX|c:\flightsim\fsx\myscenery\texture

What happens here is that after loading the source data, you also load the existing AGN files. This means that all autogen defined in there is added to your data cells and when you create additional autogen it will be added to what is already there. So when you export it agian you have the old and the new autogen.

Export AGN files

How scenProc normally works is that you load vector data, this is then stored as internal vector features. Using the different steps you then create autogen objects out of these. In the example above the autogen objects were imported again, but in that case they are not converted to features, they stay as autogen. If you want to export the AGN to shapefiles for example, you would have to convert them back to features. This configuration shows how that can be done:

IMPORTAGN|c:\flightsim\fsx\myscenery\texture|CREATEFEATURES
#
MERGEGRID
#
EXPORTSHP|*|my_agn

The additional CREATEFEATURES option tell the tool to make features again. And these can then be export to SHP. The MERGEGRID step is optional, but what it does is the reverse of the SPLITGRID step, it combines all different cells into one big cell. This means you get one SHP file for the autogen, else you would get a SHP file per tile

Choosing shaders

A new option has been added to ModelConverterX, with this option you can force the preview to use simple shaders. This option has been added because certain graphics cards have performance issues with the more complex shaders that are used by default. By setting the ForceSimpleShader to true the preview is forced to use the simple ones (you need to restart to see the effect).

What does simple shaders mean? It means that the preview will not show the more advanced features like night textures, bump textures or specular textures. Only the diffuse colour and texture will be shown. But that should be enough to view your object at a better performance.