Product Chat / Sun Surface Factor and Normal Maps

Author
Message
Avenging Eagle
19
Years of Service
User Offline
Joined: 2nd Oct 2005
Location: UK
Posted: 29th Jul 2017 11:49
I've made some custom tunnel segments for one of my levels that feature the standard _D, _N, and _S maps. In lit areas they look cool but in unlit areas, the normal maps are still picking up strong specular highlights despite there being no light source to cause them. Here's a picture of the effect:



This is how it looks when Sun Surface Factor set to 100 (way higher than I usually use but I did it for emphasis). If I reduce Sun Surface Factor, the effect is greatly reduced...but I also lose the effect of my normal maps on lit areas. My theory is that the shader file is relying on the GG Sun to create these highlights but ignoring all lightmapping that exists within the level. This tunnel is completely enclosed, there should be no light in there whatsoever, no highlights. What I want is a more true-to-life solution in which the normal map 'effect' is only visible under lit conditions, be they static lights within a level, or the sun if the entity is not in shadow. But in scenarios when there is no light, there should be no specular highlights.

Has anyone else encountered this and solved it? Does anyone know how I can edit a shader file to achieve this effect? Or is it hardcoded into Game Guru?

AE
GraPhiX
Forum Support
19
Years of Service
User Offline
Joined: 15th Feb 2005
Playing:
Posted: 29th Jul 2017 12:25 Edited at: 29th Jul 2017 12:27
I would like to know too, been waiting for a while for a fix for this

https://forum.game-guru.com/thread/217930

I don't want to hijack this thread but I have had this problem for a while
Welcome to the real world!
Windows 10 Pro x64 - Core i7-2600K @3.40GHz - 32.0GB RAM - GeForce GTX 950 2GB - 4x500GB SSD Striped
LeeBamber
TGC Lead Developer
24
Years of Service
User Offline
Joined: 21st Jan 2000
Location: England
Posted: 29th Jul 2017 13:30
There is nothing 'out of the box' at present which can deliver the effect you want, but when I add the ability to move the 'sun position' to anywhere you want, then specular highlights, normal mapping effects, and even shadows will all respond to the new light position. In the meantime, you can, of course, create your own entity_basic.fx shader mod to strip out the sun influence and maybe move it just above the eyePos vector as though a light is hovering over the players head. If you know LUA coding, then shader scripting is not much different, just fewer commands and a slight syntax change. Definitely worth playing with shaders if custom visuals are what you want to aim for (not as scary as you might think).

PC SPECS: Windows 8.1 Pro 64-bit, Intel Core i7-5930K (PASSMARK:13645), NVIDIA Geforce GTX 980 GPU (PASSMARK:9762) , 32GB RAM

Avenging Eagle
19
Years of Service
User Offline
Joined: 2nd Oct 2005
Location: UK
Posted: 29th Jul 2017 18:08
Thanks for the response, Lee. Surely if an object is in shadow, it shouldn't have any normal mapping going on in those shaded areas?

I have only a rudimentary grasp of LUA scripting really, so I'm going to need some help locating the specific lines in the shader that control the sun's influence. Also, I just tried making a duplicate of entity_basic.fx and renaming it to the entity_basic_nosun.fx and the segment I assigned it to was then completely omitted from the next lightmap I did

AE
Preben
20
Years of Service
User Offline
Joined: 30th Jun 2004
Location:
Posted: 31st Jul 2017 09:41
Avenging Eagle: There is a difference in the shaders if you use lightmapping or not , does it happen if you do NOT lightmap the scene ? , or could you make a screenshot without lightmapping

best regards Preben Eriksen,
3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 31st Jul 2017 22:35
@ Avenging Eagle

Meantime you can simulate darkness zone via script.



3com
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

PM
Teabone
Forum Support
18
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 2nd Aug 2017 15:54 Edited at: 2nd Aug 2017 15:55
I've done something very similar to 3com. In my areas that have blocked off lighting that are in an outdoors map, I run a script to also darken the scene and adjust the modifiers that you would see in the TAB menu to the right.

Even games like Skyrim have this issue so they avoid having dark areas in a map that has the sun in it. They just load you into a different map for things like caves and interiors.

When you look "outside" of a cave in Skyrim you are actually just looking at an invisible door that looks like outside. That when entered loads the outdoor map with the sun in it. This can get annoying for some as it creates a situation where the player will encounter many load screens. So maybe just running a trigger zone script to darken the scene is best when you enter your tunnel.
Twitter - Teabone3 | Youtube - Teabone3 | Twitch - Teabone3 | TGC Assets - Store Link

i7 -2600 CPU @ 3.40GHz - Windows 7 - 8GB RAM - Nivida GeForce GTX 960
Avenging Eagle
19
Years of Service
User Offline
Joined: 2nd Oct 2005
Location: UK
Posted: 2nd Aug 2017 22:10
Quote: "does it happen if you do NOT lightmap the scene ?"


You're right, this doesn't happen when I DON'T lightmap the scene...but the problem is I lose all my lightmapping from my static lights.

The level is entirely interior, I don't need a 'trick' to create darkness, I have simply set ambience to almost zero and punched up the Surface Level slider so I can work entirely with static lights. The actual lighting looks good, it's just this annoying normal map issue in the areas of supposedly pitch darkness. I guess maybe the solution is to not have anywhere totally dark but it's a mine for goodness sake! Gotta have a bit of darkness to help the atmosphere!

AE
Belidos
3D Media Maker
9
Years of Service
User Offline
Joined: 23rd Nov 2015
Playing: The Game
Posted: 2nd Aug 2017 22:35
Have you tried going into setting.fx and uncommenting the following line:

//#define DISABLELIGHTMAPNORMALS // PE: disable lightmap directional normalmap calculation.

Primary Desktop:
i7 7700,k NV1070 8GB, 16GB 3200mhz memory, 1x 2TB Hybrid, Win10.

Secondary Desktop:
i5 4760k, NV960 2GB, 16GB 2333mhz memory, 1x 2TB Hybrid, Win10.

Laptop:
i3, Intel 4000 series graphics, 6GB memory, 1x 500gb HDD, Win8.1.
Teabone
Forum Support
18
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 5th Aug 2017 18:37
Quote: "when I add the ability to move the 'sun position' to anywhere you want, then specular highlights, normal mapping effects, and even shadows will all respond to the new light position.
"


Twitter - Teabone3 | Youtube - Teabone3 | Twitch - Teabone3 | TGC Assets - Store Link

i7 -2600 CPU @ 3.40GHz - Windows 7 - 8GB RAM - Nivida GeForce GTX 960

Login to post a reply

Server time is: 2024-11-24 11:45:48
Your offset time is: 2024-11-24 11:45:48