HomeNewsFeaturesLicensingDownloadsScreenshotsFAQRoadmap Contact Us
Search:
4 Online

Community

Discussion Topics Recent Postings User Contributions General Articles Example Documentation Credits

Licensed Developer

Programmer's Manual Artists Manual Tutorials and Articles

Programming: Game Code

Game Code Overview Server Side Game Code Client Side Game Code

Programming: System

Alphabetical Function List Renderer File System Collision & Ray Casting Low Level Audio Game Audio The Console Console Variable List Multiplayer Localisation Maths Library Memory Manager Model File Formats Texture Formats

Art: Overviews

Specifications Shaders Particle Systems Lens Flares Cipher console Cipher file types Tutorials Reference

Art: Tools

Shader Designer Particle Designer 3dsmax tools Model Conversion Font Generator

Cipher Engine
Game Development Search Engine
GameDev.net
You are not signed in - [sign in] [register]
Cipher Now 50% Faster Sunday, January 25, 2004

Cipher now supports a new OpenGL extension that can result in up to 50% higher frame rates. The extension is supported in current drivers for ATI and Nvidia on most of their product range.

The extension provide functionality similar to Vertex Buffers in DirectX. The performance increase was so dramatic that I thought it would be best to make an update available as soon as possible. The new extension is enabled by default, but if it seems to be causing you problems, you can switch it off by setting r_arb_vertex_buffer_object to zero.

I would also be really interested to know what kind of frame rates people are seeing on the new CCC demo, especially on nVidia hardware. If you have the old version of CCC, run it and see what frame rate you are getting on the starting grid. Download the new version (that uses the new renderer and has had a couple of other tweaks) and try again. Let us know your set-up and frame rates. On my dev machine CCC ran at 55fps prior to the update. The current release runs at about 120fps.

Below is a full break down of what's new.

  • Updated Icons (thanks to Toby Allen for this)
  • Added support for ARB_vertex_buffer_object extension.
  • Added cvar r_arb_vertex_buffer_object to control the use of the extension.
  • Increased the default heap size to something more reasonable.
  • Removed DirectX headers and libs from the downloads. You will now need to make sure that DirectX is in your include path to build the source.
  • Shader Designer now has an option to view models with shadows. You must be running in a 32bpp desktop mode for this to work though.
  • Added support for recursive materials in Max 5.1.
  • Wizard projects now try to load a map to help get things going.
  • Renderer now auto selects a decent refresh rate (thanks Monty)
  • Fixed some casting warnings in Mingw.
  • Added extra lines to stop Linux compilers complaining.
  • All the changes from the previous beta update...

As usual, licensed developers can download the new version and its source code from the download page.

User Contributed Comments

Staggan 25th January, 2004 16:41
Hi Rikh.

How do we test shadows in the shader tool ?


rikh 25th January, 2004 16:49
Preview options, in the renderer tab (where all the old wireframe / normals options where previously).


Staggan 25th January, 2004 17:29
Hi Rikh.

Thats working thanks. However, apart from a ball model ALL our player models shadows are completely destroyed in shader designer. Even though we have followed all the rules for creating these models.


Dan 25th January, 2004 18:25
Well, Cipher is now way slower on my system , going down to 4-5 fps. Disabling R_Vertex_Buffer_Object results in normal frame rates. Also,texture colors are darkened, looking ugly, compared to previous versions of Cipher.

Im using Nvidia Gf4 4200.


Dan 25th January, 2004 18:38
Well, texture colors problem is solved, it seems that you changed default refresh rate to 70Hz instead of 60, which resulted in this problem due to the configuration of my monitor. r_refreshrate 0 now 70 Hz and r_refreshrate 1 , now 60 Hz ? Or this control was completly not functional in previous versions , refresh rates beeing always 60 regardless of the value set in the cvar ?


Dan 25th January, 2004 18:42
But Hey, I dont think this is a problem of your code, since for example I try to play Satr Wars: Knights of the Old republic, and I get weird drops in framerate when
vertex_buffer_objects are enabled. Diabling them makes the game run smoothly.

Dan


rikh 25th January, 2004 18:43
Staggan,
Please send in the model.

Dan,
That's a shame. The nvidia drivers really suck in this area. I tried it on 2 different nvidia cards with 2 different driver versions, and even though the performance gains weren't significant, everything worked fine and the frame rate wasn't worse. Looks like I will have to disable the feature by default for now until nVidia sorts it out. What's happened to their drivers recently...
ATI cards see significant performance gains.
The colour stuff could be a result of me changing a bunch of shaders.


Dan 25th January, 2004 19:06
I have no ideea what nvidia did to their driver recently , but it suxs. Compiled vertex arrays seems broken on latest drivers, and I seen on OpenGl forums ppl complaining that they where not able to match VAr performance with VBO. Well, thats it.

Dan


Charles 25th January, 2004 19:10
Okay, just read it, and didn't test it yet, but GREAT work Rik, YIHAA! 50% is incredible. Tomorrow I'm going to buy an ATI card and test my project with it. Funny, all our computers now have GeForce FX cards, because I had trouble with the Radeon 9800. Could you give me your test system specs?
Edited 25th January, 2004 19:12


Staggan 25th January, 2004 19:14
Hi Rikh.

A bunch of models on their way to your email.

I sent half models, textured models, untextured, etc etc.

Your speedy assistance would be appreciated.


mak 25th January, 2004 22:21
rik - i have done a windiff on the new source (2777) and our modified one, and migrated all the vertex buffer changes across (i believe).

I am just curious - as we have no speed increase (admittedly on nvidia cards) - but i want to double check the final stage in the vertex buffer submission with you.

This is in r_model.c -> r_RenderModel, yes?

		// Copy vertex buffer info over if we have it
geom.vbxyz = m->vbxyz;
geom.vbnormals = m->vbnormals;
geom.vbcolour = m->vbrgba;
geom.vbindex = m->vbindex;
for (n=0; n<geom.numtexsets; n++)
geom.vbst[n] = m->vbst[n];


i can find no changes in r_Pipeline.c compared to our version.

I get the sneaky suspicion i have missed some other updated code...


rikh 25th January, 2004 23:03
pipeline wasn't changed. The actual rendering using the above data happens in shader.c and state.c


Bryan 26th January, 2004 01:59
Rik,
Does this mean mingw now works to compile Cipher without the developer making changes to the makefiles or anything?


ogracian 26th January, 2004 03:24
Hello

This are great news!!, unfortunatly after some test I am getting a LOT of troubles with this new release.

I have a Visiontek GeForce3 TI 500 and I have tested with the following driver versions:

30.82.- Well with this drivers all work like the old version, I mean, it did not support r_arb_vertex_buffer_object feature. As said exactly like old release

45.23.- With this drivers the r_arb_vertex_buffer_object works, but it present a LOT of 'artifacts' during rendering in CCC, I mean, it draw a LOT of flashing triangles just like drawing with wrong indices or somthing like that.

50.03.- Well this are kind of weird results, firts the Dancing Alien Demo y FULLY WORKS using the r_arb_vertex_buffer_object ACTIVATED, but if I disable r_arb_vertex_buffer_object, the FRAMERATE DROPS A LOT until I deactivate r_ext_compiled_vertex_array. In CCC, it WORKS but no FRAMERATE INCREMENT, and also present some multi-texture troubles.

PS: I also have tryied the OpenGL extension viewer from Realtech-VR and all its tests perform well including those of vertex_objects with drivers 50.03.

Regards,
Oscar


FathomDev 26th January, 2004 04:15
I just used the new renderer, and WOW what a difference!

I have a GF3 Ti200, using the stock WinXP driver v5.2.1.6. In scenes I usually get 10fps, I now get 40-50. Huge difference, well done!


Cowboybebop 26th January, 2004 06:18
Woot!!! I can't wait to give this baby a spin! Seeing all the trouble with nvidia drivers I'm glad I have a ati card.


Naspino 26th January, 2004 06:24
I have a lowly GEForce2 32MB and I cannot tell that there is much difference with or without the new extension. It ran at about 40FPS without support for OpenGL1.5. When I upgraded to get the support it dropped to 20FPS. With the extension it goes back to 30FPS. Without antialiasing and anisotropic on its about 60FPS. -- Testing the framerate at the startline of CCC.

I'm guessing that its a positive change and having to upgrade the NVidia driver to get the extension is what slowed me down. Time to buy a new card...
Edited 26th January, 2004 06:38


rikh 26th January, 2004 07:49
Bryan,
I have not tried compiling with mingw, but I have implemented all the changes people using that compiler have recommended to me.


rikh 26th January, 2004 08:24
I have uploaded new versions of CCC and Temple that default to having VBO disabled. This should mean everything works on nvidia cards by default. You will need to turn it on manually if you want to try out the performance. The last line of the autoexec.cfg should be changed to enable the extension. eg
set r_arb_vertex_buffer_object "1"

Also, I have uploaded the source pack again, as there were a couple of libs missing. If you were having problems, try this one. You will still need DirectX installed and set up on your include path though.


DMonaghan 26th January, 2004 12:16
(message deleted)
Edited 26th January, 2004 12:58


monty 26th January, 2004 12:48
Rikh,
regarding the modified sysgl_ChangeDisplayMode()
for refersh rate selection, I suggest you to change the lines:
ChangeDisplaySettings(&devmode, 0)
with this one:
ChangeDisplaySettings(&devmode, CDS_FULLSCREEN)

CDS_FULLSCREEN tells Windows, after closing a fullscreen application, to keep the original size of any open window.

Right now, as you can easily see, all open windows are resized to fit in the resolution of your fullscreen app, which is quite annoying.
(Try and set your desktop to 1024x768, open a couple of windows, and then start and close your fullscreen app to 640x480)


grunz 26th January, 2004 14:36
wondefull!
I run it on a GF3 TI 200 with 64 MB.
Without vertex_buffer I got about 15 FPS (in some scenes).
But with vertex_buffer all scenes are about 50 FPS.

great


codeman01101001 26th January, 2004 18:04
Now I have 50-80 frames in the CCC demo, 1280x1024, max details with an ATI 9800 non Pro 2ghz amd
Nice one :)

I have the "texture colors are darkened on models" problem too in the shader designer. Is that a bug or can i change that manually?


rikh 26th January, 2004 18:15
The texture colour thing. Is that just in CCC, or is this in your models as well? If so, any chance you can send a before and after screenshot to me so I can investigate?
If it is only CCC, then it is probably due to the changes I made to some of the shaders. These would have effected the lighting levels a bit. Maybe I should go back in and tweak things.


rakmaya 26th January, 2004 18:19
I was wondering when you would change this part of the engine. Most other people might have already looked into this and thought that why in the world is this happening. But this fix helps a lot for all developers out there. Great work Rikh. More updates and optims will change this engine around for sure.


JiuQ 26th January, 2004 18:23
[edit, got the data from the demo]
vastly improved speeds in ccc on my fx 5900 Ultra with vbo disabled. Looks like there might be a slight slowdown with it enabled, compared to the new speed (still faster than before)
With the old temple data, no tweaking :
3 to 4 times the old frame rate for certain parts of the pathed camera, smaller increase in others
Edited 26th January, 2004 19:40


tobyallen 26th January, 2004 19:22
Here's my little 2pee about the situation:

Machine:
Intel P4 HT
512Ram
Radeon ALL-In-WONDER 8500 TV
WinXP

Latest Drivers for that card (not directly the catalyst).

My test:
Walk up to the rim of the pool and just look at things move. Don't move camera.

Results:
Cipher 2718 Temple Demo;
Statue - 24 FPS
Cipher Logo Blob - 24-25 FPS
Armour - 24 FPS
Prawn - 25 FPS
Change Effect - 15 FPS

Cipher 2777 Temple Demo; with set r_arb_vertex_buffer_object "1", (Outside Cipher Folder)

Statue - 10-13 FPS
Cipher Logo Blob - 20-21 FPS
Armour - 14 FPS
Prawn - 22 FPS
Change Effect - 10 FPS

Cipher 2718 Temple Demo; (In Cipher Folder - so with new Cipher EXEs)

Statue - 4 FPS
Cipher Logo Blob - 5 FPS
Armour - 4 FPS
Prawn - 5 FPS
Change Effect - 15 FPS

Cipher 2777 Temple Demo; with set r_arb_vertex_buffer_object "0", (In Cipher Folder)

Statue - 29-33 FPS
Cipher Logo Blob - 33-34 FPS
Armour - 29-31 FPS
Prawn - 32-35 FPS
Change Effect - 19-20 FPS


By taking the vertex buffer OFF, I get a huge boost, OTHERWISE, I get a decrease to stable FPS.

There you go. I installed the Temple demo outside the Cipher Directory at first as a mistake, but then additionalyl installed it over the previous temple within the Cipher folder and there are some differences for some odd reason. This is without changing any of the config. I only did that on the last test.

Toby.
Edited 26th January, 2004 19:23


bane 26th January, 2004 19:45
Bryan:
I was the one who submitted many of the source changes for compilation in mingw -- but they are just source changes. You'll still have to make your own Makefiles and such. If you like, you can email me at bane@uchicago.edu and I can send my setup for compiling the engine with autoconf/automake.


bane 27th January, 2004 02:48
Has anybody else noticed that the dancer demo included with 2777 doesn't display a shadow, however much one tinkers with r_shadows and friends? Run the 2777 exe on the 2718 dancer game folder, however, and the shadows work just fine (ditto for temple).
Edited 27th January, 2004 07:27


codeman01101001 27th January, 2004 07:04
texture darken thing in shaderdesigner. I didn't change the lightning

here an example :

Cipher 2718:

http://silent-dreams.dyndns.org/Screenshots/mushroom1.jpg


Cipher 2777:

http://silent-dreams.dyndns.org/Screenshots/mushroom2.jpg


limey 27th January, 2004 07:13
rik, it's good that you made the update but I swear to god it runs even slower now on my gforce 4200 :)

I am seriously wondering whether NVidia are in with MS on this whole opengl support bs. I mean they produce the chips for the xbox and that's dx based. Maybe there is a conspiracy or something going on?


Justin


seryu 27th January, 2004 11:59
Nvidia drivers suck on dx too, so i dont think this is the cause, since xbox supports ogl.


Nardulus 27th January, 2004 16:30
Even with r_arb_vertex_buffer_object set to 0 I am seeing a great speed increase in FPS.

I have an Nvidia Ti 4400 and I was getting 70 fps on my system now its is 130 FPS to 200 FPS, which is strange because that is way beyond my refresh rate. Is this real? :)

My Toshiba Portable that is running a Nvidia Go5200 64 Meg is running at FPS of 90 to 100. It works with the Nvidia Portable chip also.

Thanks for the speed up and tip.

Enabling arb_vertex_buffer just makes a mess of my screen.

Could this lead to support issues for our customers?

Ken
Edited 27th January, 2004 17:45


rikh 27th January, 2004 19:25
Not if you ship with the feature disabled (just add it to the autoexec.cfg file).


Nardulus 27th January, 2004 20:21
Rik I am confused.

The feature is switched off but I am still getting the speed boost. If I enable it I get a pretty ugly screen.

The speed up is more than just the vertex_buffer_feature because of the demostrated speed up.

How are you calculating FPS beyond Refresh rate. Just curious?

Ken


monty 27th January, 2004 22:20
It seems these NVidia drivers are a real mess.
I have a GeForce 4 Ti 4200 64Mb.

Testing fps in CCC on the startline.

Using Detonator 45.23:
- build 2718 --> ~36 fps
- build 2777, r_arb_vertex_buffer_object "0" --> ~28 fps
- build 2777, r_arb_vertex_buffer_object "1" --> it crashes!

Using ForceWare 53.03:
- build 2718 --> ~7 fps (!)
- build 2777, r_arb_vertex_buffer_object "0" --> ~5 fps
- build 2777, r_arb_vertex_buffer_object "1" --> ~26 fps

So with latest drivers (53.03) performance drops completely, unless I activate vbo.
In any case build 2777 without vbo is slower than build 2718, while vbo is 5x faster... when it works.

Does anybody have a similar performance loss using the latest Nvidia drivers?
(my specs are: PIII, 256MB, W2k SP4)


Pickles 27th January, 2004 22:23
Tested it on a 550 Mhz P3, GForce2 64 MB

With the vertex buffer enabled, the frame rate increase was dramatic. 12 at the start line with out 27 with. (Best frame rate mode.) Frame rates during the 'race' varied from 7 - 21 without and 12-50 with.

However...

With it enabled, the CCC demo would only run in Best Frame Rate mode and crash about 80% of the time in other modes.

That's my feedback on it.

Question... Is there a means of testing the compatability of the card with this? I'm thinking maybe it can be turned on automatically by the game when it detects a compatable card. How do you recommend implementing this with a released title? Any suggestions?

Thanks


monty 27th January, 2004 22:30
Pickles,
which driver are you using? Because it seems that only ForceWare 53.xx has good support of vertex_buffer_object.


Pickles 28th January, 2004 06:12
>>which driver are you using<<

Good question. Uhm.. To get Cipher working, I had to download the latest OpenGL drivers from their site. Didn't consider the driver. Checking the Device Manager, it says the Driver date is 10/6/2003 and the version is 5.2.1.6. Which is all the info it gives me.

Thanks for the tip monty. I'll see if I can get the 53.xx version.


Charles 29th January, 2004 21:11
I've tested my project with the 2777. The empty scene (a lounch environment with a small landscape) had 115 fps and went up to 160 fps! The same scene with 40 characters running about had 35 fps and stayed 35 fps.

Just looking at the skybox (6 polygons) the fps goes up to 900-1000, is that real? Well, I do like to think so :)

System specs:
Pentium 4 3.0 GHz
Graphics board: Asus V9950 with GeForce FX 5900
Driver from Asus: Win2K XP 5216
4x antialiasing
4x anisotropic filtering

Thanks Rik, great work.
Edited 29th January, 2004 21:12


Cowboybebop 31st January, 2004 03:01
I see about a 20-35 frame jump for geomtry on 2777 but special effects was only boosted by about 15 frames however they are more steady now.

Guess I'll try the newest

Hey rik have you ever thought about a progress report page showing how far along you are on certain updates ? Just a thought.
Edited 31st January, 2004 03:03


the_cX 5th February, 2004 22:24
i just tested 2777 and turned the vertex stuff on.

i have a p4 3.8 ghz and a geforce fx 5600 ultra and the frame rates freakin doubled in the temple demo. i get about 110 frames staring straight into the armor and statue thing and 200+ frames when i turn around and look at the walls. this is exactly double of what they were in the previous build.

however in CCC, frames seem the same. maybe even a little lower than the previous version. anyways, i guess its known that this new addition has to be further tested, debugged and developed, *cough*nvidia*cough* but im really looking forward to when it becomes solid.

gg rik


Dreamora 7th February, 2004 21:10
Hi

Although I only use the demo I think I post my FPS too as my system specs are a little bit different from the rest :)

P4-M 1,7ghz
NVidia GF4 440Go
Omega Driver 45.23 - speed settings

In CCC with r_arb_vertex_buffer_object "1" & r_ext_compiled_vertex_array "1" I have bad artifacts so I needed to deactivate the r_ext_compiled_vertex_array

but with both set to 0 the speed goes up to about 2x what I have with r_arb_vertex_buffer_object "1"

I know this is no test with new and old ... but a NVidia test with and without the extrensions :)


crusherfred 27th October, 2004 21:36
Rik,
I'd just like to bring Monty's CDS_FULLSCREEN suggestion up again for inclusion in the next cipher release. It really is useful for fullscreen development.


Rikh,
regarding the modified sysgl_ChangeDisplayMode()
for refersh rate selection, I suggest you to change the lines:
ChangeDisplaySettings(&devmode, 0)
with this one:
ChangeDisplaySettings(&devmode, CDS_FULLSCREEN)

CDS_FULLSCREEN tells Windows, after closing a fullscreen application, to keep the original size of any open window.

Right now, as you can easily see, all open windows are resized to fit in the resolution of your fullscreen app, which is quite annoying.
(Try and set your desktop to 1024x768, open a couple of windows, and then start and close your fullscreen app to 640x480)

Edited 27th October, 2004 21:37


rikh 28th October, 2004 12:23
Done. It will be in the next release.


crusherfred 29th October, 2004 00:28
Thanks muchly!




Register and Sign In to discuss this article