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


Submitted by Simon Jacoby, posted on October 28, 2000




Image Description, by Simon Jacoby



Some screens from my engine, Foo3D. It's just something i've been playing with to learn direct3d. It's grown a bit, and now i'm thinking of doing som sort of a adventure game.

So far:
  • loads 3ds files + generates mipmaps from .bmp-files
  • skybox (i've borrowed the skybox textures from a skybox tutorial *sorry, i can't remember the name of the guy who made them!*)
  • uses a layers to draw materials, for instance i can have a base texture, and then an environment map, and then some other texture etc. Blending modes are included in the layers. (So it's some sort of very crappy shader thingy)
  • direct3d lighting (real impressive feature, isn't it ;))
  • uses vertex buffers, to speed up multipass rendering, and when you have hardware TnL
  • Next step is visibility culling and lightmaps (and cleaning up my shitty code ;))

    I get around 150-200 fps on my Geforce2 MX and Celeron 400. (~4000 faces in total)

    /Simon Jacoby
    templar@spray.se


    [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.
     
    Kezza Lord

    October 28, 2000, 02:41 AM

    Nice, I like the oriental theme

     
    malkia/eastern.analog

    October 28, 2000, 03:21 AM

    It reminds me of some old game BUDOKAN -

    on the screen where password should be entered..

    It's still amazing...

     
    DragonL

    October 28, 2000, 03:38 AM

    Sweeeeet =)

     
    Bart Coppens

    October 28, 2000, 04:40 AM

    NVery nce!
    I think the skybox was created using terragen, it creates the same sort of mountains and clouds.

     
    SnAkE

    October 28, 2000, 05:10 AM

    cool pics...
    go on man!
    what's up next? -doin some coll.det. ?!

     
    richard

    October 28, 2000, 07:22 AM

    Yumm, I like outdoor scenes!

    Nice!

     
    Simon

    October 28, 2000, 07:39 AM

    Thanks for the comments! Greatly appreciated :) Snake: i'm thinking of doing visibility culling first (i thought i'd try octrees, it seems to be the easiest to begin with), because when i've done that, a lot of things will become easier i think (speed up collision detection and lighting etc).

    /Simon

     
    Nick

    October 28, 2000, 07:56 AM

    Nice project!

    Why speed up thing first? Your fps is five times above movie quality! I would do some special effects first.

     
    The Wolf

    October 28, 2000, 10:08 AM

    Nice! I like the theme.

     
    Luke Hodorowicz

    October 28, 2000, 10:12 AM

    Looks great!
    Do lightmaps next - it can only get better looking. :)

    -Luke

     
    Revolver

    October 28, 2000, 02:18 PM

    Read up on BSP trees. ;)

    They really aren't as complicated as some would have you believe (but there's several different BSP methods and speed-up techniques that can increase the complexity).

    I've not implemented one before, but this is a basic description:

    Take all your world polygons, select one and create a plane with it that divides the world in half. You now have two "spaces" - that which is on the front of this plane, and that which is on the back. The plane normal usually indicates which side is front. Now with each of these spaces, pick a polygon and create a plane that divides them in half, creating a two more back/front pairs. Repeat this process until you're "done" (ie, you've got all empty leaves).

    You can imagine this by scattering some pennies on your desk and dividing them with a pen. Take two more pens and divide the two groups on either side of the first pen... etc. etc.

    Once you get a handle on it, that's one more bullet on the resume, eh?

    Dave Eberly's brilliant "3D Game Engine Design" covers BSPs quite well, and also covers a huge glut of other visibility/culling/scene graph topics that might be of interest to you.

    Cheers.

     
    Ezra

    October 28, 2000, 07:46 PM

    I just wanted to comment that BSP's are a just a touch tougher than that. You've got the general idea, but things such as subdividing polygons were left out. For each plane, you have to go through the list of polygons on that branch of the tree, and evaluate whether it's in front, behind, or straddling the plane. If it straddles, then you have do divide the polygon into two smaller polygons. The trick to coming up with a good BSP tree is to determine which choices of root polygons will produce the fewest polygon splits while keeping the tree balanced. Many packages such as dedit for LithTech allow you to weight your choice some, so you can get a more balanced tree with more polygons, or a non-balanced tree with relatively few polygons. It's all in the algorithm.

    Ezra

     
    Jo Meder

    October 28, 2000, 09:00 PM

    It's Terragen, without the shadow of a doubt. The hills are even the default surface layer colour.

     
    /*vince*/

    October 29, 2000, 04:21 AM

    Good job man!

    Could you just add a few reflective surfaces to your scene, so that we can actually see environment mapping "in action"? ;o)
    I think you found the textures in Dan Royer's sky box tutorial. His web site is http://members.home.com/droyer/tutorials/Engine03.html, and guess what? He's got some tutorials on visible faces determination and BSP/Portals algorithms...

     
    Ingenu

    October 29, 2000, 05:12 AM

    I would rather recommend octrees for outdoor scenes, or quadtree if you prefer.

    BSP were nice, but you have many interesting other way of doing culling, portals might be interesting too, to mix outdoor and indoor scene...

     
    MrDevlin

    October 29, 2000, 11:07 AM

    Looks really cool, not like a test engine at all.
    You said you've a Geforce2 MX videocard. I might go buy such a thing too since it is even cheaper than a GeForce1 card in the Netherlands. But what are the restrictions compared to a normal GeForce2 GTS adapter that make it cheaper?? Is it slower??

    Jelmer Cnossen

     
    Simon

    October 31, 2000, 05:03 PM

    Ehrrm... i don't know if anyone's still reading this, but i thought i'd reply to everyone's questions. I've been away the last couple of days, *sorry*

    Nick: i need to speed things up because the 150-200 fps is average, the worst case is 50-60 fps, this maybe doesn't sound so bad, but the level is small. If i had a house with lots of rooms, the framerate would slow to a crawl.

    Revolver + BSP guys: i thought i'd try octrees + pvs, mainly because this is my first try at something like this and i thought i'd start off easy. (but thanks for the encouragement ;))

    Vince: i check out the site, and you're right of course, it was dan's textures! Thanks, dan ;)(i'll generate my own textures soon, i just used these for testing my skybox) ..about the envmap.. i will put together a demo soon, and then you can check it out yourself :)

    MrDevlin: Thanks for the comments :). About the MX, it's like the GTS except it can only blend two texels instead of four, the fillrate is about 80% of the GTS, and the memory bus is more limited (64 bits instead of 256, if i understand it correctly), so it's slower in high resolutions. So basically, it has all the features but it's slower... it's still fast enough for me though (i had a voodoo banshee before so this is a REALLY big step up for me ;)). I can play quake3 in 1600x1200x16, trilinear filtering and 32 bit textures without any problem (about 25-30 fps). It also has the glorified FSAA, but since the bus is so slow, it's practically useless in anything higher than 640x480. Looks nice though ;) I would highly recommend it to anyone thinking of buying a new graphics card. (check out www.anandtech.com and search for it if you want to know more...)

    Cheers,
    /Simon

     
    DarkReaper

    November 01, 2000, 03:26 PM

    How much time does it take to make something like that? Did you make the engine as well as the level editor, or are those pics within the level editor? That's some pretty nice work you've done there. I'm almost finished with "Advanced 3D game programming using directX 7.0." What other books would you recomend that I read so I can make something like that? How did you learn it? If you want you can e-mail me at darkreaper@planetunreal.com

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