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

scenProc Question(s) about Create3DBuildings

MatthiasKNU

Resource contributor
Messages
962
Country
germany
Good morning Arno, hello everyone!

For a few days now I have been working with the Create3DBuildings function of ScenProc.
I would like to use it to create the very densely built-up townships and slums in Africa better than with autogen for the sim.

I have already made my way through the manual, but a few questions still remain...

First of all, here are my test files:
township_test.zip

The test area is located near Cape Town Airport:
Google Maps KTC

While the roofs already look pretty good, the textures for the walls are only displayed usably for a few buildings (green).
The others are obviously very heavily distorted (red).
zwischenablage01idkmh.jpg


What do I have to do differently here so that at least most of the buildings look good?

One more question:
I have now added the scenery/texture folder to the sim. Unfortunately, the bgl is not displayed, but according to MCX the placement is already in the bgl - what do I have to do differently here?

Thank you very much in advance and have a nice sunday!
Matthias
 
Hi,

I don't know what the ground altitude is at your location, but I suspect that the object is below the ground, since it is placed at 0 ft MSL at the moment.

I am not sure what goes on with the textures, your builidng texture configuration file looks OK. I would need to use the debugger to see what is going on there.
 
What are you talking about with 2x4 or 4x4? I have no clue what you mean.
 
Chris, thank you so much, that was it!
I changed the texture to 1024x1024 px, and now it looks like it should!

zwischenablage0192kcp.jpg


Now I'm sure I'll get it to show up correctly in the sim - but I can't test it until I've landed. ;)

Thank you both so much for the moment!
 
scenProc should work with 512x1024 textures as well, I don't think I code any limitations for that. But apparently there is a bug in there that I need to check.
 
Now that I think about it, in the texture configuration nowhere it is specified what ratio the texture has. So scenProc does assume it is rectangular indeed. I'll probably have to add an attribute that stores the texture file ratio as well, so that non-rectangular files also work.
 
I still have a problem with the altitude:
I can specify in ScenProc that the altitude is MSL (ALTISMSL).
So if I do NOT specify that, then the altitude is the height above ground AGL, right?

So if I specify 1 here, for example, it means that the objects are placed 1 m above the ground, right?
I have already tried that, but apparently the objects are still under the ground.

And I have another question:
With about every 3rd footprint I get the following error message:
17:17 Create3DBuilding Warning Error, skipping footprint (The value for an Int32 was too large or too small).
I've already tried setting the WRITEDEBUGOUTPUT options, but either no logs are being written, or I'm just not finding them....

EDIT:
I have now built a DEM for it, from which I read out the terrain height, and I now feed ScenProc with it. That now works quite useably.
 
Last edited:
Hi,

The MergeScene step always makes a placement that is relative to MSL. That is because this step can combine different placements with their own altitudes in a combined object. For that to work the model does contain the altitude of the buildings already and the placement is thus MSL. In the project where I am using it each model is placed at the right altitude by reading elevation data. I think it should work if you give each building a certain altitude. The placement after the MergeScene step will still contain 0 MSL, but actually the model will have the buildings raised to the right altitude.

If you have a DEM scenProc can sample the building height from it as well.

Not sure about that Int32 was too large to too small error. But would mean you have some very large numbers. When processing many footprints you should only get errors on a few, if you get it on almost every one that must be a bug somewhere. Would you have a sample of a footprint that generates the error (or is it in the set in your initial post)?
 
The MergeScene step always makes a placement that is relative to MSL. That is because this step can combine different placements with their own altitudes in a combined object. For that to work the model does contain the altitude of the buildings already and the placement is thus MSL. In the project where I am using it each model is placed at the right altitude by reading elevation data. I think it should work if you give each building a certain altitude. The placement after the MergeScene step will still contain 0 MSL, but actually the model will have the buildings raised to the right altitude.

If you have a DEM scenProc can sample the building height from it as well.
Good morning!
Thank you, yes, that makes perfect sense!
I have now solved this as you suggested, by cropping the DEM with Python/ArcGIS and loading it into ScenProc.

I have re-uploaded my working directory here, I hope you can reproduce the problem.
It seems to affect almost every 3rd building - the shapefile contains 7765 footprints, but ScenProc only creates 5215 buildings from them.
townships.zip
 
OK, let me see if I can reproduce it here.
 
Hi,

I have found the bug. It was because the height of the texture segment (4 meter) and the ground floor height were the same. That gave a division by zero in the code. I have fixed it, so in the next development release it will be OK.

One thing I notice. Your texture is 4 meters in height, but your buildings have a random height between 2 and 5 meters. The ones between 4 and 5 meters in height will give a weird result. As the texture is only 4 meters, they will get two floors.
 
The new build, with the fix, is online by now.
 
Hello Arno!

Thanks for the quick update!
I just got around to trying it out, had the last of the exams for this semester this morning.
Everything works perfectly now!

And yes, I really have to get used to the texture creation and the function. I'm sure that once I've worked with it for a while, the result will look even better... ;)
 
Back
Top