[Freeciv-Dev] Re: [Re: Performance (was: [Re: [OpenGL client (was Re: Re
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Jules Bean <jmlb2@xxxxxxxxxxxxxxxx> wrote:
> On 2 Feb 2000, * wrote:
>
> > I mentioned in the previous mail about performance issues. The main
issues
> > are:
> >
> > 1) due to the nature of openGL and 3d, most people will be unable to run
it
> > full screen with a framerate high enough to support animation, and as of
yet I
> > know of no way to do localized animations with OpenGL/glut.
>
> You mean, presumably, most people without hardware acceleration. Bear in
> mind that it is now nearly impossible to buy machines without 3D
> acceleration built-in.
>
> My crappy old K5-200 can struggle through quake v1 at about 20fps because
> it has a voodoo2. And that has animation.
>
> So I suggest, make animation an option, and ppl without hardware acc leave
> it off.
>
> >
> > 2) The big issue, the number of polygons. Its obvious that we'll want
more
> > than one polygon per terrain square, as a general rule ;) In fact, for
a
> > realistic mountain square, for example, you'd probably want at least 5x5
(25
> > squares, 50 triangles). On a reasonable map of, say, 600 squares with
only 20
> > triangles per terrain, thats 12,000 triangular polygons. Which is 48 megs
of
> > ram to store just the shape. Which is a bad thing ;)
>
> Sure. But how many of those squares really need 20 triangles? Most
> squares need 2, surely? And make the high detail an option? And also, why
> is it 4K per triangle in the map? That seems a lot.
>
> Jules
>
> /----------------+-------------------------------+---------------------\
> | Jelibean aka | jules@xxxxxxxxxxxxxxx | 6 Evelyn Rd |
> | Jules aka | jules@xxxxxxxxxx | Richmond, Surrey |
> | Julian Bean | jmlb2@xxxxxxxxxxxxxxxx | TW9 2TF *UK* |
> +----------------+-------------------------------+---------------------+
> | War doesn't demonstrate who's right... just who's left. |
> | When privacy is outlawed... only the outlaws have privacy. |
> \----------------------------------------------------------------------/
Silly me did the math wrong I was interpreting megs for k ;) Its not near
as bad as previously thought, but I will still want to do disk caching. Also,
any ideas on optimizing a 3d landscape? Obviously, removing polygons that are
too far away, off the screen, etc for openGL will help. Also, is there a way
to define a 3d model, and then just call the model, instead of making
GL_TRIANGLES each time it draws? I'm gonna mess around, but suggestions are
always very helpful/time saving.
As to a square needing several triangles, its all about realism. You ever
seen a 3d landscape where they used a single plane for the ground (2
triangles)? even on flatland, it generally looks somewhat pathetic. Slight
normal changes exist in even the most flat lands, and it helps the effect
immensely (and simplifies the programming). Now that I realize that the ram
req's aren't that bad, it isn't a problem.
I'll have screenshots for you soon, I got the terrain working, and it looks
beautiful (although I haven't done rainfall calcs yet so it can't determine
what kind of terrain is what, so its all green currently... but it still looks
beautiful. I'll probably send pics once I take that into account, and
generate coastal plains because that should be fairly simple.
I've got the .lwo object loader working fine, but it doesn't optimize the
models as it loads... once I get into optimizing my landscape, I'll do the
same with the models, because they run rather slow (I made a small army of
penguins).
Perhaps most of my performance issues are due to the fact that I have a 2 year
old laptop, and it undoubtably has no 3d acceleration. Regardless, even
without 3d acceleration its fast enough to generate single frames for people
without too much wait. I just think it may be a problem when, say, someone is
trying to move a unit quickly and it has to do a frame for each movement
(remember, I can't just redraw a part of the screen, at least, don't know how
to).
I also had a... rather nifty idea for saving the landscapes. You can save an
entire landscape in just 4 bytes! (plus saving the dimensions, ruggedness,
etc). Just save the random seed number. Anyone see a problem with this? One
that couldn't be gotten around from, say, putting the source code for a random
number generator in the code?
It looks like we will be having to make some minor server mods, so there will
be a gl server also, unless you can think of a better way (fractal terrain
generation doesn't like being told "there's a mountain here, and a plain
here...", it likes to make it itself, and thus we'd need to use a true 3d
model, unless we want to make 3d tiles, which doesn't look near as nice)
- Rob
____________________________________________________________________
Get your own FREE, personal Netscape WebMail account today at
http://webmail.netscape.com.
- [Freeciv-Dev] Re: [Re: Performance (was: [Re: [OpenGL client (was Re: Re: Project)] (fwd)])],
* <=
- [Freeciv-Dev] Re: [Re: Performance (was: [Re: [OpenGL client (was Re: Re: Project)] (fwd)])], Daniel Burrows, 2000/02/03
- [Freeciv-Dev] Re: [Re: Performance (was: [Re: [OpenGL client (was Re: Re: Project)] (fwd)])], Vasco Alexandre Da Silva Costa, 2000/02/03
- [Freeciv-Dev] Re: [Re: Performance (was: [Re: [OpenGL client (was Re: Re: Project)] (fwd)])], Jeff Mallatt, 2000/02/03
- [Freeciv-Dev] Re: [Re: Performance (was: [Re: [OpenGL client (was Re: Re: Project)] (fwd)])], Jules Bean, 2000/02/03
- [Freeciv-Dev] OpenGL Client, Benjamin Korvemaker, 2000/02/08
|
|