• Advertisement

Archived

This topic is now archived and is closed to further replies.

Plenty of bodies no problem...

This topic is 5522 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I once asked a similar question ages ago, but I didn''t really get the answer I was looking for, I''m gonna try explain it better: Imagine playing Counter Strike. It''s a full 3D world with sky box, floors and massive buildings which you can run around/in/on/under whatever. You can get upto 32 players fighting it out, each player model with thier own weapon and body movement animations. Now, I must have had (on many occasions) more than 20 players all on my screen at the same time. Now Im not just talking about a plain 3D model, Im talking them all having facial features, elbows and knees, weapon holsters and helmets, shadows and lighting, running jumping shooting dying you name it, but all on my screen at the same time. Now my question is...How the hell do they do that???? Since all this is happening on my screen, forget about frustrum culling and Octree''s etc. cos all the models and parts of the game world are in my frustrum, yet the performance of my game does not take any hit whatsoever! I have made a model in 3D Studio Max, imported it into my game, stuck it on some terrain and had a look at it. If theres only a few of them...fine. But If I am viewing more than five of them (i.e. theres 5 or more models in my frustrum) my performance goes jerky - I get about half the frame rate. What''s really annoying about this is that these models are no way near as detailed as the ones in Counter Strike. They have way less detail, and only 3 textures. Check out my web link at the bottom to see them if you like. Ive tried everything I can thing of so far. It''s not V-Sync. It''s not my textures (there 128*128). Im drawing my models in display lists (so there nicely pre-compiled). I have based the majority of my code on NeHe''s and GameTutorials OpenGL tutorials. Id like to add that this IS my first game I have attempted with OpenGL, so I am obviously missing something. But what? Any clues? WWW.SPANNERWORX.CO.UK

Share this post


Link to post
Share on other sites
Advertisement
doesnt CS use some sort of LOD dynamic mesh system for the
models?

-eldee
;another space monkey;
[ Forced Evolution Studios ]


::evolve::

Do NOT let Dr. Mario touch your genitals. He is not a real doctor!

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Sounds like you are fill limited. It''s easy to check--just reduce the window size (or video resolution) and see if your framerate increases.

If so, look for ways to reduce overdrawing.

Share this post


Link to post
Share on other sites
I think your missing his point, except eldee, who was close I believe.

Hes not asking how he can make his faster, necessary, but more so how CS got theirs so fast.

Well, I''ll tell you this much. While ago I was at my friends house on his computer, which was not very powerful. I downloaded a simple openGL particle demo and it ran like crap, it was very slow, with only about 300 - 600 polys on screen all together. Then, I exit that and start up quake 3. Of course, you get into a nice death match and theres about 4 -5 models on screen, lighting, the world, particles. You name it. Not even a little bit jerky.

How you ask?? Well, i was reading an article by micheal abrash when he worked for id, and the point is, the pros take a LONG TIME doing nothing but speeding things up. Getting every little ounce and drop of performance they can, trying every method, every algortithm, until they find what they believe to be the best solution.

That being said, the real reason counter-strike is fast is because it uses the quakeII engine, written by god





"With my feet upon the ground I lose myself between the sounds and open wide to suck it in, I feel it move across my skin. I''m reaching up and reaching out. I''m reaching for the random or what ever will bewilder me, what ever will bewilder me. And following our will and wind we may just go where no one''s been. We''ll ride the spiral to the end and may just go where no one''s been." - Maynard James Keenan
Name: TheBlackJester
Team: Wildfire Studios

Projects
O A.D.
The Last Alliance

Share this post


Link to post
Share on other sites
Hmmm, yeah I realise that professional game developers spend ages improving their code to speed up there games...but there is still a massive difference between my games performance and proffesionally developed games, so much so that I believe I am doing something not quite right.

quote:
Original post by Anonymous Poster
Sounds like you are fill limited. It''s easy to check--just reduce the window size (or video resolution) and see if your framerate increases. If so, look for ways to reduce overdrawing.


Please could you elaborate on this. When I run my game in a smaller window size, the game actually stutters more than it does when in fullscreen mode. So I guess that means Im not ''fill limited''. But what does that mean exactly? When you say ''reduce overdrawing'', do you mean I need better Octree algorithms and the like?

Share this post


Link to post
Share on other sites
Hi Mr. Dark_Streak !
I''m also interested in solution to this problem, because I have EXACTLY the same problem!!!

I''ve put together a lil terrain engine with the possibility to display md3-quake models. Well, if I draw 1, 2 or 3 models the FPS don''t change, BUT
if I draw more then 3, with every new model the framerate drops about 50%......

This is driving me nutz, so people PLEASE ANSWER :-((

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Well if I guess correctly, it is likely that the skins for the models are a single texture. Also you haven''t specified what sort of terrain you are rendering. The maps in CS do not appear to me to be very polygon-intensive (lots of large flat surfaces mainly). Information like this could help us answering you, and also if you included your systems specs, particularly gcard and cpu speed.

You could also try counting the number of polys you are trying to render per frame, and get a poly-per-second value to compare

It could be fill rate, try scaling everything to a very small screen size (taking care not to include more polygons that would other-wise be culled) to reduce the amount of space needed to be filled (You could also simply reduce the res as the other AP stated)

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Overdrawing is rendering polygons that are completely obscured by other polygons. The graphics hardware still has to do most of the processing on these polygons, including rasterization (scan conversion to pixels, also called "fill" to perform depth testing. It is easy to construct scenes with low polygon counts that will be fill-limited even on the latest video cards. Most current game engines partition the static geometry into "clusters" and precompute the visibility between clusters to quickly cull obscured regions.

However, in your case, it might just be a matter of being near the threshold of what you can render at the refresh rate and adding a few models puts you over the edge.


Share this post


Link to post
Share on other sites
My best guess is that CS, like Quake2, use triangle strips and fans for displaying their models. And my guess is that you use single polygons on your MAX model. I also use NeHe''s code but I have another model code (for Quake2''s MD2 format) which uses the OpenGL commands stored into the format. I can display up to 20-25 models without significant speed loss (as long as the models are not too close to the camera) but adding just 10 large polygons to my map totally screws up performance (I guess this is because of overdraw).

If you want serious speed with animated models, go for MD2 or MD3. They''re made to be fast because the entire model gets converted to strips and fans by the model editor.

Sander Maréchal
[Lone Wolves Production][Articles][GD Emporium][E-mail]

Share this post


Link to post
Share on other sites
Cool, Ive never looked into Quake models, because I wanted to create my own. But by the sounds of it you CAN make your own md models, with this model editor you mention. Im gonna search google. Thanx for the tip.

Oh BTW, if something is close to your camera, why is this bad? Sorry, Im struggling to get to grips with this ''fill'' thing.

WWW.SPANNERWORX.CO.UK

Share this post


Link to post
Share on other sites
If an actor is [too] near the camera, it becomes bigger, so the video board has to draw more pixels. That takes more resources.

In my engine, I work with MD2, and I render them normally, without using the custom triangle fan information. Right now, I have 7 actors in the scene (that are are visible) and I don''t get any unexpected performance hit. That is, each MD2 takes about 3% out of the frame rate. And I have only a TNT 2 8MB, and a TB 750 MHZ.

Try to draw only your actors, without drawing the rest of the scene, so you can see what optimizations you can make, etc.

Share this post


Link to post
Share on other sites
the gotterdammerung link below has a couple of shots with 10+ quake3 models + other stuff on screen at once yet it runs at 20fps at 1152x864 on a vanta (budget tnt2).

there is no ONE easy solution to good performance
its a combination of many many things (some easy some hard some big some small)
dont expect to master it in a month or even a year


http://uk.geocities.com/sloppyturds/kea/kea.html
http://uk.geocities.com/sloppyturds/gotterdammerung.html

Share this post


Link to post
Share on other sites
Although fill rate has been mentioned as a performance issue, graphics cards have had very high fill rates for quite a while now. Many reviews and benchmarks of vid cards no longer even consider fill rate an issue. In fact if you render a model and bring it close to the camera so that it fills the entire screen and only a few polys are rendered, the frame rate will actually go up because the backface culling will cause less polys to be sent to, and processed by, the graphics card. (I'm assuming your not rendering at very high resolutions like 1600x1200 where fill rate may cause a performance hit)

However, I'm not saying overdraw is not an issue. Overdraw also requires transforming, lighting, etc... polys that are not seen which can be an important to performace.

Also, triangle strips and fans do not always give a performance increase and may actually decrease performance. The reason for this is that rendering strips and fans require you to change rendering states and, depending on what your rendering, you may have to change states quite a bit if the strips and fans aren't big/long enough. I haven't done terrain rendering, but I'd imagine terrain rendering is one case where triange strips would be very useful since you have very long strips.

Finally, this doesn't apply strictly to graphics, but I've found that properly inlining functions have given me significant performance boosts.



digital radiation

[edited by - +AA_970+ on December 4, 2002 11:58:59 PM]

Share this post


Link to post
Share on other sites
>>Although fill rate has been mentioned as a performance issue, graphics cards have had very high fill rates for quite a while now<<

true but tommorrow''s games will require huge amounts of fillrate
eg doom3 sometimes does 50 passes! over objects.
also dont forget enabling fullscreen antialiasing chops into fillraTE quite bad as well.

http://uk.geocities.com/sloppyturds/kea/kea.html
http://uk.geocities.com/sloppyturds/gotterdammerung.html

Share this post


Link to post
Share on other sites
quote:
Original post by zedzeek
http://uk.geocities.com/sloppyturds/kea/kea.html
http://uk.geocities.com/sloppyturds/gotterdammerung.html



Hey Zedzeek, when will we be able to check out your games? They look well impressive. Im not trying to nick your code btw I just wanna see em in action.


WWW.SPANNERWORX.CO.UK

Share this post


Link to post
Share on other sites
im wanting to do an ''limited'' alphatest of kea this weekend (ive just gotta find some decnt sound samples of lazers etc)

ill post on the website further info (depending or not if i go to work today)


http://uk.geocities.com/sloppyturds/kea/kea.html
http://uk.geocities.com/sloppyturds/gotterdammerung.html

Share this post


Link to post
Share on other sites

  • Advertisement