Ads keep us online. Without them, we wouldn't exist. We don't have
paywalls or sell mods - we never will. But every month we have large bills
and running ads is our only way to cover them. Please consider unblocking us. Thank you from GameBanana <3
Welcome to another one of my tutorials. In this tutorial I will teach you how to use the entity env_sun in your map so you can achieve a cool sunlight effect like I used in this map:
Let's Get Started
First, open up your map and place the following entities:
Env_sun Light_environment info_target
Now, move the Env_sun and the light_environment near the skybox where you want the Sun to shine from. Make sure that both entities are as close as possible.
Now select info_target that you placed, and move it to where you want the env_sun to point at. In this map, I placed the info_target inside the barn, so that the env_sun would shine through the hole in the roof.
Open up the info_target properties box, and give the entity a name. I called mine sun_target.
Now go back to the Env_sun and open up its properties window. Set the Viewer Entity to the name of the info_target.
Now all you have to do is try to set the light_environment to point the same direction as the env_sun.
Double click on the light_environment entity and press the Point at button.
Once you do that, you should notice that your cursor has turned into a crosshair. Go to where you placed the info_target and click it with your cursor.
Once you do that, you should notice that the numbers in the Pitch Yaw Roll(YZX) field have changed. That means that the light_environment is now pointing at the entity you clicked on.
Now, you can edit the color and brightness of the Env_sun and the light_environment. Here are the settings I used for my map Fy_barnyard
Use Angles: No Pitch: 0 Sun Color(R G B): 176 88 0 Overlay Color: 0 0 0 Size: 20 Overlay Size: -1 Material Name: sprites/light_glow02_add_noz Overlay Material Name: sprites/light_glow02_add_noz HDR Color Scale: 1.0
The last thing to do is Compile your map and test it out, then adjust the settings to your liking.
Thank you for reading my tutorial, if you have any questions, please do not hesitate to PM me or leave a comment.
This is an excellent tutorial and i appreciate your effort in making it. I have a problem however. For you env_sun entity you have the following options:
Use Angles: No
Sun Color(R G B): 176 88 0
Overlay Color: 0 0 0
Overlay Size: -1
Material Name: sprites/light_glow02_add_noz
Overlay Material Name: sprites/light_glow02_add_noz
HDR Color Scale: 1.0
I dont have most of these including overlay colour, overlay size, material name, overlay material name sprites, HDR colour scale.
Ive looked around but i cant seem to find out why i dont have these options in my env_sun entity. None-the-less i did everything without those options and it turned out ok. I was just wandering whether you might know how i can get those options to make my sun look better.
Also, i was wandering whether you could tell me whih skybox texture you used for fy_barnyard. I would really appreciate it.
Again, thank you for this excellent tutorial.
Seems like the thing for me and thanks for making it but ive got an issue D:
its almost as if the sunlight decided to look everywhere BUT where the locator is at. the sunlight itself looks great, but its lighting completly misses my area D:
also, the sun turns out green even though i selected yellow as the sun color and orange as the light_env color?
any ideas sgt>?