Sign in to follow this  
Viper173

bottleneck fillrate

Recommended Posts

Viper173    122
Hi, everybody. I recently boosted my drawing procedures by using DrawElements and VBOs. I was overwhelmed by the raw triangle force my graphics card actually has. I got more than 12 MTris/s fully vertex lightened, blended, and textured. However, today I started thinking about how to create Nebula Effects, and numerous approaches showed me that all geometric detail potentials are worthless when it comes to fill rate questions. My 12Mtris/s scene was a bunch of spheres rotating about a star like center filling up about 50% of the screen. Then, today I simply rendered 20 cubes(!) with alpha 0.1 all together filling up just 25% of the screen. Using about 500 Trianlges was enough to get the same fps as with my 100.000 Trianlges scene before. How come? 50 million transitors-and they can only render 20 cubes! Obviously, my approach was a little ... stupid. But still... What do you think is a good compatible way to draw nebulas, volume lights, fog, haze, etc. by taking advantage of the incredible geometric power of todays graphics crads? Or do you say, there is no possible way to render a big nice looking nebula filling the entire screen and still get frame rates around 100 fps?

Share this post


Link to post
Share on other sites
_the_phantom_    11250
Well, the frame rate depends on your card somewhat, however Freespace 2 had some wonderfull nebula effects in it, if you do a google for its source code you can spend some time picking that apart to see how they did it, and keep in mind they were getting ~30fps @ 1024*768*32 on a TNT2 Ultra (with a 350Mhz cpu iirc)

Share this post


Link to post
Share on other sites
rick_appleton    864
I'm going to do a guess here, and say they might be doing it the same way as homeworld; by using vertex-colors only. No texture, no lighting, just plain vertex position + color.

Share this post


Link to post
Share on other sites
zedzeek    529
yes as youve discovered normally the amount of pixels drawn has more of a beariung on the fps, than number of vertices,
hell even my gf2mx200 could do 20million tris/sec.

>>Or do you say, there is no possible way to render a big nice looking nebula filling the entire screen and still get frame rates around 100 fps<<

some possible methods,
*do u need blending? if not disable it.
if u do, enable alphatesting as well.
*use texture compression if possible
*check the internal formats of your textures, some are faster than others
*disable depthwrites if unnecessary
etc

Share this post


Link to post
Share on other sites
jitspoe    122
Just out of curosity, what video card do you have? If it's an ATi card, you might be experiencing the same fillrate problems I'm having. :\

Share this post


Link to post
Share on other sites
MARS_999    1627
Quote:
Original post by Viper173
Yes, it's an ATI 9600 Mob.

rick_appleton, what do you mean by vertex-colors?
billboards? but not textured...?


Vertex colors as in each vertex has a color value. glColor3f or glColor4f for each vertex. And if you are using lighting you may want to use glSecondaryColor3/4f... Not sure if you figured this out or were told yet...

Share this post


Link to post
Share on other sites
Dmytry    1151
Just do not fill entire screen over and over, that the key. Do not draw 500 potentially fullscreen billboards. (because, fillrate of cards is around gigapixels per second. That is, you can 1000, maybe 2000 or 3000 times fill your screen.)

I'm sure you can achieve desired effect without doing all that.
I have some esperience with such things..clickster (may not run on ATI),

screen0

screen1

screen2
(12..15 FPS mainly because my FeGorceFX 5200 64bit bus is slow. But even with such card, it almost never gets below 12..15 fps)

My particles that form "sum light" of stars is just particles with textures with single-color circle painted on it. And i'm not filling entire screen over and over. I'm not getting high FPS but i know that i can fix that.

[Edited by - Dmytry on October 24, 2004 3:53:51 AM]

Share this post


Link to post
Share on other sites
rick_appleton    864
Quote:
Original post by MARS_999
Quote:
Original post by Viper173
Yes, it's an ATI 9600 Mob.

rick_appleton, what do you mean by vertex-colors?
billboards? but not textured...?


Vertex colors as in each vertex has a color value. glColor3f or glColor4f for each vertex. And if you are using lighting you may want to use glSecondaryColor3/4f... Not sure if you figured this out or were told yet...


Yep, that's it. The idea is to use the processing power of the videocard not to look up texture colors, but to assign them your self.

Imagine a large sphere with yourself on the inside. Now just create vertices on the sphere where you want to show the nebula and color the vertices themselves in a nice pattern.

Here's a page that explains how the backgrounds in Homeworld are made.

Share this post


Link to post
Share on other sites
rick_appleton    864
Dmytry: you could use cube for this, not a cubemap. The entire idea of this solution is to not use a texture, but only vertex colors. So then it doesn't matter what kind of surroundings you use. However, a sphere is more easily understandable.

Share this post


Link to post
Share on other sites
Dmytry    1151
Quote:
Original post by rick_appleton
Dmytry: you could use cube for this, not a cubemap. The entire idea of this solution is to not use a texture, but only vertex colors. So then it doesn't matter what kind of surroundings you use. However, a sphere is more easily understandable.

But why it's good to use vertex coords instead of texture? Does it make image to look better than with cube/cubemap? What you mean by "surroundings" ?

btw: skybox cube works almost exactly like cubemap, for ray direction it gives a color. And if you use cubemap to store skybox, you don't need cube at all, just load apporiate texture matrix and draw single textured quad in front of camera, with z-write off (or you can even use it to clear z-buffer). And you can use same cubemap for reflections.

Share this post


Link to post
Share on other sites
MARS_999    1627
Quote:
Original post by Dmytry
Quote:
Original post by rick_appleton
Dmytry: you could use cube for this, not a cubemap. The entire idea of this solution is to not use a texture, but only vertex colors. So then it doesn't matter what kind of surroundings you use. However, a sphere is more easily understandable.

But why it's good to use vertex coords instead of texture? Does it make image to look better than with cube/cubemap? What you mean by "surroundings" ?

btw: skybox cube works almost exactly like cubemap, for ray direction it gives a color. And if you use cubemap to store skybox, you don't need cube at all, just load apporiate texture matrix and draw single textured quad in front of camera, with z-write off (or you can even use it to clear z-buffer). And you can use same cubemap for reflections.


You can do whatever you like, rick was pointing out one method and his suggestion looks good if done right and is not expensive to do. Plus it runs on pretty much anything. Also if you have a texture you might have to use a very large texture size to get a good image quality, due to the size of the screen and having to set the quad back so far from the origin point. So with vertices being colored you can increase the polygon count and get a better level of detail possibily without much performance cost issues where a large texture and depending on the amount of VRAM could slow you down with all of you other textures...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this