Mtl_SpecBump: How to make the static shadows darker?

Posted By: miez

Mtl_SpecBump: How to make the static shadows darker? - 03/23/14 11:43

I have a small Shaderproblem with the standard mtl_specbump shader. Most of it works as I want it to, but the static shadows are too bright.



My Level has an Ambient of 16 and sun is at 9.
And my lightsource is 255 and with a range 1000.
When I compile the level with the light as static, the shadows are like expected,
but compiled with the dynamic flagged light the shadow appears to be
almost four times as bright as the levelambient value.
I played around in the shader, but could not figure it out myself. I read in the manual,
that there are parameters, thet can be changed for this shader, but how do I do it with levelgeometry.
What parameter or what part in the shadercode do I have to change?
Posted By: miez

Re: Mtl_SpecBump: How to make the static shadows darker? - 03/27/14 17:52

Has nobody even an idea what I can do about it?
Else I compile that thing with static lights and let the
player emit contantly dynamic light.
Not very elegant for me, but this way I can most parts of the level look as dark as I want it to.
Posted By: Superku

Re: Mtl_SpecBump: How to make the static shadows darker? - 03/27/14 18:15

This is simply a result of setting the light to dynamic because dynamic lights shine through all objects (contrary to static lights) and light all objects which are in range.
A fix for this (if I'm not mistaken) will only work when you don't move your dynamic lights because moving the lights somewhere closer to a darker area will have no visible effect then.
I'm not a big friend of changing the predefined shaders, I prefer to write it myself instead and not work with those macros and includes so I cannot really help here but the idea would be to multiply the whole final output (and thus including the dynamic/ specular light in your screenshot) with the TEXCOORD1 static shadow map.
Posted By: miez

Re: Mtl_SpecBump: How to make the static shadows darker? - 03/27/14 20:33

Thank you. So it looks like there isnīt any possibility without drawbacks.
I already had the suspicion that the dynamic light in itself could be the problem.
But now with that confirmation I can work around that for the moment.

But isnīt there any possible way with Acknex to have visible bumpmaps with
lightmaps with still useable dynamic lights?...

Would it be possible to use the static lights somehow, perhaps through the lightmaps, and still have it able to react to dynamic lights additionally?
How do other enginss have their levels bumpmapped with lightmaps AND working dynamic lights?
Posted By: rayp

Re: Mtl_SpecBump: How to make the static shadows darker? - 03/27/14 20:48

whats about using shade-c ? just wondering ( did not read all )...
Posted By: sivan

Re: Mtl_SpecBump: How to make the static shadows darker? - 03/27/14 21:31

it is possible and not too tricky. I will release soon a new MapBuilder editor update, which will contain a normalmapping shader supporting 8 dynamic lights with optional specular mapping. I can do one that supports level lightmap too (just a little bit different skin setting is needed and an additional texture sampling). but first I have to finalize a couple of things, requiring maybe one more week...

to be honest I really don't understand why the included shader package is so limited and unchanged for years... and the shader workshops... some of them are good, but difficult to extend/customize, so normally you have to make your own shaders based on several information sources, due to your actual needs. it is a quite DIY style engine, but forum members are helpful laugh
Posted By: miez

Re: Mtl_SpecBump: How to make the static shadows darker? - 03/27/14 22:46

I donīt like shade-c for now. I have enough to do with getting used to A8.
And I want to keep things as simple as possible.
I donīt need shade-cīs fancy effects for my first 3D Game, when I canīt create
the fancy content for it yet.
It is always a rediculous show, to see totally craptastic made beginners-games
that uses and are rendered in state of the art AAA effects and shaders.
Those pop up from Unity and UDK in most cases.


Sivan: Sounds very interesting. How would your approach work
in detail in my case? Would the lightmaps be still reacting to dynamic lights while having correct static shadows AND normalmapping shown without them?
Posted By: rayp

Re: Mtl_SpecBump: How to make the static shadows darker? - 03/27/14 23:03

Quote:

to be honest I really don't understand why the included shader package is so limited and unchanged for years... and the shader workshops... some of them are good, but difficult to extend/customize, so normally you have to make your own shaders based on several information sources
...and using good looking std. dynamic lights : nearly impossible ( going through walls etc ).

good luck
Posted By: DLively

Re: Mtl_SpecBump: How to make the static shadows darker? - 03/28/14 01:19

Check under Ambient.

Look up how materials work, and its so simple from there
Posted By: sivan

Re: Mtl_SpecBump: How to make the static shadows darker? - 03/28/14 07:34

@rayp: dynamic lights go through thin walls even in unreal engine 4 (just checked yesterday evening), this is why ue4 utilizes static lights extensively. there are still limitations in computer graphics... sounds like a Jcl answer grin
Posted By: miez

Re: Mtl_SpecBump: How to make the static shadows darker? - 03/28/14 10:02

But how do other Games\engines deal with it?
Lets take Doom 3 and a modernized Quake 1 Engine (Darkplaces and so on).
Both have with no doubt lightmaps, in Quake it was even the same way as
Gamestudio is still doing it. And Quake at least used levelblocks.
But both games are Normalmapped everywhere and all the time, even when no
dynamic lights are around. The lights canīt be all dynamic, because if they were,
then the static shadows would either not react to the dynamic light, because the shadowmaps must stay black despite of an nearby dynamic light, or the shadowmaps would become as lit as in my testlevel.
There is a third way, that comes in my mind. That there could be two different kinds of dynamic light. One Levelbound, for lighting up shaders and creating shadowmaps (but not affecting them), and one Entitybound, that can light up everything like always.
I hate talented people that are gifted to create great engines...... want too!
(but have not the time with children, thus why I want to keep things simple)
© 2024 lite-C Forums