Which is worse/better?

Started by elias4444, March 11, 2005, 00:02:02

Previous topic - Next topic

elias4444

Drawing one large polygon with a large texture?
Or drawling lot's of little polygons with lot's of little textures?

I'm trying to draw a nice backdrop... what a pain.  :?
If my texture is too big, it seems to just slaughter performance exponentially (I don't dare go over 512x512 textures because of this... but even that seems too high).

Cas, in AlienFlux, how do you get those cool looking 3D'ish backgrounds? Are they images? Or polys?
=-=-=-=-=-======-=-=-=-=-=-
http://www.tommytwisters.com

tomb

It don't mather on a modern computer with a modern gfx card with working driver. It's such a trivial task.

In theory bigger is better as long as your not wasting texture mem. Less geometry transfered, fewer state changes. Although it might be less friendly if the gfx mem is fragmented? Who knows. I was surprised that your seing such slowdowns.

Btw. With "backdrop" you mean like a background image that fits the screen right? Not a scrolling 100000x2000 image.

elias4444

QuoteBtw. With "backdrop" you mean like a background image that fits the screen right? Not a scrolling 100000x2000 image.

Right. Basically, I create a cube and map the texture onto the inside of the cube. Everything else is then rendered inside the cube, and I position the camera within the cube as well.
=-=-=-=-=-======-=-=-=-=-=-
http://www.tommytwisters.com

elias4444

Now that I think about it, is there a way to clean-up/clear-out the graphic cards texture memory before loading all of my stuff?

BTW, for some stats, it looks like when I implement my background idea, I go from 200fps to about 140fps. That's on an Nvidia 5650 mobile.  :?
=-=-=-=-=-======-=-=-=-=-=-
http://www.tommytwisters.com

Orangy Tang

When your framerates are that high *any* extra calculations will have an apparently massive effect on the framerate. For instance:

200fps is 5ms per frame.
140fps is 7.1ms per frame.
60fps is 16.6ms per frame.

Ok, so an increase of 2ms is a significant chunk of a 60fps frame, but much more influential when you're in the 140+ range. Basically, unless you're getting below the magic 60fps then don't worry about it.

elias4444

Thanks... I was kind of wondering about that actually. I tried it on some pretty old hardware (Nvidia GeForce2Go) and was getting around 40fps in 1024x768 mode. As the screen objects became more complicated, it seemed to only get downwards of about 30fps and then stayed there (no matter how much more I seemed to add). I also seem to get a HUGE increase if I run the game in fullscreen (which I'm guessing most people will... I just like running it in windowed mode while I'm debugging/developing it).
=-=-=-=-=-======-=-=-=-=-=-
http://www.tommytwisters.com

Orangy Tang

nVidia drivers seem to like fullscreen better it seems, I know Quix runs somewhat faster fullscreen than windowed.

Remember also that you're really looking out for bottlenecks. Lots of big textures could be limiting you by fillrate (especially at large resolutions like 1024x768), but by comparison you could send lots of extra polys to be rendered 'for free' because thats currently not your limiting factor.

The bottlenecks to watch for are CPU, vertex processing and fillrate. Unless you've got some crazy complicated AI, CPU won't be a problem. Vertex processing is pretty relaxed on current hardware (and has lots of potential optimisations). Fillrate is a much more tricky obstacle, and will almost certainly be your limiting area.

elias4444

I've tried my best to keep the texture sizes down. The largest ones I use are 512x512, and there's only two of them (one for the background, and one for the "playing board"). Anything smaller seems to turn out kinda ugly since the objects they're mapped on are kinda big. My other option would be to "piece together" a background and playing board, using multiple smaller textures spanned over multiple objects.

Honestly though, I'm not even sure what a "good framerate" is at this point. I built auto-scaling into the game, so people can always lower the resolution if they want to. The default is 1024x768, but I'm realizing quickly why so many developers these days are sticking with 800x600.
=-=-=-=-=-======-=-=-=-=-=-
http://www.tommytwisters.com

princec

Alien Flux uses a really wacky technique to draw backgrounds which I since simplified hugely in some other code :) AF used, of all things, a quadtree to determine what triangles to draw. They're 256x256 I think. The quadtree is totally unnecessary but it grew from some previous experiments and I just never got round to refactoring it.

Cas :)