Object optimization

Moderators: Uros, OXO

Post Reply
User avatar
maymar
Posts: 645
Joined: Thu Dec 01, 2005 2:00 pm
Location: Leszno -> Warsaw (Poland)
Contact:

Object optimization

Post by maymar » Mon Jan 07, 2019 7:50 pm

I would to know how to best optimizing object for sceneries.
Firs of all i made short movie to presenting how in my creating scenery change FPS during flying over Wrocław (biggest city in scenery) with lot of 3d objects.


You can see that on blue sky FPS hit 200FPS but when i point view to the object it decrase to 30-40 FPS. All object is very simple - like single box.
So, for example lets stay with that box.
1* What is count to rate FPS: vertices, edge or surface?
2* if i remove bottom surface (that is not visible when box is placed on ground) is it help to increase FPS?


Second topic that i hit during recording was strange behaviour of the glider during entry and leaving thermal - you can see it from 7:00 on the movie. Is it correct? I set wind to 0km/h, wave also all on 0, thermals as below
thermalsetting.jpg
You do not have the required permissions to view the files attached to this post.

KipperUK
Posts: 145
Joined: Fri Sep 21, 2018 9:30 pm

Re: Object optimization

Post by KipperUK » Mon Jan 14, 2019 3:44 pm

How many objects is a lot of objects?

User avatar
maymar
Posts: 645
Joined: Thu Dec 01, 2005 2:00 pm
Location: Leszno -> Warsaw (Poland)
Contact:

Re: Object optimization

Post by maymar » Mon Jan 14, 2019 8:29 pm

On 4 tiles i have about 3000 objects - but it depends how you count object. Between right tiles you have Wrocław city
4tile.jpg
For me one object for example of village is a 36 boxes that represent buldings.
Budynki_wies001.c3d.png
You do not have the required permissions to view the files attached to this post.

User avatar
EDB
Posts: 1356
Joined: Mon Oct 31, 2011 1:17 am
Location: The Netherlands, Europe Continent, Earth Planet, Milky Way Galaxy, Virgo Super Cluster

Re: Object optimization

Post by EDB » Mon Jan 14, 2019 9:24 pm

maymar wrote:
Mon Jan 07, 2019 7:50 pm
You can see that on blue sky FPS hit 200FPS but when i point view to the object it decrase to 30-40 FPS. All object is very simple - like single box.
So, for example lets stay with that box.
1* What is count to rate FPS: vertices, edge or surface?
2* if i remove bottom surface (that is not visible when box is placed on ground) is it help to increase FPS?


Second topic that i hit during recording was strange behavior of the glider during entry and leaving thermal - you can see it from 7:00 on the movie. Is it correct? I set wind to 0km/h, wave also all on 0, thermals as below
thermalsetting.jpg

FPS get a hit with many faces.
The stuttering in the thermal is the loading of one or multiple very large files that get into (visual) range I think.

Do you remember the Hahnweide SW Germany scenery in Condor V1..? If you came within 10km of the Hahnweide airport you had a very big hickup. Then the whole airport with all the details had to be loaded (unnecessary detailed for that distance). This is the same, but then with many different building blocks that are loaded when in visual range. It's better to have only some small blocks that are used everywhere and stay in memory then many different ones. And then when the FPS drop too many then stop adding objects. Even remove some not so important ones.

When flying on flat terrain you usually are very high during the flight. Then houses hardly have any height. It's better to only make objects that are higher then 15m up to 30m.
Condor2 Landscapes : Nephi (U14) for Condor2 and Boulder (KBDU) for Condor2 - Early Access.
Condor Skins : Team the Netherlands 5.3 and Dutch Nationals 14.10

Uros
Condor Team
Posts: 1564
Joined: Sat Apr 02, 2005 8:39 pm
Location: Slovenia
Contact:

Re: Object optimization

Post by Uros » Tue Jan 15, 2019 8:13 am

The most critical performance factor is the number of draw calls. A draw call is invoked for each object within a C3D file. So if you have 3000 C3D files and each has 30 objects inside, that's 90000 draw calls (texture swaps) per frame!

So the golden rule is group, group, group. It's better to use one big texture and group all objects within the C3D into one object. Try to even group small C3D files into bigger ones.

The number of vertices/faces is by far less critical on todays hardware.
Uros Bergant,
Condor Team

User avatar
maymar
Posts: 645
Joined: Thu Dec 01, 2005 2:00 pm
Location: Leszno -> Warsaw (Poland)
Contact:

Re: Object optimization

Post by maymar » Tue Jan 15, 2019 7:54 pm

Uros, thank you for your explanation.
Now I know what to do :-)

The last question:
how big can be texture if i should merge it? Is optimal will be 2048x2048px?

User avatar
OXO
Condor Team
Posts: 5763
Joined: Mon Feb 13, 2006 1:08 am
Contact:

Re: Object optimization

Post by OXO » Tue Jan 15, 2019 11:27 pm

maymar wrote:
Tue Jan 15, 2019 7:54 pm
Uros, thank you for your explanation.
Now I know what to do :-)

The last question:
how big can be texture if i should merge it? Is optimal will be 2048x2048px?

texture size is not a performance issue so much, only a memory consumption.

The texture must be dds and saved as DXT1 with no alpha.
Chris Wedgwood,
Condor Team

KipperUK
Posts: 145
Joined: Fri Sep 21, 2018 9:30 pm

Re: Object optimization

Post by KipperUK » Wed Jan 16, 2019 5:09 pm

Uros wrote:
Tue Jan 15, 2019 8:13 am
So the golden rule is group, group, group. It's better to use one big texture and group all objects within the C3D into one object. Try to even group small C3D files into bigger ones.
Just to be entirely clear for my understanding ...

Making say, a town, using 300 houses that all have different C3D files (and possibly textures) would be terrible / the worst for performance.
Would it be better to make the same town of 300 identical, but separately placed houses that all use the same C3D file and texture?
Would it be better still to make the same town of 300 identical houses and place them all into the same C3D file, so that they're placed in Landscape editor as one single object?
Is there something even better than that?

User avatar
JBr
Posts: 498
Joined: Tue Feb 28, 2006 11:33 am

Re: Object optimization

Post by JBr » Wed Jan 16, 2019 5:39 pm

Even better -- put all 300 houses into the same scene, but before exporting them to OBJ, merge all of them to one scene object. Then your final C3D file would contain one big scene object of 300 houses (one "row" in the Object Editor). Given how Uroš explained things in his post, it would mean just a single draw call.
Image

KipperUK
Posts: 145
Joined: Fri Sep 21, 2018 9:30 pm

Re: Object optimization

Post by KipperUK » Wed Jan 16, 2019 10:32 pm

Interesting but could make creating large cities awkward, unless you throw away the idea of trying to match building locations with real ones - which is cool because nobody is going to pay *that* much attention.... however,that might lead to problems with roads that come into and out of the city.

How on earth does one UV map a whole neighbourhood? Will blender allow texturing one object and apply that to all of them?

User avatar
OXO
Condor Team
Posts: 5763
Joined: Mon Feb 13, 2006 1:08 am
Contact:

Re: Object optimization

Post by OXO » Thu Jan 17, 2019 8:49 am

KipperUK wrote:
Wed Jan 16, 2019 10:32 pm
Interesting but could make creating large cities awkward, unless you throw away the idea of trying to match building locations with real ones - which is cool because nobody is going to pay *that* much attention.... however,that might lead to problems with roads that come into and out of the city.

How on earth does one UV map a whole neighbourhood? Will blender allow texturing one object and apply that to all of them?

Make the individual objects.
UV map them onto the same texture file. file may be large-ish :)
Combine objects into one object.
Chris Wedgwood,
Condor Team

User avatar
JBr
Posts: 498
Joined: Tue Feb 28, 2006 11:33 am

Re: Object optimization

Post by JBr » Thu Jan 17, 2019 8:57 am

KipperUK wrote:
Wed Jan 16, 2019 10:32 pm
Interesting but could make creating large cities awkward, unless you throw away the idea of trying to match building locations with real ones - which is cool because nobody is going to pay *that* much attention....
Actually, if you have a look at the default Slovenia scenery, you will notice that town and cities are done exactly like that, built from "building blocks" consisting of multiple houses/buildings.
Image

KipperUK
Posts: 145
Joined: Fri Sep 21, 2018 9:30 pm

Re: Object optimization

Post by KipperUK » Thu Jan 17, 2019 10:45 am

I did look at that, and figured it was probably for performance reasons but I had not been sure.

Now I am.

:)

Post Reply