Worst-case scenario: the UEd Goblin wipes the map and burns down your house.
Lights a mesh based on light reaching each polygon vertex.
- 1 When Vertex Lighting occurs in Unreal
- 2 How it works
- 3 Solutions
- 4 If its still too bright or dark
- 5 Black-Lit meshes (A workaround using blocking volumes)
- 6 Related Topics
- 7 Discussion
When Vertex Lighting occurs in Unreal
- on meshes
- not on BSP (uses lightmaps)
- Originally built into rendering software
- Built into 3D graphics cards for speed
How it works
Each polygon has a minimum of 3 vertices. If light is cast towards the polygon, each vertex will usually receieve a differing light level. Vertex lighting blends the light level on the surface of the polygon based on the vertex light levels.
Because of this blend, neighboring polygons will also appear smooth, resulting in a smooth mesh surface even if the mesh geometry is coarse. However, a coarse polygon will still be detected by seeing its edges and comes with its own set of problems.
Can mesh light smoothing be toggled? Category:Legacy Answer Needed
Foxpaw: In UT there is an actor setting bCurvyMesh which I believe does this. In UT2003 I believe you can do it using materials, but I can't say that with certainty.
Stretched light or shadow
- avoid long stretched polys
- Use even spaced polys for maximum light and shadow clarity
- [show light] in center fade to black on edges
- [show light] on one edge fade to black
- onto BSP lightmap world
- onto other meshes
- prevents shade 'stepping'
- Tesselation increases polygon count
- Increased polygons = increased lighting detail
Dont place static mesh on top or near others
- Make one mesh by welding vertices
- SHadows calcualted across entire mesh
If its still too bright or dark
You can always toggle a few parameters in the mesh's actor properties:
- alters lighting on badly lit meshes
- Instead of being lit on a per-vertex basis, the mesh takes a direct trace from the eight nearest lightsources and uses those for its lighting. Useful if you end up with a black mesh because a couple of vertices aren't receiving light.
- Downsides - The entire mesh will appear to be too bright because it is being lit as a whole by eight separate lights. Additionally, the mesh will no longer cast a shadow. Also, if you have two wildly contrasting lights near the mesh you will end up with some pretty funky lighting ;)
Black-Lit meshes (A workaround using blocking volumes)
Pretty much anyone who has used UnrealEd 3 will have experienced those horrible black meshes caused by certain vertices not receiving light. Here's a handy workaround to provide nice lighting, with shadows, and retain functionality of the mesh:
All that is needed for this to work is a single collision property in the mesh itself, and a BlockingVolume. Select your badly lit mesh and set its bBlockZeroExtentTraces collision property to false. This will mean the mesh effectively becomes non-solid to objects such as lights and weaponsfire. Therefore it logically follows that light will be able to penetrate the mesh and reach otherwise hidden vertices. That solves the black mesh problem, and also allows the mesh to be nicely lit (unlike the bStaticLight property).
Next, you need to make a BlockingVolume in the correct size and shape to cover the mesh as closely as possible. In its collision properties, set bBlockZeroExtentTraces to TRUE this time. Now you might be wondering why we're setting this to true when it should block lights again. The simple answer is that blocking volumes don't work the same as meshes, and lighting will still be able to travel through the volume to reach the mesh. However, the volume *will* block both coronas and weaponsfire. There you have it, a nicely lit mesh that still blocks coronas aand weapons. Neat, huh? :D
- 1.0 is maximum
- changes overall lighting
- Full bright mesh reveals texture only
- uses no lighting
- mesh doesnt block light
Projectors (UT2003 and later)
- If mesh is not bright but surrounding area is
- example: light area around a lamp mesh
- project light onto mesh only
- Hourences' tute: http://planetunreal.com/phalanx/tut%27s/tutorial_vertex.htm
- General lighting
Radiosity: I've added my personal workaround for those dastardly black-lit meshes, hope it helps anyone who might read this :)