Adding a texture to an area light can make it produce softer and more detailed highlights and an overall more organic lighting effect.
Since an Area light in Blender isn’t rendered as an actual mesh object with UV coordinates, it’s texture coordinates are parametric (see below).
Adding a texture to an Area Light:
- In the Area Light properties click the Use Nodes button (see image A) to initiate its node graph and allow texturing it.
- In the Shader Editor view (with the light selected), drop your texture to the light’s node graph and connect it to the light’s Emission node’s Color input. (see image B)
- Create a new Input > Geometry node, and connect it’s Parametric output to the Image Texture’s Vector input. (see image B)
A. Without a texture the Area light produces a hard flat highlight:
B. With the vignette texture, the Area light now has a more subtle organic effect:
* The Emission node’s Strength was increased in this case to compensate for the lower light output with the texture.
- Cycles Area Light pleasent surprise
- Cycles Area Light shader visibility
Unreal Engine 4.22
This simple Unreal Editor Python example sets the Z axis location of all actors with names beginning with ‘Sphere_’ in a way that their bottom (minimum Z bound) is at height 0.0.
Download the script
> learn how to run Python scripts in the UE4 Editor
from unreal import Vector
lst_actors = unreal.EditorLevelLibrary.get_all_level_actors()
print('place actors at 0 z')
for act in lst_actors:
act_label = act.get_actor_label()
if 'Sphere_' in act_label:
act_location = act.get_actor_location()
act_bounds = act.get_actor_bounds(False)
act_min_z = act_bounds.z - act_bounds.z
location_offset = Vector(act_location.x, act_location.y, act_location.z - act_min_z)
act.set_actor_location(location_offset, False, False)
* note that when copying and pasting a script from this example, the indentation may not be pasted correctly.
The get_actor_bounds unreal.Actor class method returns a tuple object containing 2 unreal.Vector objects, the first being world space location of the actor geometric center, and the second is the corner of the bounding box relative to the center.
‘Sphere_*’ actors before running the script:
‘Sphere_*’ actors after running the script:
Get started with Python for Unreal Editor
UE4 – Python – Importing assets