Product Chat / [SOLVED] There has to be a way to disable the sun... please !!

Author
Message
Teabone
Forum Support
17
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 13th Dec 2018 18:43
I do recall us requesting the ability to turn off the sun many moons ago
also the ability to dynamically move it.
Twitter - Teabone3 | Youtube - Teabone3 | Twitch - Teabone3 | TGC Assets - Store Link | Patreon - Teabone3

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

The author of this post has marked a post as an answer.

Go to answer
Duchenkuke
GameGuru VBOTB Developer
7
Years of Service
User Offline
Joined: 7th Jun 2016
Location: Germany
Posted: 13th Dec 2018 19:58
@cybernescence

if you could actually help here, it would be amazing. Your knowledge about gameguru never ceases to amaze me.
cybernescence
GameGuru Master
11
Years of Service
User Offline
Joined: 28th Jan 2013
Playing: Cogwheel Chronicles
Posted: 14th Dec 2018 00:27
This post has been marked by the post author as the answer.
@Duch - there are a lot of light references in this shader all over the place, not sure I caught them all and only those relating to the sun - however before I spend any more time, if you'd like could you try the attached one to see if I'm going in the right direction with what you want.

Basically the Surface Sun Factor slider should reduce (turn-off when at zero) the dynamic sunlight on the scene, so only the ambient slider adds general background illumination and dynamic lights. So this should also adjust specular light and shadows from the sun too.

Please keep a back-up of your stock abpr_core.fx and when replaced with the attached you'll have to do the forceloadtestgameshaders=1 in setup.ini for the first use to recompile the shaders.

@Teabone - dynamically moving the sun is a non-trivial task, need to:

work out vectors from the rotation angles
sync the sky box sun position to sun angles
adjust the light direction for all of the shaders, for specular reflections
sync the light ray control angle to sun angle
move the directional shadow camera to move the shadows to sun angle
for day/night - blend sky boxes (DBP code for this is in the source and works when converted, with some shader changes too)
add some lua commands to control it all (the easy bit)

It will arrive at some point via me or someone else if they get there first

Cheers.

Attachments

Login to view attachments
Kitakazi
17
Years of Service
User Offline
Joined: 9th Feb 2007
Location:
Posted: 14th Dec 2018 01:12
Quote: "Right now if you lightmap a level that has one or more models using an _illumination map, one or more of the models will have its illumimation map tiled all over it, in fact usually only One of them won't - a bug that has always been there for PBR models."


Is there any sort of fix for this? This just started happening to me when trying to lightmap my levels.. It completely ruins the entities, unless you switch back to real-time lighting. I was hoping it was a bug that would be fixed with the last update. :/
Pirate Myke
Forum Support
13
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 14th Dec 2018 04:17 Edited at: 14th Dec 2018 06:32
Outstanding yet again. No more sun specular on an interior level for me. This is a light mapped level I am testing on.

I will make a video.


But I am tweaking it a bit.

Before the shader update. (notice the white specular reflection on the floor)


After the new shader update.



Definitely have better control over the blending of ambient, and surface.


Thank you.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit, Screen resolution 1680 x 1050.

Tomik18
GameGuru TGC Backer
14
Years of Service
User Offline
Joined: 8th May 2009
Location: Slovakia
Posted: 14th Dec 2018 08:44
This is fantastic !!! In my indoor level and looks perfect
My PC specs: AMD FX 4300 3,80 Ghz
R9 280 3GB
8 GB RAM
cybernescence
GameGuru Master
11
Years of Service
User Offline
Joined: 28th Jan 2013
Playing: Cogwheel Chronicles
Posted: 14th Dec 2018 08:57
That looks good thanks for trying it out .

Does the flashlight look ok with this tweak?

I think the surfacesunfactor lua command is stock? So can use that to gradually ramp up/down the sun as exit/enter interiors too.

Cheers.
Duchenkuke
GameGuru VBOTB Developer
7
Years of Service
User Offline
Joined: 7th Jun 2016
Location: Germany
Posted: 14th Dec 2018 10:58
oh my ! Amazing work cybernescence !!

I just saw the post and the images I will try it now
OldFlak
GameGuru TGC Backer
9
Years of Service
User Offline
Joined: 27th Jan 2015
Location: Tasmania Australia
Posted: 14th Dec 2018 11:01 Edited at: 14th Dec 2018 11:27
Quote: "Is there any sort of fix for this? This just started happening to me when trying to lightmap my levels.. It completely ruins the entities, unless you switch back to real-time lighting. I was hoping it was a bug that would be fixed with the last update. :/ "


Well it has been around for a while now - since PBR was introduced - and has been reported on github. So it may take some time before a fix comes.

My guess is that after the lightmap process the _Illumination map is mistaken for the _detail map (which is meant to be tiled over the model), but I am only guessing.

It just needs Lee to take a look at it, but he is likely busy with other stuff.

Best to either run in real-time only, or don't use _illumination maps for now....

Reliquia....
aka OldFlak
Intel(R) Core(TM) i3-4160 @ 3,60GHz. 8GB Ram. NVidia GeForce GTX 750. Acer 24" Monitors x 2 @ 1920 x 1080. Windows 10 Pro 64-bit.
PM
OldFlak
GameGuru TGC Backer
9
Years of Service
User Offline
Joined: 27th Jan 2015
Location: Tasmania Australia
Posted: 14th Dec 2018 11:03
@cybernescence - excellent stuff

Reliquia....
aka OldFlak
Intel(R) Core(TM) i3-4160 @ 3,60GHz. 8GB Ram. NVidia GeForce GTX 750. Acer 24" Monitors x 2 @ 1920 x 1080. Windows 10 Pro 64-bit.
PM
Duchenkuke
GameGuru VBOTB Developer
7
Years of Service
User Offline
Joined: 7th Jun 2016
Location: Germany
Posted: 14th Dec 2018 11:11
YES this is a confirmend FIX.

Amazing man, thank you so much cybernescence

BEVORE


AFTER
granada
Forum Support
21
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 14th Dec 2018 12:17
Now all we need is no terrain ,more chance of meeting the pope I think

Dave
Windows 10 Pro 64 bit
GeForce GTX 1050 Ti
AMD FX (tm)-9590 Eight-core Processor
31.96 GB RAM
1920x1080,60 Hz
PM
cybernescence
GameGuru Master
11
Years of Service
User Offline
Joined: 28th Jan 2013
Playing: Cogwheel Chronicles
Posted: 14th Dec 2018 12:23
The terrain thing is interesting. When it’s gone what reference point would GG use to place entities on? With physics items would just fall unless resting on another immobile entity. Just talking out loud and I definitely see what is being asked for but might be some things to wrestle with to achieve it.

Cheers.
Pirate Myke
Forum Support
13
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 14th Dec 2018 13:09
Flashlight works great with this shader now.
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit, Screen resolution 1680 x 1050.

GraPhiX
Forum Support
19
Years of Service
User Offline
Joined: 15th Feb 2005
Playing:
Posted: 14th Dec 2018 13:24
nice work cybernescence

yes the no terrain thing is a little more complicated because no terrain = no collision I think you would still need an invisible flat plane as a reference point for the collision system to work a massive single sided plane is probably the best to start with I think
Welcome to the real world!
Main PC - Windows 10 Pro x64 - Core i7-7700K @4.2GHz - 32GB DDR4 RAM - GeForce GTX 1060-6G 6GB - 1TB NVe SSD
Test PC - Windows 10 Pro x64 - G4400 @3.3GHz - 16GB DDR3 RAM - GeForce GTX 950 2GB - 500GB SSD
Laptop - Helios 300 Predator - i7 7700HQ - 32GB - Nvidia GTX1060 6GB - 525GB M2 - 500 SSD - 17.3" IPS LED Panel - Windows 10 Pro x64
Various Tutorials by me
Pirate Myke
Forum Support
13
Years of Service
User Offline
Joined: 31st May 2010
Location: El Dorado, California
Posted: 14th Dec 2018 13:40 Edited at: 14th Dec 2018 14:06
Or your own terrain objects that you can control the poly count with.

EDIT:
Here is the video I promised. I got the flash light in also.

Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz, 2400 Mhz, 4 Core(s), 4 Logical Processor(s), 8gb RAM, Nvidia gtx660, Windows 7 Pro 64bit, Screen resolution 1680 x 1050.

Corno_1
GameGuru Tool Maker
13
Years of Service
User Offline
Joined: 3rd Nov 2010
Location:
Posted: 14th Dec 2018 18:19 Edited at: 14th Dec 2018 23:07
I really want to know why this slider should work only with a lightmapped level. Preben?

It looked so much like a feature, cause it is not even hard to add....

Let´s see what the new year roadmap brings.

@cybernescence
Do you add it to the source? Or should I create a pull request? It fix this specific problem, so we could close some issues on github with it.
Ebe Editor Free - Build your own EBE structures with easy and without editing any text files
Thread and Download
PM
Duchenkuke
GameGuru VBOTB Developer
7
Years of Service
User Offline
Joined: 7th Jun 2016
Location: Germany
Posted: 14th Dec 2018 20:14
Quote: "Let´s see what the new year roadmap brings."


I bet it includes some DLC's
Duchenkuke
GameGuru VBOTB Developer
7
Years of Service
User Offline
Joined: 7th Jun 2016
Location: Germany
Posted: 15th Dec 2018 11:14
@cybernescence

I actually found a small isse with your shader-

When you have some ambient lighting going on in your level - and you activate the flashlight, the ambient lighting will set to zero.
I just noticed this in the editor.

Login to post a reply

Server time is: 2024-03-29 09:16:53
Your offset time is: 2024-03-29 09:16:53