With cordite in the air, splintered steel, shell casings and powder burns, there’s only one explanation...
Old WQ3 forum - archived. Links may not work.

Postby Breli » Sun Mar 09, 2008 5:48 pm

Optimizing for performance in SG is quite complex and worth several own tutorials. Sometimes, the game behaves somewhat strange and it is not always 100 percent clear with factor causes bad framerates when how and why. Basically, there are the following factors (there may also be others):

- Game overhead (the least of these)
- Triangle count (i.e. total visible tris in scene)
- Entities (i.e. breakables, ...)
- Structural complexity (i.e. complexity of the structural hull)
- Bot routing overhead

My personal experience is that the last three scale VERY badly. That is, given a certain degree of complexity they eat much much more performance. In contrast to these, triangle count scales quite well. The latest versions of dawnfort and newtown easily have 10 times the triangle count of alamo and still perform fine.

There are certain techniques to address some of these things such as hinting, bot clipping, using models instead or "normal" brushwork and so on.

While running around in Alamo I noticed that FPS were very unstable (changing from 25-70 without any movement on my side) for no apparent reason. My bet is that your structural hull is more or less borked. Given the layount of your map most things that are structural now should be detail anyway since they don't block vis efficiently. Thus, nearly 100 percent of your map is visible from anywhere anyway. You may try to make most structural brushes detail to reduce structural complexity, PVS table size and "switching" costs ... Maybe worth a try.

Cheers

Breli
SG name: =SG= BRELI

Harmonica: Did you bring a horse?
Gunmen: Looks like we are short on one horse!
Harmonica: No. You brought two too many.
User avatar
Breli
SG Team
 
Posts: 906
Joined: Mon Jul 18, 2005 10:08 am
Location: Germany



Postby Joe Kari » Sun Mar 09, 2008 7:06 pm

While running around in Alamo I noticed that FPS were very unstable (changing from 25-70 without any movement on my side) for no apparent reason. My bet is that your structural hull is more or less borked. Given the layount of your map most things that are structural now should be detail anyway since they don't block vis efficiently. Thus, nearly 100 percent of your map is visible from anywhere anyway. You may try to make most structural brushes detail to reduce structural complexity, PVS table size and "switching" costs ... Maybe worth a try.

Hi Breli !
The current version of alamo in wasteland-testing is out to date, I have remade hint brushing from the begining, and I have turned many many things to detail brush... No more unstable FPS.



So :

* About triangle count, I don't know if I have many more of them than in other map. I haven't checked this but I think I have much more triangle than old map, but less triangle than recent map.

* Bots looks good. On my computer, playing with 9 bots don't change my framerate (only lost 2 or 3 frames). I have surrounded all things by bot clip (every time I have noticed a bot don't know it can jump over something, I have made a botclip touching the skybox).

* For the PVS table, on my last compilation, I have had around 710 leaf, around 1100 portal cluster, around 3300 portal + 3300 hint portal. I don't know if it is big number or little one :)

* Entities... Yes I have plenty of entities... Many breakable, many func_door, many func_door_rotating... Are those things CPU eater even if nobody interact with them ?

* Structural : I have clean all my structural brush, it isn't very complex... 95% of them are large axial.
User avatar
Joe Kari
SG Team
 
Posts: 879
Joined: Sun Sep 16, 2007 8:44 pm
Location: France



Postby L3th4l » Sun Mar 09, 2008 11:51 pm

Breakables are big resource hogs especially if they are all in view.

To be able to see what is being drawn at any given time, run your map in dev mode and use r_showtris 1 to see everything that is being drawn from your point of view in the map... If you can see your whole map being drawn no matter where you are, your hints are not working and thus all of those breakables are being drawn too..

Hit me up with a PM with your .map, related custom textures and your .shader file and I can take a look at it for you...
User avatar
L3th4l
Smokin' Amigo!
 
Posts: 1948
Joined: Sat Jun 18, 2005 8:06 am
Location: Binghamton, NY. USA



Postby Joe Kari » Wed Mar 12, 2008 1:29 am

Hi !

In fact, hint brushes works well right now. Good fps everywhere.

I can't share my map just now, because I have broken something and don't have made a recent backup. Grrrr fucking GtkRadiant and its "undo bug". I'm busy this day, I can't repair it until this week-end. I don't want to share a corrupted file.
User avatar
Joe Kari
SG Team
 
Posts: 879
Joined: Sun Sep 16, 2007 8:44 pm
Location: France



Postby Joe Kari » Fri Mar 21, 2008 1:55 am

Hi !

I have loose a whole 80GB hard drive last week :( (thanks to this bastard of windows who have crashed my partition table when converting one fat32 partition to NTFS... ).
Hopefully, my brother have a recent backup of my map on his computer, so I haven't loose anything related to smokin' gun. I have re-installed gtkradiant today, and work hard.
Coup' George have made many new high resolution textures, and it looks really good now ;)

We have found a little trick : textures with height and weight of a power of 2 are rendering better than other. Since OpenGL handle only power of 2 tex, I guess Q3engine resize non-power-of-2 tex at loading time... but do it not very nicely. Photoshop do it much better (with bicubic). There are many tex in smokin' guns that aren't power of 2, and those tex loose quality...
User avatar
Joe Kari
SG Team
 
Posts: 879
Joined: Sun Sep 16, 2007 8:44 pm
Location: France



Postby Joe Kari » Fri Mar 28, 2008 8:06 pm

Hi !

I have a question for Breli : what is the trick of your vegetation in Backwater ? It looks like a pendulum, but it is impossible to make Z-axis pendulum...
(And Y-axis pendulum are really boring too, because the lightmap isn't correct on them... )
User avatar
Joe Kari
SG Team
 
Posts: 879
Joined: Sun Sep 16, 2007 8:44 pm
Location: France



Postby Breli » Fri Mar 28, 2008 10:44 pm

Hi Joe,

Uh, what? I guess you are meaning the millstones in the mill? I wasn't aware that I had some fancy trick at work here ;) ... you can control the rotation axis by ticking the checkboxes in the prop dialog of the entity.

HTH?!???!

:mrgreen:

Breli
SG name: =SG= BRELI

Harmonica: Did you bring a horse?
Gunmen: Looks like we are short on one horse!
Harmonica: No. You brought two too many.
User avatar
Breli
SG Team
 
Posts: 906
Joined: Mon Jul 18, 2005 10:08 am
Location: Germany



Postby Joe Kari » Sat Mar 29, 2008 1:03 am

Sorry :)
I'm talking about this :

Image

Image

It's moving like in the wind...
It is a func_pendulum ? or not ? (func_pendulum dont have axis checkbox, only a "angle" key, with value range from 0 to 360 degree)
Maybe a shader effect ? (like water)
User avatar
Joe Kari
SG Team
 
Posts: 879
Joined: Sun Sep 16, 2007 8:44 pm
Location: France



Postby ReD NeCKersoN » Sat Mar 29, 2008 5:09 am

Joe Kari wrote:Maybe a shader effect?

Yes. Something like this:
Code: Select all
deformVertexes wave 128 sin .75 .75 .5 .3  //<div> <func> <base> <amplitude> <phase> <freq>

Shader Manual
User avatar
ReD NeCKersoN
SG Team
 
Posts: 3245
Joined: Wed Mar 27, 2002 6:22 am
Location: VA, USA



Postby Joe Kari » Mon Apr 07, 2008 7:31 pm

I've got a trouble :(

We can't add textures anymore, because our .tex file has reached 5 ko :(
Is there a way to overide this ? (q3config ?)

Someone can tell me if there is an issue ?
It's boring...


EDIT : I have seen somewhere in this forum that Breli have had the same trouble... What have you done ?
User avatar
Joe Kari
SG Team
 
Posts: 879
Joined: Sun Sep 16, 2007 8:44 pm
Location: France



Postby Breli » Mon Apr 07, 2008 11:08 pm

Hi Joe,

You finally hit the undocumented and widely unknown 5K .tex limitation :D

However, you can fix that easily. Simply open your tex file after the compile and replace all "1.000000" with "1". That should save enough space ;) ...

The problem is that the internal tex-file buffer is only 5K. If the tex file is larger than that, it causes a buffer overflow and all kinds of weird problems.

Just one of the little oddities WQ has to offer ;)

Cheers

Breli

[Edit: This is of course only a work around and not a real fix. I know that. However, really fixing this requires to change either the WQ code or our version of q3map2 . Something for a new team to fool around with I guess ;)]
SG name: =SG= BRELI

Harmonica: Did you bring a horse?
Gunmen: Looks like we are short on one horse!
Harmonica: No. You brought two too many.
User avatar
Breli
SG Team
 
Posts: 906
Joined: Mon Jul 18, 2005 10:08 am
Location: Germany



Postby Joe Kari » Tue Apr 08, 2008 3:24 am

Hi Breli !

Thanks for the tips, but unfortunately, it doesn't work... Doing this, it doesn't display any error message, but some of my textures are still missing in-game... and ladder don't work...
I'm not sure it's relative to Smokin' Gun, I have copied my map and tex to another mod (Urban Terror) just to see what happened : it causes the same things. The missing textures aren't display with the standard "notex" texture (gray with white line), they are just invisible like a "nodraw" texture.

That's a bad news :(

So I must use all-in-one texture in order to keep the number of texture under 146...
User avatar
Joe Kari
SG Team
 
Posts: 879
Joined: Sun Sep 16, 2007 8:44 pm
Location: France



Postby ReD NeCKersoN » Tue Apr 08, 2008 5:34 am

Having a tex file that is too large causes particles & ladders to malfunction. If Breli's work-around doesn't help then you'll have to reduce the number of textures in your map. Make your wood structures from the same texture for example. Reduce the number of paintings, use the same glass everywhere, or whatever it takes to get the file size under 5. Then your map should function normally again.
User avatar
ReD NeCKersoN
SG Team
 
Posts: 3245
Joined: Wed Mar 27, 2002 6:22 am
Location: VA, USA



Postby Joe Kari » Tue Apr 08, 2008 1:53 pm

I don't want to reduce texture ! :D

I prefer doing this kind of stuff :

Image

Make 4-in-1 textures for every non-tilable texture.
It saves 3 tex each time... it's quite boring with Radiant because I can't use the "fit" button anymore in the surface inspector window.

In fact me and Coup' George have a lot more texture to add to alamo, even if it's painful to map, we would add them again and again... until we are fully satisfied of the result.

Now my map work again.
User avatar
Joe Kari
SG Team
 
Posts: 879
Joined: Sun Sep 16, 2007 8:44 pm
Location: France



Postby Joe Kari » Wed Apr 23, 2008 3:04 am

Hi !

It's been a long time since I haven't post new screenshots of Alamo !

We have made so many changes on the map !
New textures, some part re-mapped, and md3 object !


Here a view of the new market :

Image





New textures around the church :

Image


Image





The ugly jailhouse have been removed, instead we have a house still under construction, better looking and much better gameplay :

Image


Image



The big house with the piano of CW Bebop :

Image





The second floor :

Image



I have learned how to make MD3, and made 3 of them.



My very first one was a bottle of whiskey (in fact I have only change the original molotov model of smokin' guns) :

Image



Here a book (this one was made from scratch) :

Image




And here an "oil lamp" (made from scratch too) :

Image


The book "Alamo Credit" can be opened (it's a func_door_rotating) to see credit ;)



I think we have done 85-90% of mapping and 85% of texturing (we used our own set of textures, that's why it takes many time).
User avatar
Joe Kari
SG Team
 
Posts: 879
Joined: Sun Sep 16, 2007 8:44 pm
Location: France



PreviousNext

Return to Editor's Forum

Show Sidebar
Show Sidebar

User Control Panel

cron