A Pic form my Project

Started by oXineteX, December 25, 2005, 17:00:47

Previous topic - Next topic

oXineteX



Ok,
the Hills are an 3Ds Model, the Stars are Supershapes (http://astronomy.swin.edu.au/~pbourke/surfaces/supershape3d/)
... The Perfomance is not as good as is can, but it renders 90.000 Polys...

Any Idea to get more Perfomance in it?

Thanks for Comments

oXineteX

hvor

Maybe you can squeeze more performance out of it. Tell us how do you render 3d models? Like gl_begin - gl_end, vertex pointers, VBOs ...?
b]Hvor Games[/b]

darkprophet

if your marketing high-end cards that have support for PBOs, then you might consider changing the particle system to be entirely on the GPU with shaders.

DP

oXineteX

oh ok, the Partikels are "Hardcore" Renders gl ;) oh i see the fault..

glBegin(GL_TRIANGLE_STRIP);                                 
                glTexCoord2f(1.0f, 1.0f); glVertex3f(x + 1.5f, y + 1.5f, z);
                g...

--------------------

I store the models in vectors, every render, i run trough the Vector and calls the Renderfunction in the Models, every Model has a own gllist-id which stores the compiled Code of the Model (the list is generated on initialising).


//List_Models -> Vector<PRModel>
for(int j = 0; j < List_Models.size();j++)							
{ 	
  PRModel temp = List_Models.get(j);   
  glPushMatrix();										          
    temp.render();   //renders list
 glPopMatrix();

 .....

}



-----

Ok, i code Graphics since 2 Month and i shaders.. wow thats a big thing, but hey why not - is there any Tutorial how to start with shaders in LWJGL?

oXi

darkprophet

only way is to profile to see what your bottle neck is...no other way.

As for shaders, google for ARB_fragment_shader, ARB_vertex_shader. Those two are the new extensions (aka GLSL), if your hardcore like you say you are (;)), then you might want to do that in asm using ARB_fragment_program and ARB_vertex_program.

DP

Fool Running

You are using terrain and I'm guessing that you have the entire terrain in one display list. (I'm guessing because I don't see how that scene is 90,000 polys). That would basically mean that the video card is trying to render all of the terrain every frame.

Rendering terrain is tricky! You have to get your camera position and only render the terrain that is visible. Also, you might have to implement some kind of Level-of-Detail for the terrain (The further the terrain is from the camera, the less polys that make up a given area).

Quote...if your hardcore like you say you are...
I think he meant that doing the particles with shaders is hardcore :)
Programmers will, one day, rule the world... and the world won't notice until its too late.Just testing the marquee option ;D

hvor

Fool Running is right. Try to find some tutorials on Frustum Culling - that is the metod of displaying only visible polys of terrain. LOD method is another optimisation. You divide terrain into chunks (lets say 32x32 points), and for every chunk you pre-compile how many you want LOD parts - with 32x32, 16x16 and 8x8 points for example. Then, if your camera is far away from chunk (AND it is visible), display lower detail version of chunk.
More memory consumation - but better performance!
b]Hvor Games[/b]