Product Chat / Sunlight, starbright

Author
Message
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 15th Mar 2020 19:53
Wellhowdy
Is the sun approx 45deg angle to NSEW?
Looks to be something like that.
Is this the same for all skyboxes?

What's stopping it from changing during the course of play?
Could you make a fake sun or work-around?
PM
Wolf
Forum Support
17
Years of Service
User Offline
Joined: 8th Nov 2007
Location: Luxemburg
Posted: 15th Mar 2020 21:05
A User I know that looked into that more in depth is T-Bone. If you don't get a decent reply on here, I'd hit him up about it
OldFlak
GameGuru TGC Backer
9
Years of Service
User Offline
Joined: 27th Jan 2015
Location: Tasmania Australia
Posted: 15th Mar 2020 21:32
yeah,
one issue is the gg uses skyboxes which in turn usually have a visible sun in them which is just textures on a giant cube
the other issue is the sun is still hard-coded in the engine afik

Also be worth getting some input for BAG - he did have weather system going, not sure if it had day night tho...

OldFlak.....
aka Reliquia
i7-4790 @ 3.2GHz. 8GB Ram. NVidia GeForce GTX 1060 6GB. M1: Acer 31.5" @1920x1080 M2: Samsung 31.5" @ 1920 x 1080. M3: Acer 24" @ 1920 x 1080. OS: Windows 10 Pro 64-bit Insider.
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 15th Mar 2020 21:44
The sun angle is set in the skybox settings but I can't recall the details.

I did try at one time to add a Lua command to overwrite the values during game play but it had no effect to the actual lighting, it seems the engine reads it once from the settings and it is static from there on.
Been there, done that, got all the T-Shirts!
PM
smallg
Community Leader
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location:
Posted: 15th Mar 2020 23:33
pretty sure the shadows don't move so moving the sun would really break immersion for most games... perhaps if GG ever gets dynamic shadows a fake sun will be a better option (or the sun will be able to move by that point too)
lua guide for GG
https://steamcommunity.com/sharedfiles/filedetails/?id=398177770
windows 10
i5 @4ghz, 8gb ram, AMD R9 200 series , directx 11
synchromesh
Forum Support
10
Years of Service
User Offline
Joined: 24th Jan 2014
Location:
Posted: 16th Mar 2020 01:17
Quote: "The sun angle is set in the skybox settings but I can't recall the details."

They don't work last time I played with them .. SunRotation, SunDirection
The only person ever to get all his work done by "Friday" was Robinson Crusoe..
PM
Avenging Eagle
19
Years of Service
User Offline
Joined: 2nd Oct 2005
Location: UK
Posted: 16th Mar 2020 08:46
Each skybox has an associated 'skyspec.txt' file where you can theoretically make changes to the sun colour and direction. In practise, the only parameters that works is SunRotation but - in true Game Guru fashion - it does not rotate the sky but the skybox itself. You can tweak SunRotation to get your skybox to line up with Game Guru's sun, which is static. Useful for roughly aligning custom skyboxes, but you can't adjust the angle of the sun.

AE
OldFlak
GameGuru TGC Backer
9
Years of Service
User Offline
Joined: 27th Jan 2015
Location: Tasmania Australia
Posted: 16th Mar 2020 09:57
Yep as AE says, you can only change the rotation of the box - left or right
GG's sun height is fixed - there are settings in the skyspec file to change it but they do not work - never have.
Hence the shadows will always fall the same direction and length.

So while you can put the sun at any height in the skybox image itself and line it up with GG's sun by rotating the skybox it will not be realistic as far as the length of shadows falling on the terrain.

So even if you had three skyboxes to simulate dawn, noon, and dusk and changed the skies in game, the shadows will still be the same length all day long.

One of those long asked for features...

But to me having realist day\night skies would not work that well with skyboxes anyway, since they are rendered with the sun at a set location.

Hopefully MAX will be better in this regard - some time in the future....

OldFlak....
aka Reliquia
i7-4790 @ 3.2GHz. 8GB Ram. NVidia GeForce GTX 1060 6GB. M1: Acer 31.5" @1920x1080 M2: Samsung 31.5" @ 1920 x 1080. M3: Acer 24" @ 1920 x 1080. OS: Windows 10 Pro 64-bit Insider.
PM
AmenMoses
GameGuru Master
8
Years of Service
User Offline
Joined: 20th Feb 2016
Location: Portsmouth, England
Posted: 16th Mar 2020 11:14 Edited at: 16th Mar 2020 11:15
That's strange because I'm pretty sure in my LEM demo I managed to move the sun so that the shadows matched the visible location of the large 'Earth' in the sky, mind you that was Pre-DX11.

The values were weird though, took me a while to figure them out and as I say I can't remember the details.
Been there, done that, got all the T-Shirts!
PM
GubbyBlips
5
Years of Service
User Offline
Joined: 14th Jan 2019
Location:
Posted: 16th Mar 2020 17:08
"pretty sure the shadows don't move so moving the sun would really break immersion for most games..."

>>Fer sure on that.

"having realist day\night skies would not work that well with skyboxes anyway, since they are rendered with the sun at a set location."

>>Well, if we moved/rotated the skybox in tandem with the real sun+shadows ---
that is whenever (if ever) GG wants to join the modern science world(!)
But Flat Earth Theory might be the key!
PM
cybernescence
GameGuru Master
11
Years of Service
User Offline
Joined: 28th Jan 2013
Playing: Cogwheel Chronicles
Posted: 16th Mar 2020 17:28
The sun light, sun shadow, sun light ray positions are all fixed. The sky box can’t currently be rotated dynamically. Takes engine changes to allow them to all move in concert and change angle across day night cycle - it can be done. Sky spheres need to be used to match the changing height and rotation of the sun (rather than sky boxes - which are ok for Y rotation only) and also a gradual alpha blend from day to night sky views, so for e.g. moon and stars replace sun and blue sky. Actually looks ok in use.

Always said would try and get these changes into a branch for everyone’s use once got game done - guess this would be to a branch of classic now.

Cheers.

GPU: GeForce RTX 2070 SUPER PassMark: 14817
Teabone
Forum Support
18
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 19th Mar 2020 15:22 Edited at: 19th Mar 2020 15:32
Modifying Sun Direction will change where the sun position is that effects the reflective global speculation you'll see on terrain. It also will adjust the strength of the shadows as well. But not their direction unfortunately.

SunDirection = 2,10,74

Sun Strength I don't think has any effect. I've not touched it much to notice any difference.

SunStrength = 100

Sun Color does work and allows you to change the overall color of the sun. Seems to effect the terrain the most though.

SunColor = 0,250,0

Sun Rotation I've not played around with much to see any effect. I guess if it did or does work it wont have much effect due to the shadows not changing direction. Or maybe the sun is a spot light and if you change the direction and then the rotation you could change which angle the sun is projecting its light. However if this is the case it would only effect that global reflection you see of terrain.

SunRotation = 0

I should not Ive not really tested it much with PBR. So I'd assume objects are also effected by sun color and direction.

Would be nice if we had a TAB menu for Sun Color at the least since that one does indeed work. Sun direction dosnt make sense to change if the shadows dont change with it. But i would love this option in GG Max. If they can get dynamic shadows working, i wouldnt mind some advanced option in our setup.ini to turn off the sun completely and we use our own spot light to control the sun or flash light or torch. Of course would be amazing if the sun just worked as expected and was dynamically controlled by LUA and by in engine UI. Pretty much what smallg is mentioning.
Store Assets - Store Link

i7 -2600 CPU @ 3.40GHz - Windows 7 - 8GB RAM - Nivida GeForce GTX 960
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 19th Mar 2020 17:59
Yeah. Can only set Sun position via skybox settings. A one off thing. Can't move it. I think it is an issue with the shader myself. Think it needs a set light source rather than a definable one. Only reason I can think it hasn't been added by now. You can make a day night cycle, but shadows will never change.

@Cybernesence. You are way more informed about shaders than me you would know a bit more. Oh and Synchromesh is hoping to get water planes working again in DX11. Would be great, but beyond my knowledge. You may have a bit more chance with that From what I could see not too much to change for DX11, but a couple of parts were too different for me to cobble something
SPECS: Ryzen 1700 CPU. Nvidia 970GTX. 16 Gig Memory. Win 10.
cybernescence
GameGuru Master
11
Years of Service
User Offline
Joined: 28th Jan 2013
Playing: Cogwheel Chronicles
Posted: 19th Mar 2020 18:14
It’s definitely engine changes to be able to move the sunlight, shadow direction, lightray position and to dynamically revolve sky box in a complementary way. Shaders are reacting to the values posted to them via the engine.

Yes I’ve recently converted an old DX9 water shader for synchro. ... might need further tweaking.

Cheers.

GPU: GeForce RTX 2070 SUPER PassMark: 14817
3com
10
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 19th Mar 2020 18:21
Rotating sphere and all rotating with it, is the key.
Must be cool GGmax doing something about, night & day cycle is a mandatory in games, well in most of them.
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
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 19th Mar 2020 18:22
@ cybernescence. Cool. I recommended you to him I remembered your stella work on (gods I'm getting too old) bump mapping. Not correct but my brain refuses to remember the modern term. I thought you would be able to suss it
SPECS: Ryzen 1700 CPU. Nvidia 970GTX. 16 Gig Memory. Win 10.
rolfy
18
Years of Service
User Offline
Joined: 23rd Jun 2006
Location:
Posted: 19th Mar 2020 19:28 Edited at: 19th Mar 2020 20:10
You have never been able to change the sun position/rotation at all since the very beginning, there was a video teaser but it didn't make it in the end. This has been brought up a few times over the years and I did spend a lot of time creating workarounds for it. The only thing preventing me completing this was sun position never being addressed, though I believed it would be. But I guess I did a lot of stuff back then thinking it was going to be workable at some time.Ya never stop learning...right? So lesson learned.

This was the official word on it four years ago.
https://forum.game-guru.com/thread/214029#msg2535549

Video of attempt to create a day/night cycle a few years ago it lacked any dynamics.


A day/night cycle isn't an absolute necessity but changing the sun postion/rotation is pretty much required in any level design, goes without saying really. It makes a huge difference to atmosphere and without it there is no point to a shiny DX11 graphic pipeline with something so basic and fundamental missing. Not so much missing as set in a fixed concrete position, immovable, rigid and set in stone, pretty much fossilized by now.
OldFlak
GameGuru TGC Backer
9
Years of Service
User Offline
Joined: 27th Jan 2015
Location: Tasmania Australia
Posted: 20th Mar 2020 01:01
well to be fair it was only 4 years ago ... aahhmm cough

Tis the GG legacy - it's a gunna get this and that and....... if only they just set about tweaking the engine the way Cyber has it would be pretty awesome by now.

Too many pies, and not enough cooks - and another coming.....

OldFlak....
aka Reliquia
i7-4790 @ 3.2GHz. 8GB Ram. NVidia GeForce GTX 1060 6GB. M1: Acer 31.5" @1920x1080 M2: Samsung 31.5" @ 1920 x 1080. M3: Acer 24" @ 1920 x 1080. OS: Windows 10 Pro 64-bit Insider.
PM
Teabone
Forum Support
18
Years of Service
User Offline
Joined: 8th Jun 2006
Location: Earth
Posted: 20th Mar 2020 05:21
Would be fantastic if this was something we could have controlled within the engine dynamically:




Even better if also during game play via lua.
Store Assets - Store Link

i7 -2600 CPU @ 3.40GHz - Windows 7 - 8GB RAM - Nivida GeForce GTX 960
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 20th Mar 2020 21:44
I'd forgot those videos. Just shows it can be done and has been to boot.
SPECS: Ryzen 1700 CPU. Nvidia 970GTX. 16 Gig Memory. Win 10.

Login to post a reply

Server time is: 2024-11-23 19:15:03
Your offset time is: 2024-11-23 19:15:03