faster draw times

i’m drawing knots using around one thousand spheres and cylinders. The time that it take to draw these objects is too long, it can take anywhere from 5 to 30 seconds to display the knot. anyone have any ideas on how to speed this process up. Incus

a) Not enough info.
b) on what hardware? 5-30 secs on a 100GHz machine or what? Using a TNT or what?
c) how are you drawing now? Display lists or what?
d) you mention spheres and cylinders, but you don’t mention their size.
e) all of the above.

not positive on the machine type think its a 900mhz p3 with no video card the spheres and cylinders have a radius of .5 with 15 stacks and slices same with the cylinders. i just have a loop that draws and translates them. any help is appreciated Incus. also i am running it on LINUX.

[This message has been edited by incus (edited 04-02-2002).]

not positive on the machine type think its a 900mhz p3 with no video card …

What?! No video card?! What i would like to know is how are you rendering stuff in opengl with no video card? Why would you want to render 3d graphics with no video card?

-SirKnight

Hmmmmm dont you think a little more information would be appropriate?

How do you draw the “knots” and how many of them (Immediate mode, Displaylists, VAR, …)

Which operating system, which programming language, what kind of graphic card, which Pixeldescriptor, how do you setup your near and far clipping plane, …

No offense, but this sounds to me like this:

“Sir the car you sold me doesnt run as fast as it should be!!! Whats going on?”

“Hmmm, did you ever tried to shift gears?”

“Gears whats that?”

I was a little late as it seems

By saying no video card, I assume you mean no 3d acceleration at all is that correct?

But still how do you draw stuff?

Compiled displaylists or the immediate mode?

Do you use textures or antialiasing?

hmmm i draw them in immediate mode and in c++. as far as everything else i already stated the video card is worthless it is an integrated card with 4mb of memory im running on linux and using g++ as a compiler. as for near and far i just set them to .5 - 100. anything else incus

Well for your “knots” you can easly use compiled displaylists. They are alot faster than the immediate mode (one OpenGL call instead of hunderts?).

What kind of display mode are you using? 256 Colors (with dithering) or high or truecolor?

Since you are in software mode, you should disable antialiasing and set the texture filters to “nearest” (if you use textures that means).

If you have overdraw (objects overlap each other) you may want to sort the objects according to their distance to the viewpoint for a better Z-Buffer efficiency.

Thats it for now, until you “reveal” more details

Given that you’re running unaccelerated OpenGL (which is very much not optimized), your framerate seems to be what you would expect to see. The only way to get significantly better speed is to get a better card.

[This message has been edited by Korval (edited 04-02-2002).]

i’m some what new to opengl and am not sure what compiled display lists are. where can i read up on these to get a better understanding? also thanks for the help. Incus also believe the color is high color i’ve read what this page has to offer on display lists and where else recommended?

[This message has been edited by incus (edited 04-02-2002).]

i’m some what new to opengl and am not sure what compiled display lists are.

May i ask if your new to all of this why are you posting in the ADVANCED forum? First you could try searching (google sure does do wonders) for opengl tutorials, if all else fails then get a book. Heck, a few good opengl books are on the net for free. Older editions but still darn good.

Google.

-SirKnight

I had a similar problem with linux in our university labs. It turns out that the admins, even though they think of themselves as linux people, had no clue what DRI (direct rendering infrastructure) was. You will need XFree4.0 for DRI and a new vid card to speed up your app. I don’t think that display lists will help very much…

I don’t think that display lists will help very much…

Oh yes they will. Display lists are one of the fastest ways to render. Take a look at the opengl preformance faq by nvidia. Display lists are usually faster than vertex arrays, unless VAR or something similar is involved (like what ever ATi’s VAR equivilent is, etc). Of course this is assuming that your not running in software opengl mode which will suck major no matter what.

-SirKnight

SirKnight, I think Boris008 meant that using display lists on such a low-end (gfx card-wise) configuration will not help much.

I kind of agree with him: first, get a new card, then try display lists.

Regards.

Eric

I´ll agree that software rendering is slow, but is it not >that< slow that it takes 5 to 30 seconds for a frame unless your a doing something wrong.

On a P3-900 you should get a “speed” of at least 5 megapixels and 1 million triangles(textured/lit) per second (just a rough estimate though).

And if he draws only “knots” that should be sufficent to get at least one frame per second (depending on the size of the drawing area and the number of triangles per “knot”).

I dont think he is fillrate limited, it must be something else he did not said yet.

So somemore questions:

What is the size of the window you are drawing in?
How many triangles/quads per “knot”?
Do you use textures (I asked that before I think)?
Do you use alphablending?
Do you use the stencilbuffer?
Do you use the Z buffer?
What is the approximate size of the drawn “knots” in pixels?
How many “knots” do you draw per frame?
Do you sort them?
Do you draw an image in the background, or just clear it to an given color?
Do you calculate the geometry of your “knots” only once or over and over again (every frame)?

don’t use spheres. spheres are build by tons of triangles, and u use tons of spheres means tons^2 triangles. and you can only draw 1/ton triangles at nice speed with a software-renderer… ton, the new count-unit

can someone tell me of another way that i can create a sphere with out using glutSolidSphere? and also can i pass arguments into a display list? Incus

Ton? Hmm… I like it.

Lets see, why do we get TONS of newbie questions in ADVANCED? or should that be ?

You can roll your own spheres, … um, sorry, couldn’t resist.

Anyway, check the FAQ(s), and/or use google or even search this message board for other options on creating a ball of pixels.

On a P3-900 you should get a “speed” of at least 5 megapixels and 1 million triangles(textured/lit) per second (just a rough estimate though).

If your renderer is highly optimized, then maybe you can get close to that. The software OpenGL renderer is not optimized very well (if at all).

WHY USE SPHERES?! you can use triangles directly. opengl does support TRIANGLES not spheres… and i guess your funny object can be represented well with triangles…

for spheres. use one of those:
raytracing (quite fast if you do some simple octree over it)
sprites/particlesystems/billboards. just a quad with a spherical texture on it.