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

Submitted by Tim C. Schröder, posted on August 18, 2001

Image Description, by Tim C. Schröder

Well, I thought it's time to share some new pics from my current engine. Basically it is a GeForce 3 optimized FPS engine, with 100% dynamic lighting as the main feature. All the shots you see here have a preprocessing time of 0ms, except the 500ms for the Octree during the level compilation;-) I tried to get the lighting model working on GF1/GF2 cards, but I failed. Not possible. At least it screams on the GeForce 3. Well, I guess you want to see the feature list, here it goes:
  • Vertex.. ahh... SMARTSHADER(TM) for basically every triangle on the screen
  • Pixel shaders for the entire lighting
  • DOT3 diffuse + specular per-pixel lighting on every surface (Well, not on the skybox...)
  • Per-pixel normalization cubemap or pixel shader normalization for every surface
  • Tangent space setup done by vertex shaders
  • DOT3 self-shadowing
  • PPA for every surface
  • Realtime general shadow solution, everything shadows on everything including on itself
  • Colored lights
  • Blinking, flickering and pulsating lights through a shader definition file
  • Lights can be assigned to splines
  • Detail texturing
  • Hyper texturing
  • Advanced vertex buffer optimization code to gurantee best T&L performance
  • Light flares + coronas, implemented through vertex shaders
  • Ellipsoid based collison detection / handling
  • Realtime in game light editor, modify every aspect of the lighting without any reloading
  • Configuration system allows you to change basically everything without any code rebuild
  • Basically any damn 3D feature in the world. If it is not supported yet, it will be in the future
  • The engine is incredible CPU limited at the moment, this is my main problem. Rendering brute force is sometimes even faster than performing HSR. I can render 4 quad texture passes without much drop in performance. The CPU code isn't sooo unoptimized, but the GF3 is card that handles everything you throw at it and just screams for more, so my crappy 700Mhz machine can't keep up.

    If you are interested in a discussion about realtime lighting algorithms, you know my mail. Note: A discussion is a conversation between to similar skilled people that learn from each other. So please no "Teach me how to do this !!!" mails. I'm quite busy with my work and writing my engine, so really no time for tutorials / explanations, sorry ;-(

    Anyway, comments welcome.

    Tim C. Schröder

    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.
    Patrick Lahey

    August 19, 2001, 02:19 PM

    You said:

    Zero volume meshes don't have the property, particularly the cylinder with one bent side I mentioned - I worked this out on paper visually again just to make sure.

    To which I say:

    Well, I do not agree but I want to avoid a "yes it is, no it isn't" argument so let me explain.

    First a few details. Front facing triangles are those that are unambigously front facing (i.e. the front facing/back facing test does not yield zero). The orientation of the silhouette parts of the shadow volume is set to be the same as the orientation of the corresponding single triangle shadow volume cast from the silhouette edge of the front facing triangle (hmmm... I hope that is clear, the idea is simple, but the words are not coming...).

    I am assuming that you are focusing on the infinite light case with the sides of the cylinder perfectly normal to the light direction. Hopefully that is correct.

    Using the above definitions, my pictorial proof tells me that the potential silhouette shadow volume will be the same as the single triangle shadow volume (again that is all I am stating here).

    The only possible problem I can see for this case is that side of the cylinder beyond the bump may (and probably will) have z-fighting/precision issues associated with the shadowing. But, this would also be a problem with the single triangle shadow volume algorithm.

    So, just to be clear, if you are arguing that this special case may experience z-buffer/precision related issues for the single triangle shadow volume case, I agree with you. My point, however, is that using the potential silhouette approach gives you the same shadow volume (and in this case the same problems) as the single triangle construction.


    August 19, 2001, 02:21 PM

    Well if you are raytracing polygons or nurbs surfaces in realtime instead of spheres and infinite planes and stuff like that, I would be happy to see your raytracer in action. Perhaps you could put that on your web site?

    Btw. GF3 propably has problems to realize infinite tunnels too ;-)

    ( But who the hell tries to base his game world around primitives like that ?-)

    Warren Marshall

    August 19, 2001, 02:22 PM

    Uh guys? Consider for a moment: Why don't Carmack or Sweeney write software renderers anymore?

    Once you figure that out, you're halfway home. ;)


    August 19, 2001, 02:44 PM

    Because they just want to sell, sell, SELL!

    They don't want to waste their time with inventing the technology for the future, they're not researchers. They just want to work and be creative with the technology invented yesterday. Who would buy a hyper-realistic software ray-tracer for 320x240 at 12 FPS on a PVI 2GHz? Gameplay and showing off their graphics cards amazing fillrate is what gamers want, now!

    Try new things, but sell it as soon as possible...


    August 19, 2001, 02:51 PM

    tim, i get the impression you're being paid by nvidia to do pr for them on flipcode :)


    August 19, 2001, 02:51 PM

    now everyone follows carmack, everyone follows nvidia.. yeah, its the easy way, but dont you see you're just doing what they want? its all the same, all the same demos, all the same way looking.

    this is game-comerce, you hate it in the musicbusiness but use it yourself in the gamebusiness.. copieing eachother.. years ago we had clones over clones from quake.. till noone could play it anymore.. and now? clones of doom2000? engine is not everything.. be creative and create GAMES.. no one likes a firstperson shooter wich just looks good.. you have to be creative to come out of the rest and be wellknown

    try to do something new and you see how restrictive todays hardware really is.. if you dont want to do perpixellightened games you get troubles.. nice perpixel cartoonrendering is more difficult.. and you can do much more than that.. but there software is much more powerfull


    August 19, 2001, 02:54 PM

    area lights and all this stuff is not part of the direct illumination model I was talking about...



    August 19, 2001, 02:54 PM

    he works in an offizial firma, they all have to love gf3, cause they get much help from them to develop.. he works at the company wich made x-isle..


    August 19, 2001, 02:56 PM

    Hey thanks man ;-)

    Finally somebody that has a sense for reality ;-)


    August 19, 2001, 02:57 PM

    Really nice images. Fully dynamic lighting makes so many cool effects possible (swinging lights, & stuff).
    You said your vsd takes up most of your cpu time, and that your not overly stressing the gf3. Do you get a great speed up using your vsd, as oposed to just portals?
    For lightmapped scenes it doesn't seem to be worth doing anymore than simple portals (which take up very little cpu time). However if this meant you had to work out a shadow volume for everything in all the visible portals then it might be diffrent. Would it not be possible to use diffrent vsd schemes for working out what to make shadow volumes for and what to render, but this might still be slower.
    Anyway very cool screenshots,


    August 19, 2001, 02:58 PM

    Wow, 100th comment.

    CGI Joe

    August 19, 2001, 02:58 PM

    Say, you wouldn't know MC BAXTON would you?



    August 19, 2001, 03:00 PM

    The dynamic lights surely look 100x better. Just the fact that I can do a per-pixel dot product. Lightmaps lack this because they can't reflect the dp lighting. I don't know what your point is, but this dynamic lighting model beats lightmaps easily, even for static situations. I think even in the screnshots you can clearly see how the lighting beats Q3 lightmapping f.e. Because it is ultra-low res and it doesn't take dp3 into account



    August 19, 2001, 03:02 PM

    Well, try to come up with something better than nVidia and Carmack. Didn't happen so far...

    David Olsson

    August 19, 2001, 03:03 PM

    Why do you ask me that ?

    Maybe they don't like cpu's, maybe the are lazy, maybe I'm wrong, maybe I aint, maybe they don't see the possibilites I do, maybe they getting paid by big hardware vendors like nvidia use their hardware, maybe Im just stupid (most likely eh ).... who knows, I don't.

    I know this:

    There are only width x height pixels on the screen, you normally only need to render each pixel once, and if you render a pixel once then a software engine is fast enough.
    Imagine this, a complex dynamic scene with 100 times overdraw. Bruteforce would litteraly choke a gf3 while a good software renderer could more or less run at the same speed as with one overdraw.
    The occlusion culling algo might have to work a pixel level
    for it to be effecient but then you can't really take advantage of a gf3.

    Conclusion: The gf3 is a hell of a number cruncher but it's a very stupid bastard :)))

    Im working with a sort of voxels right now and I thought out a really fast occlusion culling algorithm, it wouldn't work with triangles but for my engine I think it has a great potential.
    I will still use 3d hardware but in a quite different way than everyone else.

    David Olsson

    August 19, 2001, 03:05 PM

    Jesus, are we twins ? I rarely disagree with you... :)


    August 19, 2001, 03:09 PM

    lol ;-)

    You are just plain funny ;-)

    Man, I guess you completely lost any relationship to reality.

    You sound like some 40 years old person that just can't make the transistion from DOS to windows ;-) "No low level control ! I can't access everything"

    Keep on dreaming of your stuff, I mess around with real stuff.

    I see how everyone is pissed of the oh so limitating GF3, this is why we have not a single SW render that reaches the image quality of a 3-5 years old gfx card, but even the slowest 3D engine beats every SW render out there.



    August 19, 2001, 03:09 PM

    tim.. you where such a nice guy before you got into crytec.. what had they done with you? brainwashing now implemented in gf3, too?

    too bad.. you where a good guy.. bye..

    David Olsson

    August 19, 2001, 03:10 PM

    Why would anyone limit themselfs to stupid primitives like triangles...

    Let me know if you wanna know what really small cubes can do.


    August 19, 2001, 03:11 PM

    Yes, now I see the light ! I was just their slave !

    Thanks Mr. DOS Mode 13h SW guy, now I see how I can escape the world domination of nVidia !

    Caramck is just Darth Vader, I need to convince him that SW is much more powerful !

    C++ sux, C rulez !
    HW sux, SW rulez !
    Windows sux, DOS rulez !

    lol ;-)



    August 19, 2001, 03:13 PM

    No, my twin brother is called Joeri Capens, not David Olsson ;P


    August 19, 2001, 03:21 PM

    btw, tim, nice picture..


    August 19, 2001, 03:56 PM

    The lighting looks great..!

    Only 2 things that need to be changed for it to *ROCK* .. :

    a) please show some real leveldata now instead of a 135 poly level from a game of the previous millennium (a level for a game with an advanced engine that would be in development at the moment would have around 150-500k polys)

    b) think of a smart way to make soft shadows.
    pure black shadows are so damn ugly that if I had to choose I'd rather have no shadows in a game I'm playing than these cut-out black spots.

    If I hold up a pencil next to a lightsource, there won't suddenly be a black spot of 2 by 2 meter on a wall that's 6 meters away.

    BUT - kudos to you, although you don't draw much polys the polys you *do* draw look fantastic :)


    August 19, 2001, 04:50 PM

    Just a couple thoughts (well, three really):

    - The pics look gorgeous, really... the dataset is not very demanding, though.

    - Geforce3 is a fantastic piece of hardware but, as mentioned, it's basically brute-force. For example, you're probably doing the hierarchical view-frustum culling on software, 'cos the damn board does not work with a "scene graph" or something and you still need a CPU to do that. Even a KyroII is smarter on that issue ;-)

    I've coded anything from regular PCs, Suns and, on the fancier side, a SGI InfiniteReality2 and a 64-way SMP Origin 2000, and brute force is nothing without some cool ideas. You can yield x10 improvements on raytracing (if you've coded a 3DDDA's or a ray classification approach you'll know what i'm talking about) by using the right software approach, and certainly a GF3 without the RIGHT software layer is shite. Hybrid approaches are always the best.
    For some unknown reason, Tim's comments seem a little too enthusiastic about the power of the GPU alone.

    - Finally, (and maybe i'm the only one) I don't see *THAT* much difference between all the FPS stuff from the last few years. C'mon, ok, now the buzzword is dynamic lighting, when Quake2 used pre-computed radiosity data on lightmaps, which was not as COOL, but surely more REALISTIC: maybe i'm wrong, but a GF3 won't calculate your indirect illumination contribution, diffuse scattering, etc. (which by the way account for most of the lighting in a scene). It's sooo fun to hear people talk about realism and Global Illumination these days... ok, let's take a Cornell Box and do a pixel-by-pixel comparison with a GF3 and maybe we'll laugh a bit. GF3 is just another iteration on hardware. A giant leap, sure, but doesn't deserve this kind of "religious adoration" XDDD
    And, talking about the damn dynamic lights, how many moving or flickering lights do you guys have at home? ok, maybe y'all live in a spaceships and crap, 'cos really I don't get what do you need all the dynamic junk for.
    Then there's bumpmaps, ok, they're cool, but let's face it: aren't we overhyping some features just to be able to sell another iteration of the same old game?
    And i'm not saying you can't be creative with new hardware: take a look at what you can do with Renderman shaders (hair or procedural textures anyone?) and maybe *THEN* you will get some ideas on what to put your GF3's to work with, 'cos more of the same old thing just doesn't impress me anymore.


    zed zeek

    August 19, 2001, 05:03 PM

    >>I see how everyone is pissed of the oh so limitating GF3, this is why we have not a single SW render that reaches the image quality of a 3-5 years old gfx card,


    August 19, 2001, 05:13 PM

    I'm by no means T&L limited ;-) So, nop.

    The shadows are very subtle, since every pixel is illuminated by multiple lights.



    August 19, 2001, 05:15 PM

    Well, there's a difference between 60FPS or 60SPF ;-)))

    I you can't be betterthan JC, be at least faster than JC !


    August 19, 2001, 05:18 PM

    I don't get your point. GF3 and this realtime lighting model is as revolutionary as you can get. It is not perfect, but certainly the biggest innovation in the last 5 years. Um, I guess that's pretty cool.


    Mark Friedenbach

    August 19, 2001, 05:40 PM

    What im saying is that your framerate will be a bit higher

    Not if you're cpu limited.

    Mark Friedenbach

    August 19, 2001, 05:43 PM

    Perfect direct illumination? That's pretty presumptious. What about subsurface scattering? Or wave shifting?

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