View Full Version : Good Idea?
02-25-2003, 09:46 AM
I am currently in a situation here, and would like you alls ideas. I am currently designing a game engine, 1st person shooter, (with a horror feel). I have been reading all about the different methods of doing many many "effects" aka, bump mapping, per pixel lighting, shadow mapping, etc;. But they ALL seem to use card specific extensions. I would realy realy like not to have to do that. I would prefer to do the effects and have them run on all the cards, without having to rewrite the code for EVERY card there is. Any suggestions?
Oh, just so you know, i "started" writing this engine attempting to make games for Laptops again. (Seemingly that MOST laptops dont have the vid card with alot of power). I would like to continue that, but I would also like a fairly simple way to add in some of the above effects without all the card/vendor specific extensions. ?? .
02-25-2003, 10:26 AM
Jesus Christ Almighty.
Don't you ever read the archives first?
02-25-2003, 10:28 AM
I don't know any methods for doing per-pixel lighting and bump mapping without extensions and I would really like to know a way to do that too. But there is a way to do shadow volumes without extensions. Look at this paper for an in-depth explanation on the subject :
I have implemented the screen buffer method on my TNT2 with attenuated shadows and it's not bad at this point. I still have some problems with non closed and non two manifold meshes, but the problem comes from me and not the method described in the paper.
No extensions are needed and it works on my TNT2 even in 16 bits without requiring a stencil or destination alpha buffer. Attenuated shadows are not "physically" correct, but it's a visually acceptable approximation in my case, and it can be done with one less pass than ambient shadows (comparable to the standard stencil method).
If the requirement of a destination alpha buffer is not a problem for you, you can even use the alpha buffer method to render shadow volumes faster than with the stencil method. And there are other improvements described in the paper to enhance the system.
02-25-2003, 10:38 AM
My (just released) game engine project has two card specific codepaths, but also has a standard path which only requires OpenGL 1.3. It does per-pixel attenuation, shadow volumes and bump mapping using the 1.3 core, but only does diffuse - there are no specular highlights.
See: http://users.ox.ac.uk/~univ1234 or there is a link on the OpenGL.org front page.
I also have a tutorial on doing bump mapping without any card-specific extensions.
Hope this helps.
>>Jesus Christ Almighty.<<
some dispute wether he is almighty anyways isnt it jesus F christ
>>bump mapping, per pixel lighting, shadow mapping, etc<<
the first 2 (in a limited sense) can be done with dot3 (part of gl1.3 IIRC) shadowmapping is part of gl1.4.
note not all cards support dot3 in hardware eg tnt2 doesnt but gf1 does.
same with shadowmapping gf2 doesnt gf3 does
>>I would prefer to do the effects and have them run on all the cards, without having to rewrite the code for EVERY card there is. Any suggestions?<<
i think the saying is, u want to
have your cake + eat it too (hmm dont know how that saying came about)
02-25-2003, 07:49 PM
If you use "ID" shadow maps, any card that can do a subtract-and-absolute can support shadow maps. Note: these are harder to make work with self-shadowing; in the easy case, an ID shadow map only makes meshes shadow other meshes (further away).
02-25-2003, 11:53 PM
But there is a way to do shadow volumes without extensions.
Hum, you can say there's a way to do shadow volumes without a stencil buffer; or you can say that there's a way to do shadow maps without extensions.. but shadow volumes without extensions doesn't make a lot of sense to me :)
Btw, i agree with Zed. You can use some tricks, but generally speaking, you need to use extensions to make these cutting-edge effects. You can't have the butter and the money for the butter (i guess it's coming from the same cook than for your cake, Zed).
Originally posted by Ysaneya:
but shadow volumes without extensions doesn't make a lot of sense to me http://www.opengl.org/discussion_boards/ubb/smile.gif
What extensions do you use for shadow volumes?
02-26-2003, 05:06 AM
None. Typo, you should read: "with" extensions. I guess i'm a bit tired.
02-26-2003, 05:17 AM
Well, they could add an extension for doing SSV automatically but that's not likely to happen.
But there is an extension to help out SSV, two_sided_stencil
02-26-2003, 07:10 AM
> but shadow volumes with extensions doesn't make a lot of sense to me http://www.opengl.org/discussion_boards/ubb/smile.gif
The question of the topic starter was about using special effects without extensions, so I just precised that shadow volumes can be done without extensions, ie. without using :
And he mentionned that he wants his program to work on most graphics card, so I think shadow volumes that can be done without those extensions and without stencil/alpha buffer could be useful for him.
And did I say it is even faster than stencil shadow volumes when using an alpha buffer ? http://www.opengl.org/discussion_boards/ubb/smile.gif
Powered by vBulletin® Version 4.2.3 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.