Yeah, Sorry
#14990 posted by ericw on 2015/06/23 06:12:51
I made a fork of tyrutils with various new features, _sunlight2 is only in that. I haven't made a proper release, so it's just buried in various forum threads and hard to find :-(
The latest snapshot is from may 1:
https://www.dropbox.com/sh/1q5giu2leyvvhk0/AAA0UCacYD-tgVpElMSpf5Awa?dl=0
@ericw
#14991 posted by adib on 2015/06/23 06:53:25
Does this version have _sunlight2? Because it's doing nothing for my map. Do you happen to have some example map showing its effect? My map has a central yard where sunlight hits. I was counting on _sunlight2 to cast some sunlight on the "outside" walls as well.
Or Better Yet
#14992 posted by adib on 2015/06/23 07:29:27
Take this test .MAP:
https://drive.google.com/open?id=0B3Ww0W8WFfq7bFB6NGFhT2t1R0E&authuser=0
It has:
"_sunlight" "300"
"_sun_mangle" "180 -90 0"
"_sunlight_color" "255 64 64"
"_sunlight2" "200"
"_sunlight2_color" "64 64 255"
I was expecting to see a red square in the middle and all the other walls in a blue tint, but only the red square appears. What am I doing wrong?
Sky
#14993 posted by ericw on 2015/06/23 07:36:49
Yep, that build should do _sunlight2.
Only "sky" textures emit sunlight, just texture the outer box with "sky1" or any sky texture and I think that will fix it
Hmm Actually
#14994 posted by ericw on 2015/06/23 07:46:58
ignore that, didn't notice that you already had a sky textured skylight.
I think what's happening is, the _sunlight2 is working, it's just really dim because there it's a fairly narrow opening to the sky. A _sunlight2 value of 200 will light up a surface to a value of 200 only if it has an unobstructed 180-degree view of the sky. Try setting it to 1000 and you'll get some blue light on the walls. (this will make outdoor areas with more of a view of the sky too bright, though)
@ericw
#14995 posted by adib on 2015/06/23 15:52:39
Really? I thought _sunlight2 worked more like an "ambient" minimum light to the "outside" faces, ones facing a sky textured face in any angle (maybe inside the same portalled volume?). I mean, there is ambient light for all surfaces and _sunlight2 for "outside" surfs. Did I get it wrong?
If the surface must have an unobstructed 180 degree view of the sky, the floor in this test level shouldn't be affected by _sunlight2?
#14996 posted by adib on 2015/06/23 20:00:12
Been seeing this kind of explanation:
"�_sunlight2′ and �_sunlight_color2′ to make a sort of outdoor minlight. The light utility creates an array of minlight casting suns in a circle and sort of floods outdoor areas."
I don't get what this "array of suns in a circle" look like. Not sure about the effect I should get as well.
Yeah
#14997 posted by ericw on 2015/06/23 20:46:05
bjptools has a _sunlight2 that works like you describe.
maybe I should have named my version something other than _sunlight2 because the effect is quite different. I wanted to not just do a simple minlight based on sky visibility.
Here's a screenshot: https://runeofearthmagic.wordpress.com/2015/02/22/yoghurt-sunlight/
The soft shadows on the main, pink, sunlight is a different feature (_sunlight_penumbra). You can see the difference in _sunlight2 in the shadow of the taller tower: in the top (bjptools) screenshot, the shadowed area is just an even shade of gray. In the bottom screenshot (my modified _sunlight2) the gray areas have more shading depending on how much a given spot can see the sky.
@ericw: It Works!
#14998 posted by adib on 2015/06/24 04:03:58
You were right. I set _sunlight2 to 2k to start noticing some change. A value of 20k turned affected surfaces into washed white.
Also, I need ambient occlusion, so I'll keep using your code :P
Thanks!!
@ericw - WIP
#14999 posted by adib on 2015/06/24 06:54:56
Here's my first attempt using your light tool. This is supposed to be moon lit, night time.
First, the fullbright image:
https://drive.google.com/open?id=0B3Ww0W8WFfq7cGUtN2pvdUZsWnc&authuser=0
Now, ericw's magic:
https://drive.google.com/open?id=0B3Ww0W8WFfq7Y05fZU5VcHZGNjg&authuser=0
Not sure if it's gonna be night. I'm gonna light the rooms and then try daylight / night.
I used here:
worldspawn
_dirt 1
_sunlight 350
_sunlight_color 64 184 255
_sunlight2 5000
_sunlight2_color 64 184 255
_sunlight_penumbra 4
_sun_mangle 180 -90
Lighted with -extra4 -anglescale 0
The level is very vertical. There's a floor below, with ugly shadows. I had to help with two point lights scaled 0.1, value 50, no falloff, same color as the sun.
Still working...
Magic Is Right...
#15000 posted by generic on 2015/06/24 14:38:29
That's a good looking scene! What texture set are you using?
My Own Textures
#15001 posted by adib on 2015/06/24 17:55:59
These are all my own :) I intend to release them along with the level. It's intended to be 1x1 deathmatch, but I see Qonquer potential on it. We'll see.
Your Textures...
Reminds me of piranesi counter strike map, the original, not any source release.
Looks Great!
#15003 posted by ericw on 2015/06/24 19:33:20
I guess _sunlight2 5000 may cause problems with overly bright lighting if you have any rooms with a bigger area of sky visible.
Maybe I will look at some kind of exponential exposure thing for _sunlight2 so that rooms with a narrow strip of sky like yours can light up a decent amount, without washing out fully outdoor areas, like gb's city I posted earlier.
That Would Make It Even Better
#15004 posted by adib on 2015/06/25 02:38:25
... but is not my only problem. Take a look:
https://drive.google.com/open?id=0B3Ww0W8WFfq7UHAxamdRcUF2YUU
This is what happens when I set ambient light to 50: there is the brown texture color where black shadow should be (look where the crosshair is). There is "ambient light" where _sunlight2 doesn't reach (casting shadow).
For now, I just gave up on ambient light. But how to solve it properly? Or is it nonsense?
I know there is _minlight for brush entities. But should I turn a massive amount of brushes into some entity? What are the cons?
#15005 posted by metlslime on 2015/06/25 02:45:58
the brown is probably grey, it just looks brown compared to the blue lighting around it.
Can you specify R G B for the ambient instead of just one number?
Hm
#15006 posted by ericw on 2015/06/25 03:00:58
I thought there'd be a worldspawn key for minlight color, but looks like it's only available on brush entities (_mincolor). Will add that to the todo list.
Minlight Wouldn't Help
#15007 posted by adib on 2015/06/25 05:32:17
There is "external" ambiance, lit by moon, but there will be also rooms lit by orange lamps. I couldn't pick just one _mincolor.
@metlslime I think it's not gray, it's just the texture pixels lit by worldspawn "ambient light"
Anyways, I turned that whole wall into a func_wall and set _minlight to 50 and _mincolor to the same blue moonlight:
https://drive.google.com/open?id=0B3Ww0W8WFfq7WG5tVzhfMkl0anM
Looks like mincolor lit _sunlight2 shadows. But there's still unlit faces (facing down) and I don't know why. They are part of the same func_wall.
#15008 posted by necros on 2015/06/25 05:49:24
use minlight style (4) on lights with the colour you want.
@ericw, No, You Are Right.
#15009 posted by adib on 2015/06/25 06:17:48
I should think about the global "ambient light" in terms of "shadow color". If so, I should:
1- set the sun and sun2 to get this moonlight;
2- set worldspawn to a minimum level of the same blue tone: the color of the shadows;
3- warm interiors up with yellow lamps.
So, all I need is a worldspawn _mincolor, as you said.
@ericw, No, You Are Right.
#15010 posted by adib on 2015/06/25 06:17:48
I should think about the global "ambient light" in terms of "shadow color". If so, I should:
1- set the sun and sun2 to get this moonlight;
2- set worldspawn to a minimum level of the same blue tone: the color of the shadows;
3- warm interiors up with yellow lamps.
So, all I need is a worldspawn _mincolor, as you said.
@necros - Thanks!
#15011 posted by adib on 2015/06/25 06:48:52
Yes, the local minlights are doing the trick. Thank you all and I'm ending this flood.
Unlit Brush
#15012 posted by adib on 2015/07/02 07:47:31
I need a brush that is not affected by any light entity. Is it possible?
Black Texture
Unless You Mean Fullbright
#15014 posted by Kinn on 2015/07/02 13:08:33
In which case - external .bsp model?
|