Not logged in, Join Here! or Log In Below:  
News Articles Search    

Submitted by Philipp Walter, posted on April 07, 2002

Image Description, by Philipp Walter

These are two screenshots from my new OpenGL project. Features:
  • terrain with a grid of 1024x1024 using VAR to achieve throughputs up to 12 MTris/sec
  • EMBM-Water with realtime reflections
  • skybox with moving cloud layers
  • simple particle system (2nd picture)
  • MD2/MD3 models
  • projective shadows
  • The terrain uses a very simple LOD system with 64x64 patches.These patches can have 4 different LOD states which depend on the distance from the camera.(I think on today´s GPUs this is probably the best thing to do or what do you think?). The water uses the texture shaders for perturbation.But this is still a little bit buggy because when you get too close to it the texture projection fails because the Geforce3 can´t do projective offset 2d texturing and so I have to do this myself... The shadows are just simple projective shadows. (black model rendered from lightpos and projected on the floor)

    Before someone has to ask for it:
    System specs: P4 2,0 GHz, Geforce 3


    Image of the Day Gallery


    Message Center / Reader Comments: ( To Participate in the Discussion, Join the Community )
    Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
    Neil Edelman

    April 08, 2002, 02:06 PM

    Looks amazing. The obvious contrast at the water edge, I agree, needs some kind of blending / transparency. What's the black strip on the left of the water in the lower shot?

    Division By Zero

    April 08, 2002, 02:08 PM

    To avoid cracking use more crack


    April 08, 2002, 02:08 PM

    Very cool especially the water effect.

    I have two questions.

    1. As bgl asks, what do you do when two LOD patches abut each other to avoid cracking?

    2. From your description you are using 64x64 patches which means each patch is 1024/64 = 16 units square, so thats 256 triangles per patch? But how many patches are in view at any one time?



    April 08, 2002, 02:27 PM

    There are two issues here.

    First the vertex projection. The only way to avoid distortion near the near clip plane is to either clip your polys manually (slow...) or to make a higher tesselated water mesh (doesn't 100% eliminate it - but should reduce it a lot).
    What I do, is to to make the water patch high detail (lots of polys) when the camera gets close to it, but low detail otherwise.

    The second issue, is the actual projection.
    Something looks to be wrong with either your mirrored view matrix or your render to texture routine.
    The mirror image looks like it is of completely different terrain than the 'above water' terrain.

    So hows about your terrain lighting then? :) Any special methods used there? It looks very nice.

    Philipp Walter

    April 08, 2002, 02:28 PM

    No ,64x64 vertices per patch -> 64x64x2 triangles per patch
    1024 / 64 = 16 patches -> 16x16 patches for the whole terrain
    To avoid cracking I just connect the patches with a tristrip.

    Philipp Walter

    April 08, 2002, 02:37 PM

    "completely different terrain than the 'above water' terrain."
    Yes you´re right the reflected terrain has less details to save performance.

    "So hows about your terrain lighting then? :) Any special methods used there? It looks very nice. "
    The terrain lighting is a precalculated texture. I just use a simple
    ray-cast to determine the shadows and afterwards I do a dotproduct with the normals and the light vector just like dot3-bumpmapping.

    Philipp Walter

    April 08, 2002, 04:52 PM

    So finally I found the mistake. The aspect ratio of the projection matrix was it works fine.
    PS:Thank you all for your feedback.


    April 10, 2002, 09:24 AM

    Nope, not just you, now that you point it out it does look like the character's shadow is projected inverted.

    Nai Tandu

    April 11, 2002, 11:02 AM

    just one thing to say about it:

    i love it!

    is absolutely great! keep up that ncie work man!


    Sebastian Jancke, Cubalid 7,

    Da Silva

    April 23, 2002, 12:25 PM

    I´ve got the demo!!!!!!!!!!!!!!!

    Philipp Walter

    April 23, 2002, 12:28 PM

    Yeah because you attend the same school...
    but all the others won´t get it until I have a homepage.

    Da Silva

    April 23, 2002, 12:30 PM

    only fake!!!!!! The demo is GREAT :-)

    This thread contains 72 messages.
    First Previous ( To view more messages, select a page: 0 1 2 ... out of 2) Next Last
    Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.