Jump to content
  • Advertisement
Sign in to follow this  
alex_r

Otimizations

This topic is 4908 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

Hi, I have some questions abour otimizations in OGL, for 3D models, I'm using vertex array with VBO, my model have 3.000 polygons but I think the program is slow, and I need to develop the terrain and some effects. What I like is more some tips :D. 1 - Indexed Vertex and Vertex Array, where is the diference, there any REAL otimization in Indexed? 2 - I'm learning OGLSL, I will use more to effects, reflex and to mix textures to terrain, what can I change to GLSL to boost my game? 3 - My game just will run in nVidia card, how is the best way to create shadows? I see the Shadow Map, this is a good way? 4 - How can I boost the particle systems, I see the ARB_point_sprite in CodeSampler, this is very fast but very strange to control the particle size, (this is two questions) how can I set the size in OGL not in Pixel, this is the best way to create particles? 5 - I like to create clouds, but I need a 3D clouds like Flight Simulation, my idea is create with particles, there another way? I think is just it for now... Thanks for the help

Share this post


Link to post
Share on other sites
Advertisement
Hello..

1. With an index-array you store each vertex one time, with non-indexed you can end up storing one vertex alot of times ==> more memory, which is more data for the gpu, which is slower.

2. Well.. usually you ADD effects by using GLSL, and adding effects usually slow things down. But, if you for example have something animated by the cpu, that can be moved to the GPU that would be a huge win.

3. nVidia cards support depth textures, which is good for fast and good looking shadowmaps. Some ppl prefer stencil shadows, some shadowmaps. Mostly depends on where you want to use shadows... Stencil works very well for Doom3 environments, but shadowmaps works better for outdoor environments.

4. Mostly depends on your target system.. You can on newer graphicscards do the whole particle physics on the GPU, which should make it as fast as it can get. Sending data over the AGP-bus every frame is what usually slows down a particle system.. that and overdraw. ;]
Point sprites are good, and I think that the size can be changed in the GLSL code.. look in the orange book for details.

5. There has been some nice threads here about clouds.. I do think that using particles is a bad idea though..

Read some threads and papers and good luck! :)

Share this post


Link to post
Share on other sites
Quote:
Original post by gulgi
1. With an index-array you store each vertex one time, with non-indexed you can end up storing one vertex alot of times ==> more memory, which is more data for the gpu, which is slower.

but you can also only have one normal and texture coordinate pair per vertex, which may or may not be a problem for you.

i just recently started playing with GLSL, and you can easily set up shaders to do exactly what the graphics card would do without shaders, and it does so at the same speed. adding in effects and such slows it down depending on the complexity and number of effects, but you can fit a lot in before it starts actually sucking :)

the only problem i have now is wondering if i should bother to support graphics cards that can't handle shaders, since it is a pain to simulate some of the effects without them.

Share this post


Link to post
Share on other sites
Thanks everyone for the help...

1 - I'm porting my models to indexed, and I'm reading about Triangle Strip too...
2 - About GLSL, send some things to GPU is a nice idea, I'll read more about it.
3 - I think to try to use ShadowMap, I like to make some soft shadow tests with SMap. But I like to test the stencil too, I found some nice samples in nVidia about stencil...
4 - gulgi, I see your site, there many nice samples (I like to play BigWheels :p), and you made some tests with particles, how your system works?
5 - About clouds I found a nice video from GDC I think about Flight Simulator: CoF, I'm testing some clouds like GTA: San Andreas too, is not very nice like Flight Simulator, but is very nice to start.

Share this post


Link to post
Share on other sites
Quote:
Original post by krez
[...]the only problem i have now is wondering if i should bother to support graphics cards that can't handle shaders, since it is a pain to simulate some of the effects without them.
As long as things end up around the correct brightness, it's fine to just draw without shaders (ie no need to try to reproduce the really advanced effects with the fixed pipeline). Some simple approximation would be nice though, like changing advanced membrance shaders into translucent textures and that kind of thing, even though it wouldn't look the same it would still be decent.

Share this post


Link to post
Share on other sites
Quote:
Original post by alex_r
4 - gulgi, I see your site, there many nice samples (I like to play BigWheels :p), and you made some tests with particles, how your system works?

Thanks!
Last 3 months I have been playing WoW so, not much new stuff, sadly.

BigWheels looks kindof nice, but the way you control the car needs some more work.. and now it takes up 300+ MB:s so, sorry, no can do. ^_^

Particles was along time ago.. Everything is done on the cpu, and then rendered with some early point_sprite extension. I had a nice way of adding modifiers to a particles system with a function that was run for each particle. Looked nice but was way to slow.
My next particles system will use the gpu way more.

Good luck, and don't get to stuck in WoW or similar.. ;]

Share this post


Link to post
Share on other sites
I know gulgi, but my problem name is Ragnarok -_-'

But I have some questions about clouds, again, I downloaded the Ogre samples, one sample is about Volumetric Textures, I don't found many thinks about how how it work in Google, I like to learn more about it, this is a good way to create 3D clouds?

Where can I find some good informations about it?!



Thanks again :)

Share this post


Link to post
Share on other sites
Hehehe.. good games are bad for you. ;]

I havn't implemented clouds myself, just done some reasearch.
Try these links for starters:
http://www.vterrain.org/Atmosphere/Clouds/index.html
http://www.markmark.net/clouds/

Btw.. The first site has ALOT of other info as well. :)

Good luck!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!