Rendering of s3o vs. 3do

Rendering of s3o vs. 3do

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

User avatar
Felix the Cat
Posts: 2383
Joined: 15 Jun 2005, 17:30

Rendering of s3o vs. 3do

Post by Felix the Cat »

It seems that s3o renders much, much slower than 3do.

At very close to minimum settings, a plain, treeless, featureless map screen runs at about 60 FPS at a medium zoom. That same map screen with 50 AA Peewees (3do) on it runs at around 45 FPS. The same map screen with 50 Nanoblobs Sheep (s3o) on it runs at around 18 FPS. (30 Spire Rooks also run at 17-18 FPS.)

This came up because a lot of the map features that are going around, especially Smoth's palmetto-things and some of the other tropical and/or desert plant things are in s3o and slow down the game immensely on my computer. Some of Forboding Angel's beautiful maps are unplalyable for me because the features alone slow the game down to 15-20 FPS.

I have all of the bells and whistles - reflectivity, shadows, dynamic clouds, etc. - turned off. (On a side note, 3D trees also slaughters my FPS as well.)

Why is there this problem, and what can we do to fix it?
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post by Caydr »

Hmm... that's not consistent with my testing. I wonder what the differences are?

For instance, 100 GEM fighters of any kind (at 1000 triangles apiece) render at the same speed as 100 low-poly (non-evolva) bulldogs.

What options do you have enabled? For instance, reflectivity, shadows, etc... I know there's an actual gap when you have shadows and reflectivity on (especially shadows)... but on the other hand, GEM units are exponentially more detailed and therefore must have much more detailed shadow and reflection rendering.
Mugslugs
Posts: 89
Joined: 23 Aug 2005, 00:08

Post by Mugslugs »

this may just be me but i think the rendering part of s3o is essentially strapped on to the legacy 3do code.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Caydr, I'd like to know if the GEM stuff is all quads, or has triangles. All of the NanoBlobs units are pure triangles. From previous reading of the code, it appears that when Spring does tristripping (the process whereby it organizes the triangles prior to rasterizing them and then rendering each pass for teamcolor, reflectivity, glow, etc.) it basically has an entirely seperate process used for all-quad models, but with everything built with any triangles, it goes through EVERY POLYGON and then triangulates them again... even if they're already triangles! I've read the sourcecode regarding this step, and needless to say, I'm not really happy about that.

There needs to be a case that checks a model and if it's all triangles... doesn't re-triangulate them. This would also fix some rendering problems being caused, I think, by Spring's renderer sub-dividing triangles into multiple triangles.

Also, if you would be so kind as to send me a GEM model, I will compare it to the models for NanoBlobs and see if there are any significant differences in construction. I made sure that every model for NanoBlobs was really, really squeaky-clean, especially with the later models, which includes the Sheep... so these problems are not the result of poor construction, such as bad verts, etc.
User avatar
Felix the Cat
Posts: 2383
Joined: 15 Jun 2005, 17:30

Post by Felix the Cat »

Here is a screenshot of my settings. As you can see, no extras enabled - my computer can't really handle it - if I enable extras, I lag like heck anytime a significant number of units go onscreen.
User avatar
SwiftSpear
Classic Community Lead
Posts: 7287
Joined: 12 Aug 2005, 09:29

Post by SwiftSpear »

Caydr was testing with a radeon 9800 pro. What video card are you using?
User avatar
Felix the Cat
Posts: 2383
Joined: 15 Jun 2005, 17:30

Post by Felix the Cat »

Radeon Mobility 9000.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

turn off AIException catching and VSync
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Argh: Sounds strange, are you sure it doesn't simply break stuff up to form the tristrips?
User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Post by jcnossen »

Why should he turn of AI Exception catching?
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

because its known to conflict with NTai exception catching, and as of RC22 it'll affect the groupAI's too among other things.
User avatar
jcnossen
Former Engine Dev
Posts: 2440
Joined: 05 Jun 2005, 19:13

Post by jcnossen »

Do you see anything AI related here in this thread?
Don't go offtopic, you're always telling other people not to mess up your AI threads.
User avatar
mehere101
Posts: 293
Joined: 15 Mar 2006, 02:38

Post by mehere101 »

Heres the deal: Mobility cards aren't to be trsuted too much. Mine took tire tracks and made them blue slime, while taking my commanders polygons and putting just one vertex from each polygon at the centre of the screen.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

I was only suggesting a few optimisations based on his settings.exe screenshot, chill......

In reference to post below:: =O you use the normal metal maker AI and not Advanced emtal AI?!?!?!?!?!
Last edited by AF on 24 Jul 2006, 22:06, edited 1 time in total.
User avatar
Felix the Cat
Posts: 2383
Joined: 15 Jun 2005, 17:30

Post by Felix the Cat »

mehere101 wrote:Heres the deal: Mobility cards aren't to be trsuted too much. Mine took tire tracks and made them blue slime, while taking my commanders polygons and putting just one vertex from each polygon at the centre of the screen.
If I had any issues like this I would have mentioned them.

To reinforce: both 3do and s3o render accurately; there aren't any rendering problems. They look fine. The rendering is good. There are no problems with how the rendering looks on screen. Etc etc.

However, s3o renders at about half the speed of 3do. Thus, s3o mods and maps with s3o features are pretty much unplayable on my machine.

I had the impression that I was not the only one with this problem, hence why I didn't post it in bug reports.

And AF, I don't use AIs other than MMAI, and that works fine, so I'm not concerned about optimizing settings for NTai.
mongus
Posts: 1463
Joined: 15 Apr 2005, 18:52

Post by mongus »

sheeps have A LOT of faces, not really optimized models. maybe its that?
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

They're about 1100 triangles apiece. Less than many of Caydr's models, and while they're not perfectly efficient on facecount, and really need to get remodeled, they're not insane by modern standards. Also, I should note that Caydr's tests were performed before we went to the new rendering engine, which eliminated whatever advantages were being obtained by using DirectX...
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

We've never used directx to render stuff, always OpenGL. Directx is used for sound though...... I think you mean the switch to SDL which was done 0.68->0.70
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

My bad, I thought DirectX was being used on the Windows version prior to 0.7x. At any rate, I do not know how much of a factor this is, honestly. Or how much of a factor Caydr's tests involving GEM models that all fly (and thus have a lower CPU load than ground objects) was, or... etc., etc.

My feeling on this is that mainly S3O is suffering because of tristripping inefficiency. Spring was optimized for quad-only models for the units, and no seperate case was created for models using all tris. Why this oversight wasn't corrected when S3O was implemented is kind've beside the point- the fact is that that's what we're looking at- every render pass, trimeshes are getting re-checked, re-triangulated, and then are passed to the rendering phase.

I guess that what I really need to do is create two simple models, like a pair of cubes, and then do a side-by-side comparision test. I'll do that tonight, it won't be hard.
Yeha
Posts: 96
Joined: 13 Aug 2004, 19:12

Post by Yeha »

s3o could be slightly slower on old graphics card since it needs to blend teamcolor gradually to the modell. AA Peewee is allso around 230 polygons (quads though, so it would be equal to a little more triangles) and a nanoblobs sheep is around 1000 triangles which would mean a little slower rendering for the sheep if your card is vertex limited.

On a modern card however the sheep would probably render faster since poylgon count usually isn't an issue and the sheep has considerable less objects than the AA Peewee.


Spring doesn't care if the s3o modell uses triangles, quads or tristrips, it just renders them as they are. Its up to the modelling software to decide how to output the modell, if you use the 3ds MAX plugin its all saved as triangles.

Edit: Did a quick test, on my 6600GT rendering 1000 AA Peewee gives 32fps and rendering 1000 nanoblobs sheep gives 41fps.
Post Reply

Return to “Engine”