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


Submitted by David Rosen, posted on March 05, 2002




Image Description, by David Rosen



Wow yet another terrain engine!

Time to check off some features:
  • quadtree frustum culling
  • LOD using a sort of geomipmapping
  • detail texture and color texture based on height,slope etc.
  • water
  • model support
  • basic physics and some buggy rigid body dynamics
  • skybox w/ animated clouds
  • weird full 3d explosions
  • This is for mac only, and I'm not releasing the demo just because most of you couldn’t run it and its part of a game I and my team are developing...

    I felt like recording a short movie which is 10 mb because the mpeg compression screwed it up so its just .mov, its at 320*240 with 256 colors at 15 fps… terrible I know but I don’t know of any other way to capture movies at ok fps without spending lots of time coding a video record class. Anyways if you’re interested get it from here.

    The water was hard because the mac opengl drivers do not support cube-mapping as far as I know, so I had to improvise a bit to get it to reflect the skybox correctly. It does not reflect the landscape because since this is part of a game I don’t think the huge fps hit would be worth the minor visual improvement. It is a couple hundred polygons to allow texture distortion and ripples.

    The skybox is a normal skybox with another plane with a scrolling cloud texture.

    The explosions are made up of several spheres with distorted vertices and texture coordinates, which slowly fade away. Of course they’re not at their final state yet, I just started working on them yesterday.

    If you’re wondering about fps I usually get around 30 or 40 or so at 1600*1200 resolution on my geforce 3, it would probably be a lot higher if nvidia ever released decent mac drivers…


    [prev]
    Image of the Day Gallery
    www.flipcode.com

    [next]

     
    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.
     
    afk

    March 05, 2002, 10:13 AM

    w00t w00t! Nice to see another Mac coder on here.

    Looks great!

     
    Cyble

    March 05, 2002, 10:18 AM

    Wow, nice !!!!! Nice alpha mask for that tree also. Especially like the sky, very artistic. What system for the sky did you use, skybox or skydome or just some cloud layer without any horizon :) ??

     
    Cyble

    March 05, 2002, 10:24 AM

    Since I was so enthousiastic I really didn't see your text about the skybox, so sorry for my question about the skybox :) :)

     
    freakyboy

    March 05, 2002, 10:27 AM

    looks nice .. at least the screenshots :) the MOV is sooooo ugly!! what are these, 16 colors? :P .. i think you could optimize the color palette of the MOV to make it look a bit better. but i would be much more interessted to see the vehicle physics than these explosions :) can you capture a second MOV?? btw. why not write a little video capture class?? i think you already have the functionality to capture a screenshot. now you just have to make the game run at constant 25fps (or 30fps or whatever) and capture a screen each frame. you can convert them to a movie in an extern tool, there are tons of free bmp2avi, tga2mov etc. tools i think.

    just my 2 cents :)

    freakyboy

     
    Bunnz

    March 05, 2002, 10:40 AM

    Looks really impressive!!!
    Especially the picture at the top!

    Perhaps you should try 32bit instead of 16 ;)

    Have fun
    Bunnz
    Visit: www.bunnz.com

     
    T0ad

    March 05, 2002, 11:03 AM

    Sweet! I really can't wait to see the full game.

    I too am glad to see the work of a fellow Mac user.

     
    davepermen

    March 05, 2002, 11:04 AM

    those pictures look very painted.. espencially the top one looks like artwork somehow.. very cool done.
    oh, and, go for mac! cool to see mac-stuff existing.. i don't have a mac but its cool anyways;)

     
    Trip99

    March 05, 2002, 11:11 AM

    Looks great. Only thing is perhaps it looks like you need a few more polys in your water its a bit jaggy, but I suppose thats an optimisation issue?

     
    David20321

    March 05, 2002, 02:50 PM

    "looks nice .. at least the screenshots :) the MOV is sooooo ugly!! what are these, 16 colors? :P .. i think you could optimize the color palette of the MOV to make it look a bit better. but i would be much more interessted to see the vehicle physics than these explosions :) can you capture a second MOV??"

    My vehicle physics are pretty bad, I'm in a group with T0ad and his physics are much better... can't upload it here though since its not mine :)

    I dont feel like coding a mov class yet since it seems more important to actually get the game working first. But I agree my .mov is pretty ugly

    "Looks great. Only thing is perhaps it looks like you need a few more polys in your water its a bit jaggy, but I suppose thats an optimisation issue?"

    The water has enough polys i think, the problem there is the water interacting with the landscape, it looks better in real time I think.

    Thanks for the comments :)

    -David-

     
    CGameProgrammer

    March 05, 2002, 04:23 PM

    The water and landscape look nice, but in the top picture, the landscape doesn't seem to be lit with the sun's color. It's gray, but should be reddish-orange. You should implement sunlight instead of generic white light.

    Looks perfect in the bottom picture, since the sky matches the lighting.

     
    Wernaeh

    March 05, 2002, 04:28 PM

    Neat terrain, especially like the trees !


    How comes everybody around seems to be using the same detail texture for terrains though ?

    -Wernaeh

     
     
    David20321

    March 05, 2002, 06:16 PM

    "The water and landscape look nice, but in the top picture, the landscape doesn't seem to be lit with the sun's color. It's gray, but should be reddish-orange. You should implement sunlight instead of generic white light. "

    Yes definitely, I'm going to try to do that.

    "Neat terrain, especially like the trees ! "

    Thanks :) I can't take credit for the trees though, they were modelled by an artist in our dev team.

    "How comes everybody around seems to be using the same detail texture for terrains though ? "

    Because it's cool and we don't want to bother making a new one :) I'm going to use a different one eventually, this one's sort of a placeholder.

    Thx for the cube map link, I'm going to try it out, looks it might only work for os x though :/

    -David-

     
    David20321

    March 05, 2002, 10:55 PM

    Replaced the mov with a smaller one w/ a bit higher quality, the sound is kinda weird tho, my underwater sound doesnt have weird static like that :)

     
    David20321

    March 05, 2002, 10:59 PM

    Replaced the mov with a smaller one w/ a bit higher quality, the sound is kinda weird tho, my underwater sound doesnt have weird static like that :)

     
    Luke Philpot

    March 06, 2002, 12:53 AM

    Niiiiice stuff!

    PORT IT NOW:D:D:D:D!!!!!!!!!!

     
    Fil

    March 06, 2002, 06:11 AM

    ooo.. Mac developer!.. I know someone who will be pleased to ear that!... :-)

    Hey, this sparked my curiosity!... I noticed the water is too transparent far away, right where the reflection of the sun is...

    Usually reflective liquids tend to reflect more if you look at them in a smaller angle.. and be more "transparent" in a speeper angle..

    Does anyone have any idea if that could be simulated with a shader or something?

    The only way I am imagining is to have a mask dinamically generated (constant if the eye position is at the same distance to the water)
    that would influence the amount of reflection/trasparency of the water depending on the angle you would be looking at... Being the water a plain, the mask should look like a very blured filled circle..

    The second screenshot looks better but that is probably the work of fog..

    Oh.. and Excellent Work, Expecially because you do it on macs! ;-)

     
    Max

    March 06, 2002, 06:38 AM

    "Does anyone have any idea if that could be simulated with a shader or something?"

    This effect is called the Fresnel effect; I believe NVIDIA has released some demos of it.

    Max

     
    davepermen

    March 06, 2002, 09:34 AM

    if you don't want to go into the fresnel-term, take this approach:
    dot the surface normal with the point-to-eye. if its one, you look from top, if its 0, you look from the side.. reflective = 1-dot (the more from the side, the more reflective..), refractive = transparent = dot (the more from the top, the more you can see trhough..

    result: color = (1-dot)*reflection + dot*transparence or
    color = blend(dot,reflection,transparence)

    dot can be calculated per vertex and stored in color0alpha, then used in the blending-func.. simple but should work.. (you can scale and bias the alpha before using it for having stuff to always reflect and always be a little transparent..

    can even be done with fixedfunction and one enabled lightsource if you know how to set up the texture-environment;) then fully in hardware!

    possibly we can even do it perpixel.. with some envmap as dot-lookup possibly.. ideas ideas?!

     
    disableddan

    March 06, 2002, 09:49 AM

    Wow! That looks incredible! I guess I'll have to buy a MAc for when that comes out! Do you have a website for your game (sorry if this has already been asked- I just sort of skimmed ;) )

     
    David20321

    March 06, 2002, 07:14 PM

    "Usually reflective liquids tend to reflect more if you look at them in a smaller angle.. and be more "transparent" in a speeper angle.. "

    Actually I'm already doing this, cant see it too well from the screenshots though you can sort of tell from the bottom one.

    Sometimes you can see through the water when it's shallow if the reflection is dark colored, which is what you see in the sunset pic.

    Both actually have the same amount of fog, just different colors.

    Davepermen it does something similar to what you describe.

    Disableddan no nobody asked that I think but the answer is no, I don't have a public site for it yet.

    -David-

     
    MaxSt

    March 10, 2002, 02:57 PM

    What a difference a good sky could make!

     
    This thread contains 22 messages.
     
     
    Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.