Shader Whining...

Posted By: Red Ocktober

Shader Whining... - 01/20/05 00:21

ok, here it goes... let the whining begin...

so far, via the generousity of some of the talented coders here who have made their work available, i've been able to get shaders working in 3dgs... and some of my attempts at emulating the next DOOM3 looking scenery didn't look too bad...

that's the good part...

i've found though... that making a game with extensive use of shader effects in 3dgs is still not practical... at least not for me...

i'm talking bumpmapping / normal mapping shaders here...

just the simple act of mixing a water shader, a level shader on a few non complex blocks, and adding a shaded moving model to the scene, causes a noticable slowdown of the animated water, and jerkiness in the camera movement... to the point of being totally unusable for gameplay...

also... with the exception of interior scenes, making any environment that needs fog and lighting and shadows look like anything, is a task set forth by the gods...

shadows act up... shaders aren't affected by fog... more than a few lights slow the scene down to a crawl...

so far, 3dgs and shaders looks like it's limited to limited demos right now... at least from where i'm standing... err, sitting... as my ability to mod the shader code is minimal at best...

my only small bit of success has been with the older, static lit shaders that took the shadow/lightmapping that the engine does when compiling a level... the newer stuff appears to be a lil too taxing for the system...


hey... i warned ya... it was a whing session you were netering...

has anyone gotten anything on the order of a game utilizing shaders working, or past the point where it looks like it's gonna work out... (if so, a link to the site, screenies, demos, anything would be appreciated)

... i could use a lil motivation to get me out of this whining phase i'm going through.

to be honest... none of the other comparable game dev tools has shaders working that good yet either... all seem problematic at this stage...

what about future engine forecasts... anything on the horizon along these lines...


thx for listening

--Mike
Posted By: Blattsalat

Re: Shader Whining... - 01/20/05 00:47

---- deleted by me (sorry, i forgot about this. I will do us all a favor and just delete my posts as i mentioned some time ago.... just needed a quick reminder what this is all about) --------

cheers and have a good one
Posted By: Red Ocktober

Re: Shader Whining... - 01/20/05 00:57

this is relevant to the topic at hand... i would suggest it stays here so that the movers and shader shakers will give it the attention it might deserve to get a wider response and input...

Quote:

i would also suggest to move this topic to general or morbius since we should keep the shader part of the forum for shaders only




while titled "Shader Whining"... it is not off center to the shader discussion, and does bring up relevant points for exchange and for comment and consideration of those who are actually coding these, as well as those who are employing them...

for instance, some of the stuff you just posted...

Quote:

+bumpmapping works perfect



not quite true... there is a noticable and signifcant performance hit... and fog is not affecting any bumpmapped shadered object.

Quote:

problem is that most users test shaders in test levels and use the same ones in the end game.



well, if they aint working in the test level... you'll never get to the end game... i'm missing the point here...

you go on to state that all these shaders work fine... while in some cases that is true, combine one or two of em... watch the results.

and while the use of shadowing is needed for any semi realistic scene development... shadows are still faulty and implementing shadows with shaders again adds to the performance degradation... significantly...

hey... maybe i'm missing a few things here... can i see something that you've made, a small level maybe, that implements some of these shaders successfully...

... help point me in the right direction.



--Mike
Posted By: Blattsalat

Re: Shader Whining... - 01/20/05 01:16

---- deleted too -------
(sorry)
Posted By: Red Ocktober

Re: Shader Whining... - 01/20/05 01:30

Quote:

we should let the mods decide if it should be moved or not It aint our job



first off... noone said anything about it being our job to determine what posts stays where... it is quite obvious that the moderators will make those determinations... but, on the same hand, there is nothing to stop someone from posting their view as to why the post is relevant... and why it should stay where it is... in order to possibly assist the moderators arrive at their decision... which is what was done...

Quote:

So i dont see any reason for whining. it could be easier but its not impossible at all. And due to the fact shaders are quite new its a bit early about complaining to much.




noone is ripping anything apart... or trying to. unlike you, who's eyes seem closed to anything that even faintly appears to be critical of 3DGS, so it is no wonder why you 'cant see any reason'... all i am doing is trying to open a rational, fact based, discussion with the coders here who have actually coded the shaders... and the developers who are using them, either with problems or successfully...

such an exchange can only be beneficial...


... as opposed to what appears to be your flag waving statemements, that make it seem like someone is threatening the 3DGS homefront... under which no information is exchanged... and noone benefits...

why do you feel like you always have to defend Conitec...
Quote:

At least give conitec some time to start working on something before ripping it appart


when noone in fact is attacking Conitec at all...

this is simply a thread to garner information and input from developers experienced with shaders... and maybe to come up with some solutions, workarounds, and possibly goals for future implementations in the engine...

besides... Conitec is well able to defend their own interests and position here... far better than you can, i would think.

if you have nothing to contribute on those lines, i might suggest you ignore this thread, and not try and start another of your flag waving flame fests.

not trying to shut you up or anything... but i'd really be more interested in listening to what Matt, Rhuarc, Steempipe, Ventilator, Drew, Oliver, has to say on the current state of shaders and what the immediate future holds...

... after all, they've done some of the grunt work and been generous enough to share it with the rest of us as far as shader effects here are concerned... so i would assume (safely) that they have the most experience, and would be in a better position to offer some more insightful input...

... real input, not blind following the blind, a6 patriotic, flag waving input

i'm sure these people would be generous enough to explain whatever shortcomings and erroneous positions i may be operating from in a factual and level headed manner... which may wind up helping more than just me...

so... if you don't mind... can we ignore your distraction and return to the topic at hand... please...




--Mike
Posted By: ventilator

Re: Shader Whining... - 01/20/05 01:48

...haven't read the whole thread but if fog is missing then the author of the shader simply forgot to handle fog in the vertex shader. with hlsl this is just one line of code. -> http://www.conitecserver.com/ubbthreads/showflat.php?Cat=&Board=SHADER&Number=432085 (my second post in this thread)
Posted By: Red Ocktober

Re: Shader Whining... - 01/20/05 01:49

thx Vent... looking at it now...


can you comment a bit on how you are finding implementing shaders in your development?

--Mike
Posted By: Orange Brat

Re: Shader Whining... - 01/20/05 01:54

@Red: If you want to see how badly full blown shaders can crawl a system then check out the newest Thief game. Of course, there's always Doom 3 but Thief 3 has shaders everywhere, too and it's plain ridiculous at times. I think these types of games are just going to chug along by their very nature and you need a machine from those gods you mentioned to get anything enjoyable out of them. Makes me glad I'm focusing on lame point & click(gasp!) and storytelling(choke!).
Posted By: Matt_Aufderheide

Re: Shader Whining... - 01/20/05 02:07

All the shaders work fine, but you must use them judiciously. If fogging doesnt work it's because we didn't put it in the shader for some reason. Fog can be easily added.. in any HLSL pass just add this your vertex shader output struct:
float Fog: FOG;

and then in your vertex shader:
// Add fog
float3 PositionWorld = mul(inPos, matWorld);
float ofog = 1 - (distance(PositionWorld, vecViewPos) - vecFog.x) * (vecFog.z*1.5);
Out.Fog = ofog;

In some shaders I don't add fog because they are meant to be used indoors. For instance my Ultimate lighting Shaders were designed to be indoor only, hence no fogging and no sunlight. This can be easily be changed however.

In any case, There are indeed problems with tangent lighting shaders on World geometry. To make it work better, make sure you set all the blocks to "flat" and have "tesselate flat" set to "auto". Here there can be a problem though which I have informed JCL about, but i dont know if he has taken a look at it yet.. sometimes if vertices are welded you can get odd lighting problems. So what i do is either use models for everything, or use blocks where the egdes dont touch.

Of course using shaders will slow you down a bit depending on the complexity and what kind of card you have. There are some specifc optimizations that could be done with the shader system that haven't been done...however, i have good performance in my game- which isn't a "test" level, but huge outdoors areas. My terrain has the max number of faces allowed on a terrain (32,000 or something).
My terrain shader mixes 4 color textures, 2 detail textures, a main normal map,vertex lighting, and an environmental bump map. The framerate is hardly effected by all this. On top of that all my regular models like guns, monsters all have 2 pass, 8 light per-pixel lighting shaders. My water does cubic environment bump mapping. Even so i get good framerates, even with a render backbuffer Dll doing fullscreen Bloom effect.

In general using terrains and models is faster than world geometry. I tend to avoid world geometry whenever possible.
Posted By: Red Ocktober

Re: Shader Whining... - 01/20/05 02:25

OB - yeah... you're right... i was surprised though, to see DOOM3 working as well as it did on the GeForce5200 2.something GHz machine i have here...


Matt - thx for the tips... i'm modding the bumpmapping shader now with the fog insert...

it is encouraging to hear that you're getting good results on an outdoor scene... quick question...

... i'm using a matrix based water entity that is running lil sinusoidal loop code to undulate the water surface... do you think that another approach might be faster... better... overall when used with the water shader?

also... how are you dealing with shadows?

thx again

--Mike
Posted By: Matt_Aufderheide

Re: Shader Whining... - 01/20/05 02:32

Quote:

@Red: If you want to see how badly full blown shaders can crawl a system then check out the newest Thief game. Of course, there's always Doom 3 but Thief 3 has shaders everywhere, too and it's plain ridiculous at times.




What are you talking about here.. most games now have "shaders everywhere". If you dont have a good card then don't buy these games. I dont think games fail because they are forward looking and embrace new technologies. Thief 3 runs perfect for me and my computer is like 2 years old, except for my video card. Doom 3 runs great as well. So does far cry. Strangely halflife2 doesn't run any better and it has mostly cheap shaders that dont do what those other games do. If you want point-and-click games use *Jamagic*.
Posted By: Matt_Aufderheide

Re: Shader Whining... - 01/20/05 02:40

Quote:


... i'm using a matrix based water entity that is running lil sinusoidal loop code to undulate the water surface... do you think that another approach might be faster... better... overall when used with the water shader?
also... how are you dealing with shadows?





I dont know for sure what are doing, but i am using a modified version of steempipe's water shader, which is quite simple :
float cos_x=(cos(vecSkill41)*0.1);
float sin_y = (sin(vecSkill41)*0.1);
Out.Bump.xy = ((float2(IN.Bump.x+cos_x, IN.Bump.y+sin_y)* RippleScale)*0.2);

and vecskill 41 is incremenrted in the script like so:
Code:
while(1)
{

my.skill41=float(ShaderCount);
my.skill42=float(0);
my.skill43=float(0);
my.skill44=float(0);

ShaderCount += 0.001;

wait(1);
}



Then all you need to do is adjust your scaling based on how big your water plane entity is.

As far as shadows go.. I dont have any shadows right now. I plan on eventually trying to implement some kind of Projective shadowing using the Zeraphine Dll if it ever comes out. I would like to see this technique built into the engine though. Or i could also use stencil shadows but they are a pain.
Posted By: Red Ocktober

Re: Shader Whining... - 01/20/05 07:55

ok... i got the fog in place and working in the shader code. your info and code block gave me the insight to make the proper changes... this is better...

BIG TIME THANK YOU for taking the time to explain this...


as for the water... i looked at the shader code... what i am doing is actually modifying the position of the vertices with some code i pilfered from an old AUM issue in addition to the shader effects... this way i get an uneven surface of water against a hull of a ship ... see code on page 2 of this thread and i think a short video there too --> moving water and shader

still got a lot more to look at... but things look a lil more manageable...

see... sometimes whining is a good thing

--Mike
Posted By: Matt_Aufderheide

Re: Shader Whining... - 01/20/05 09:57

Oh i see.. yes i know what you mean.. actually moving the vertices.. i have found that's not really a good idea with large areas of water.. i think the environmental bump does a better job...but i you have to have real waves i guess its the only way, however i think maybe this could also be done in a vertex shader to speed it up.
Posted By: William

Re: Shader Whining... - 01/20/05 13:53

In an old thread Steempipe released a demo demonstrating a terrain mesh moving extremely realistically(with a shader)! Perhaps he'll release the code for that one day, i'd really like to try it out.
Your right about Half-Life 2 it didnt have any shaders that were intresting other than the water. Doom3 and Theif 3 were technical achievments in the terms of shaders but I stopped playing both of them after a few hours since the art direction and gameplay became boring. If only they mixed a little more than a grey/brown pallete of colors in with those shaders. My opinion btw - many people I know really enjoyed those 2 games art styles.
Posted By: Matt_Aufderheide

Re: Shader Whining... - 01/20/05 13:56

I loved the Thief 3 gameplay. I didnt like Halflife2 though. Doom 3 is kinda just shoot monstar, run, shoot monstar..
Posted By: William

Re: Shader Whining... - 01/20/05 14:13

Heh, your right - Doom3 is well.... Doom with great graphics. I loved the first 2 theif games, but the 3rd one fell short. The biggest reason I felt was the city in-between missions. I really didnt like having to go around the city to get to missions dodging the same old gaurds over and over again. Also, the whole city looked very similar and I found it hard to remember locations. I wish they would have made it more like Theif 1/2 where you didnt have to run over to the merchant shop everytime you wanted to buy something and it progressed directly from mission to mission with cutscenes. The shadows sure were nice though and 3rd person mode added alot to it.
Posted By: Matt_Aufderheide

Re: Shader Whining... - 01/20/05 15:30

Funny.. i liked exactly what you didn't.
Posted By: Firestorm

Re: Shader Whining... - 01/22/05 17:20

Quote:

If you want point-and-click games use *Jamagic*.




Are you playing dumb or are you really this obtuse?
Posted By: Matt_Aufderheide

Re: Shader Whining... - 01/22/05 17:57

Why is that obtuse.. whats why use an engine like A6 to make point and click games
Posted By: Firestorm

Re: Shader Whining... - 01/23/05 00:23

1. Do you understand what a point and click adventure game is?

2. If you do, have you seen Adventure in Pocia?

3. If you have, how can you doubt A6's ability to handle such a game?

4. Are you being thick on purpose?
Posted By: Locoweed

Re: Shader Whining... - 01/23/05 02:14

Thanks for the information on Fog with shaders Matt, that is essential information for us shader non-gurus.

Loco
© 2024 lite-C Forums