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

P3D v4 Problem with Big Buildings

mendiola_loyola

Resource contributor
Messages
520
Country
peru
Hello,

I'm getting buildings bigger than the real size.
The polygon seen from QGIS is between two roads, but the generated building is covering part of the roads.
Is there a way to get the real autogen building width and height ?
The width and lenght of that building is 90 x 98 meters (Supermarket)

Regards
Alfredo
 

Attachments

  • BigBuildingShapeFile.jpg
    BigBuildingShapeFile.jpg
    61.7 KB · Views: 299
  • BigBuilding.jpg
    BigBuilding.jpg
    303.7 KB · Views: 318
Hi,

This building looks rectangular, so you should get a good shape in the autogen. Scenproc will use a bounding box that fits around the polygon, so for weird shapes you can get bigger rectangles. But this shape does not look weird.

Could you maybe send me the shp to inspect?
 
Hi,

I think this is related to the other problem you posted, I think the orientation is wrong here as well, that's why it is over the road.
 
Hi,

This building looks rectangular, so you should get a good shape in the autogen. Scenproc will use a bounding box that fits around the polygon, so for weird shapes you can get bigger rectangles. But this shape does not look weird.

Could you maybe send me the shp to inspect?

I'm attaching the shape with the building shown in the picture.

Regards
Alfredo
 

Attachments

Hi,

As I posted in the other thread I have found and fixed a bug. I think it will also solve this issue. Let me know if it does.
 
Hi,

As I posted in the other thread I have found and fixed a bug. I think it will also solve this issue. Let me know if it does.
Arno,
I installed the latest development Version v3.0.0.0 reea8574a DEV 19/02/2020
The alignment problems is gone but the buildings are bigger than their real size.
Is there a way to reduce the scale of the buildings generated?
That oversized buildings (Lenght and width) are causing overlapping between some buildings and some building are covering part of the roads.

BigBuilding2.jpg1582155561314.png

Thank you for your support.

Regards
Alfredo
 
Last edited:
OK, I haven't seen that before, so I'll have to take a look.
 
Hi,

I had a look at this issue and it seems something is wrong indeed.

What I did is make a photo real with the OSM map and put the building autogen on top.

In QGIS it looks like this:

1582227959595.png


In Annotator it looks like this:

1582227981203.png


And in the sim it looks like this:

1582228060371.png


The difference between Annotator and QGIS is logical, as the autogen building is made with the minimum area rectangle that fits around the shape. So that this polygon is slightly bigger is normal. But in the simulator it looks like the building because longer than you see in Annotator, while the width is smaller. So I need to check what is causing that.
 
Well, this is only to see the problem, now I must understand where it comes from. I do have an idea for that already, but I need to setup a test case to verify that.
 
Hi,

I made a test case where I put different building in a circle. The polygons I used for the autogen buildings have the same size as the black in the photoreal, the blue border is just added for some more contrast. This shows me that the size difference of the building depends on the orientation. For some direction the buildings are much bigger, while for others they match better.

Now let me see if I can understand where this comes from :)

1582317531254.png
 
I think it is related to the variation in the terrain tile LOD size based on various latitude values, just like there is a rotation distortion caused by this. But currently breaking my head on the logic behind it (or probably the lack of logic as this seems to be a bug in the autogen engine).
 
Hi,

I did a test with scaling the buildings and got them in the length direction about right, but then they become too narrow in the other direction.

I think I understand where the issue comes from. The AGN building polygons in the AGN files are defined in degrees basically, so while rendering they somehow convert that to a direction in meters. But for that they are using the size of a degree in meters based on the X direction, which takes the latitude of the position into account. In the Y direction however the size is different and that is not taken into account. So in that direction the building then becomes too big.

I think it should indeed be possible to compensate the building polygon for this mistake (just like I compensate for the heading offset already). But I need to think a bit more how i can program that in such a way that it works for any heading of the building.

At least one step closer again. It's time here now to get some sleep, but I'll continue tomorrow on this. Very interesting bug :D
 
Hi,

I have been making some progress. The buildings are less oversized already, but now some of them are a little bit too small. So that means I want to do some more testing and tweaking to see if I can get it to align even better. And afterwards I also need to test in different areas in the world, as this distortion depends on your latitude (around N/S 41 degrees there is no distortion at all. Which is probably why most of use never noticed this, since many countries are around that area.

1582355362466.png


For your shopping building it also means it fits better already:

1582355297152.png
 
Hi,

I have been making some progress. The buildings are less oversized already, but now some of them are a little bit too small. So that means I want to do some more testing and tweaking to see if I can get it to align even better. And afterwards I also need to test in different areas in the world, as this distortion depends on your latitude (around N/S 41 degrees there is no distortion at all. Which is probably why most of use never noticed this, since many countries are around that area.

View attachment 54976

For your shopping building it also means it fits better already:

View attachment 54975
Thank you very much for your help Arno.
Regards.
 
Hi,

Still not fully solved this issue, but I found out that the order in which vertices of the buildings are defined in the AGN file also has an influence. So although the building polygons look the same in Annotator, this order can result in different buildings being rendered.

Will continue tomorrow on this :)
 
Hi,

I still haven't fully solved it. When I adjust the logic some buildings get the correct size, but then others are too small or too large.
 
If you need help let me know please.
Maybe a scale command to reduce the size of all buildings x% generated could help.
 
No, it's not as simple as a scale command. The size is only incorrect in one direction. And it depends on the heading of the object how big the mismatch is.
 
Hi,

I did some more testing this evening, placing the test circle of buildings at different latitudes. As you can see in the images below, the effect depends on the latitude. Especially the buildings that are oriented horizontal are affected (either they become too long and too narrow or too short and too wide). And as expected around N40 (and S40) the effect is not visible.

I'm going to do some more brain crunching tonight to see if I can understand what the autogen engine does that can cause this effect. Once that is understood, it should be rather easy to compensate for it.

N0
1582835454399.png


N20
1582835475674.png


N40
1582835490661.png


N60
1582835501869.png
 
Back
Top