Bug Reports / Realtime Lighting Shader BUG

Author
Message
Stab in the Dark software
GameGuru TGC Backer
21
Years of Service
User Offline
Joined: 12th Dec 2002
Location: Upstate New York USA
Posted: 25th Dec 2016 02:07
There is a major bug with the real time lighting shader.
It seems to be using incorrect UV data for the object.

Compare the 2 images attached.


The coffee is lovely dark and deep,and I have code to write before I sleep.

Attachments

Login to view attachments
Stab in the Dark software
GameGuru TGC Backer
21
Years of Service
User Offline
Joined: 12th Dec 2002
Location: Upstate New York USA
Posted: 25th Dec 2016 15:14
This screen shot shows the problem better.
The coffee is lovely dark and deep,and I have code to write before I sleep.

Attachments

Login to view attachments
Preben
19
Years of Service
User Offline
Joined: 30th Jun 2004
Location:
Posted: 6th Jan 2017 13:08
Hi Stab,

Tried to reproduce it , but with no luck.

Could you try to make a quick level that display it like in your screenshot

Or perhaps you made some changes to your setup.ini or anything like that, that could cause it ?

best regards Preben Eriksen,

Attachments

Login to view attachments
Stab in the Dark software
GameGuru TGC Backer
21
Years of Service
User Offline
Joined: 12th Dec 2002
Location: Upstate New York USA
Posted: 7th Jan 2017 00:22
I have attached a .fpm file that shows the problem of the BIAS.
The coffee is lovely dark and deep,and I have code to write before I sleep.

Attachments

Login to view attachments
Preben
19
Years of Service
User Offline
Joined: 30th Jun 2004
Location:
Posted: 7th Jan 2017 10:56 Edited at: 7th Jan 2017 10:57
Hi stab,

Thanks a lot , it has been fixed:

This is the fix:


The 3 values can now be adjusted depending on, if the shadow is in light side of the object or shadow side, i tested on different levels but did not see any artifacts , if you find any: these 3 values can be used to make it perfect

In a second i will PM you the link to the latest shader pack, so you can test if everything is fine.
best regards Preben Eriksen,

Attachments

Login to view attachments
Stab in the Dark software
GameGuru TGC Backer
21
Years of Service
User Offline
Joined: 12th Dec 2002
Location: Upstate New York USA
Posted: 7th Jan 2017 13:00
Thanks , I understand now that it depends on the light direction. My shader knowledge is limited but
I am learning. Hopefully Lee can add this for all the GG users. Thanks for the updated shader pack I will
test and keep you updated on any issues.
The coffee is lovely dark and deep,and I have code to write before I sleep.
Earthling45
7
Years of Service
User Offline
Joined: 3rd Sep 2016
Location: Zuid Holland Nederland
Posted: 7th Jan 2017 13:49
Will these fixes be implemented in GameGuru?

I'm kinda reluctant to mess with the .fx due to my inexperience.
Preben
19
Years of Service
User Offline
Joined: 30th Jun 2004
Location:
Posted: 8th Jan 2017 16:06 Edited at: 8th Jan 2017 18:14
Earthling45: Sure at some point

Stab: been looking more at shadows and found what i think is the second bug you reported .

On static objects ( baked ) the dynamic shadow dont match the color of the baked shadows , see screenshot:

Fix coming soon need more work:


Also done other minor shadow tweaks , coming in next release
best regards Preben Eriksen,

Attachments

Login to view attachments
Preben
19
Years of Service
User Offline
Joined: 30th Jun 2004
Location:
Posted: 8th Jan 2017 16:40
Added bias to terrain if using mixed baked and dynamic shadows.

We are getting there:
best regards Preben Eriksen,

Attachments

Login to view attachments
Stab in the Dark software
GameGuru TGC Backer
21
Years of Service
User Offline
Joined: 12th Dec 2002
Location: Upstate New York USA
Posted: 8th Jan 2017 18:15
Thanks Preben for your efforts this will be a big overall improvement to GG.
Which shader does the code you posted above go in?
The BIAS definitely makes a difference on the terrain in the screen shots.
If you need any help with adding AGK 3d physics to your GGLoader just let me know.
I can help you to setup a character controller and ragdoll to match GG.

The coffee is lovely dark and deep,and I have code to write before I sleep.
Preben
19
Years of Service
User Offline
Joined: 30th Jun 2004
Location:
Posted: 9th Jan 2017 10:18
Hi stab:
This was a larger change then i had dreamed of , its now a HUGE light/shadow update that combine many of the shaders so its kind of hard to post a text based fix , but if you like to help test this ( needed ) let me know and i will sent you the latest version

This is a complicated scene , if you look at the screenshot it has baked light and shadows , and it have a dynamic shadow ( barrel ). This use the default lightmap settings so the baked shadows quality could be better , but STILL your "nearly" not able to see if its a baked or dynamic shadow they mix together perfectly. The second screenshot display the terrain with a baked shadow and a dynamic mixed together, can you spot what is baked and what is dynamic



Quote: "AGK 3d physics "

Thanks stab i let you know , im currently at a crossroad not sure what direction i take , i already have some editor functions in GG Loader so im not sure if a wait for GG AI update ( and use the same system ) or start to do my own AI, so your able to edit it directly in GG Loader. Sooooo ? not sure yet

best regards Preben Eriksen,

Attachments

Login to view attachments
Preben
19
Years of Service
User Offline
Joined: 30th Jun 2004
Location:
Posted: 9th Jan 2017 15:58
Found a "small" artifact when geometry bend inward , this sbias is more precise:

float sbias = 0.00035 * tan( acos( clamp( dot(IN.WorldNormal,Ln) ,0.0,1.0) ));
sbias = clamp(sbias, 0.00035f ,0.000115f);

Use these values instead, in the fix above.
best regards Preben Eriksen,
Stab in the Dark software
GameGuru TGC Backer
21
Years of Service
User Offline
Joined: 12th Dec 2002
Location: Upstate New York USA
Posted: 9th Jan 2017 16:24
Great work the shadows are looking perfect.
I am happy to test these for you if you like.
The coffee is lovely dark and deep,and I have code to write before I sleep.
Stab in the Dark software
GameGuru TGC Backer
21
Years of Service
User Offline
Joined: 12th Dec 2002
Location: Upstate New York USA
Posted: 11th Jan 2017 15:39
Preben
Here is my initial results from testing your latest shader (107st) changes.
So far I do not see weird side affects from the changes. The repetitive texture fix looks great.
I have attached 2 screen shots. The first one shows that the shadows on a lightmapped and
non lightmapped object still show a difference.
The second screen shot shows how realtime shadows have a very jagged look which has nothing to do
with any of your changes. Is there a way to increase the texture resolution for realtime shadows and
blur the edges to eliminate the jagged shadows?
I will keep testing with other maps to look for anomalies.
The coffee is lovely dark and deep,and I have code to write before I sleep.

Attachments

Login to view attachments
Preben
19
Years of Service
User Offline
Joined: 30th Jun 2004
Location:
Posted: 12th Jan 2017 15:02

Sure dynamic shadow in entity_basic should also match ( forgot that ) , i made it so your able to make the shadows darker using the sliders so the can match the lightmapped shadows in both static and dynamic.

When you get the next release you should change:
#define ADJUSTSHADOW (0.00030f)
to:
#define ADJUSTSHADOW (0.00015f)
In settings.fx to meet your needs.

You cant change the texture resolution on dynamic shadows , but i can try to make a better blur , BUT this will cost FPS so it would be a option that you must enable , will not be enabled as default
best regards Preben Eriksen,
Stab in the Dark software
GameGuru TGC Backer
21
Years of Service
User Offline
Joined: 12th Dec 2002
Location: Upstate New York USA
Posted: 12th Jan 2017 17:04 Edited at: 12th Jan 2017 17:20
Is 107st still the latest version?
Also which sliders are you referring too?
The coffee is lovely dark and deep,and I have code to write before I sleep.
Preben
19
Years of Service
User Offline
Joined: 30th Jun 2004
Location:
Posted: 13th Jan 2017 00:29
Quote: "Is 107st still the latest version?"

No its an old version ( well around 18 work hours old ) many fixes since then, but login tomorrow and check why i did not sent you a PM with the newest version yet

Also which sliders are you referring too?

Ohh it was just the normal GG shadow slider that now allow you to get the same darkness as the baked shadows , now works on static and normal objects , and objects where lightmapped shadows and dynamic are mixed. So all dynamic shadows follow the same darkness set by the "shadow" slider , Think we nailed it , but perhaps a few tweeks are still needed, lets see.
best regards Preben Eriksen,

Login to post a reply

Server time is: 2024-04-19 07:49:52
Your offset time is: 2024-04-19 07:49:52