Adaptive Degradation

Adaptive Degradation

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
Falcrum
Posts: 149
Joined: 14 Nov 2007, 01:03

Adaptive Degradation

Post by Falcrum »

What you think to implement adaptive degradation to engine ? This may increase fps on low-end computers.

"when fps < 10 change model to box/point/wireframe

For identification unit use somthing like ComNameTags where name is type of unit

Image

Example in 3DS Max:
http://www.youtube.com/watch?v=osbogpUIcfE
User avatar
thesleepless
Posts: 417
Joined: 24 Oct 2007, 04:49

Re: Adaptive Degradation

Post by thesleepless »

LOD models would be better

if the model format allowed multiple LOD meshes per piece it could work really nicely without much of a change.

if distance is greater than distance1 then use the 1st LOD mesh, if it's further than distance2 use 2nd LOD etc. if it doesn't have a nth LOD mesh for that piece it'll use the n-1th mesh. you could make pieces invisible at certain LODs by having an empty mesh.

furthest LOD could just be a textured box or something if you want it to be very speedy.
User avatar
Falcrum
Posts: 149
Joined: 14 Nov 2007, 01:03

Re: Adaptive Degradation

Post by Falcrum »

I agree, LOD is very useful but you need make several meshes for each unit :/
User avatar
thesleepless
Posts: 417
Joined: 24 Oct 2007, 04:49

Re: Adaptive Degradation

Post by thesleepless »

Falcrum wrote:I agree, LOD is very useful but you need make several meshes for each unit :/
true, more effort for unit creators, but worth it i think... also, could probably make some kind of script to automatically generate LOD meshes for each piece?
User avatar
Falcrum
Posts: 149
Joined: 14 Nov 2007, 01:03

Re: Adaptive Degradation

Post by Falcrum »

User avatar
aegis
Posts: 2456
Joined: 11 Jul 2007, 17:47

Re: Adaptive Degradation

Post by aegis »

trepan did lua lod iirc
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Adaptive Degradation

Post by Argh »

LODs aren't all that useful, for big RTS games where characters already have nearly-optimal polycounts. Not drawing the object at all, more than X distance, is something that can already be done.

On the other hand, if somebody wants to do a low-POV or FPS game with this engine, they'd become essential. Nobody's working on one atm, so this subject's moot.
User avatar
zwzsg
Kernel Panic Co-Developer
Posts: 7052
Joined: 16 Nov 2004, 13:08

Re: Adaptive Degradation

Post by zwzsg »

I thought it had been proved multiple time graphics where not the bottleneck in Spring?
User avatar
thesleepless
Posts: 417
Joined: 24 Oct 2007, 04:49

Re: Adaptive Degradation

Post by thesleepless »

zwzsg wrote:I thought it had been proved multiple time graphics where not the bottleneck in Spring?
thats a very good point
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6242
Joined: 29 Apr 2005, 01:14

Re: Adaptive Degradation

Post by FLOZi »

I doubt it's effectiveness wrt reducing models which are in the 2-5k tris range to start with, which a reasonable lod0 for RTS might be.
eyu100
Posts: 182
Joined: 05 Jul 2008, 04:10

Re: Adaptive Degradation

Post by eyu100 »

thesleepless wrote:
zwzsg wrote:I thought it had been proved multiple time graphics where not the bottleneck in Spring?
thats a very good point
I run Spring on a P4 and with min settings, hypertheading disabled and reduced resolution I can handle a lot more units.
User avatar
Neddie
Community Lead
Posts: 9406
Joined: 10 Apr 2006, 05:05

Re: Adaptive Degradation

Post by Neddie »

What do you run? How many players? How many units? Are you the person lagging DSD. Probably.
User avatar
Falcrum
Posts: 149
Joined: 14 Nov 2007, 01:03

Re: Adaptive Degradation

Post by Falcrum »

Argh wrote:LODs aren't all that useful, for big RTS games where characters already have nearly-optimal polycounts.
Homeworld 2 using LOD, and it works well. By the way Homeworld 1 Engine is Open source...
eyu100 wrote:"I run Spring on a P4 and with min settings, hypertheading disabled and reduced resolution I can handle a lot more units."
I run Spring on similar computer, but why I must always run on min settings, when other RTS games run on high settings ? We can improve engine to works faster on old computers.

But what other think about Adaptive Degradation ? It's simple and will works good...
Master-Athmos
Posts: 916
Joined: 27 Jun 2009, 01:32

Re: Adaptive Degradation

Post by Master-Athmos »

Well people have been asking for LOD for a long time but I guess there simply is more important stuff that has to be made first. A method like doing wireframes at a certain point isn't the way to go though for a 3D engine like Spring - that's more something for apps with REALLY high polycounts. We'd just need a real LOD system which also immediately is made with shaders & stuff in mind so you can influence not only which detail level should be shown but also which shaders should be applied to a model's material...

While lazy modeler's can use such auto-LOD tools to get the intermediate shapes those results never are really good and so you'd need handmade stuff for a nice look. Quite some work but that's how LOD works best...
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: Adaptive Degradation

Post by Tobi »

For units, Spring has "far textures", and the FartextureHandler (h cpp).

Basically this replaces units with a single textured quad after a certain distance. The quad is rendered on first use; a quad is rendered for a number of common orientations of the unit (I think in 90 degrees steps).
User avatar
CarRepairer
Cursed Zero-K Developer
Posts: 3359
Joined: 07 Nov 2007, 21:48

Re: Adaptive Degradation

Post by CarRepairer »

I run spring on my via netbook with via cpu and via gpu and I can tell you that the graphics are fine but that's not what slows me down. It's when the unit count goes up, no matter what's drawing on the screen.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: Adaptive Degradation

Post by Argh »

Yeah, the bottleneck is actually CPU-side most of the time, unless you're dealing with a lack of VRAM or a really huge tricount on-screen.

I've seen GPU slowdowns, but I have to set up pretty ridiculous situations, basically.

The only exceptions to this are all water-related. Spring's water1 and water 0 are ridiculously slow compared to anything else I've seen lately.

I haven't had time to ever look into why, though. My best guess is that it's because the water is having big clipping issues because it's a giant plane.
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: Adaptive Degradation

Post by lurker »

Tobi wrote:Fartexture
Code doesn't count unless it actually works right.
eyu100
Posts: 182
Joined: 05 Jul 2008, 04:10

Re: Adaptive Degradation

Post by eyu100 »

neddiedrow wrote:What do you run? How many players? How many units? Are you the person lagging DSD. Probably.
yes =\
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Re: Adaptive Degradation

Post by Tobi »

lurker wrote:
Tobi wrote:Fartexture
Code doesn't count unless it actually works right.
What doesn't work with it?

Last time I checked it (and fixed some bugs in it), it worked fine.

(That's a while ago though so wouldn't suprise me if someone has broken it again already :-))
Post Reply

Return to “Engine”