patch on rendering

For developmental things relating to the graphics of the game.
Post Reply
User avatar
voodoo
Core Dumper
Posts: 124
Joined: Wed Sep 27, 2006 11:51 am

patch on rendering

Post by voodoo »

I was suffering major fps falldown on café when it was crowdy so I started looking at rendering code. As many of you, I'm using a quite wide angle camera setting so it is quite useless to have a fully detailled model. but on the other hand I'm playing incam sometime an in that case you can be really close to other bikes.
So I've patch the cycle rendering to include 3 different cycle model depending of the distance. here is the patch and the 2 additional models I built from the original one. By hand as I found nothing to deal with them... so I didnt touch the body and make a little simplification on the front and back wheels... should be simpler cause when the cycles are really far, it is just a few pixels on my screen ...
It seems to be good enough on my laptop, not really a better fps but at least it do esnt fall down as much as before.
should be profiled to see if it is really efficient.

A little detail more : I use only coordinate on the grid to compute distance. So it is not really accurate. It should be better with camera height, fov and zoom but I thought it is a nonsence to spend time computing something when the goal it to improve performance.
There's 2 parameters which can be set in the console to define the "threshhold" (it is probably not the right name), you'll find them easily in the patch file ...
Attachments
models.tar.gz
(1.35 KiB) Downloaded 463 times
rendering.patch.tar.gz
(1.9 KiB) Downloaded 465 times
User avatar
Lacrymosa
Round Winner
Posts: 286
Joined: Wed Feb 15, 2006 6:44 pm
Location: Heaven or Hell...?
Contact:

Post by Lacrymosa »

Sounds interesting.
Screenshots anyone?
User avatar
Tank Program
Forum & Project Admin, PhD
Posts: 6711
Joined: Thu Dec 18, 2003 7:03 pm

Post by Tank Program »

Sounds quite interesting, although I'm curious as to how much of a performance boost there really is.
Image
User avatar
voodoo
Core Dumper
Posts: 124
Joined: Wed Sep 27, 2006 11:51 am

Post by voodoo »

Well the impact should not be important as long as there are many cycles on the grip. Also, the more complicated the map is, the less the cycle rendering is important in regard to total rendering time. So the impact is not that important. It is probably more significant for player with old graphic card as the rendering represent a big share of the overall client side work.
But on my laptop, the fps vary between usually 30 to 120 depending on map complexity and number of players online. On café, when 14 or more players are online, it was more like 10 to 60, usually between 10 and 20 at start or when I was in a crowdy place like close to the zones, with that old-movie-like effect that can ruin gameplay when you need to react fast and try to enter a tiny space in opponent def ;) So I have to set the screen def low when this effect appears (like 640x480)
Now that I'm using this patch for a few weeks, I have the feeling it is better but no way to measure it precisely. the fps doesn't drop as low as before but can still be between 20 and 30 ...
User avatar
Z-Man
God & Project Admin
Posts: 11585
Joined: Sun Jan 23, 2005 6:01 pm
Location: Cologne
Contact:

Post by Z-Man »

Nice idea and good hacking. But my educated guess is that it can't save much on reasonably modern hardware. We're using display lists for the model rendering which *should* turn over all of the hard work completely to the GPU if it is TNL capable, which all GeForce/Radeon cards and even the crappy intel onboard chips are. Unless the models are so hi-poly that the GPU can't handle them (many thousands would be required), there is virtually no overhead. Power gamers with up to date hardware can ignore this patch :) Laptop users and pre-TNL card owners (TNT, Riva, VooDoo, Rage) and of course those poor guys stuck with software rendering may benefit.

Unfortunately, it's hard to to rendering profiles; regular profiles are no use because the card works asynchronously. And it's useless as long as certain higher level optimizations (visibility culling) aren't implemented at all.
epsy
Adjust Outside Corner Grinder
Posts: 2003
Joined: Tue Nov 07, 2006 6:02 pm
Location: paris
Contact:

Post by epsy »

what branch it is supposed to work on ?
Post Reply