Projector
Projectors display a material on the world, just like a slide projector in real life. Projectors can be dynamic: if a player walks in front of one in the game, she will have the projection applied as well. This behaviour is toggled with bLevelStatic. Projections travel through meshes, BSP etc. Several properties give control over what type of surfaces the projection is applied to.
When selected in UnrealEd, they display a yellow bounding box around a cyan trapezoid (but only once a texture is set!):
- the width and breadth of this is given by Display→DrawScale
- the depth of this is given by MaxTraceDistance. This is how far the projection is applied.
- the angle of projection by FOV.
- the orientation of the Projector is given by Movement→Rotation, just rotate it like a brush or any other directional actor (see camera movement).
Properties
- bool bClipBSP
- When True, the projector will not repeat over BSP (better to set your texture for Clamp, then it won't repeat over any surface)
- bool bClipStaticMesh
- When True, the projector will not repeat over Static Meshes (still better to use a clamped texture)
- bool bDynamicAttach
- The manual says not to mess with this, but that it needs to be False for the ProjectTag property to work properly.
- bool bGradient
- Smooths the edges of the projection
- bool bLevelStatic
- The projection displays on everything that is present at the start of play (or when the projector is spawned, if done in code), but nothing afterwards: players won't be affected. Useful for sticking graffiti on walls, for example.
- bool bProjectActor
- When true, the projector will project on any Actor
- bool bProjectBSP
- When true, the projector will project on any BSP surface
- bool bProjectOnAlpha
- The manual says "No longer used". Apparently it was once used to determine if the projector should project on Alpha maps, such as terrains. It doesn't work well.
- bool bProjectOnBackfaces
- If true the texture will be projected on surfaces facing towards and away from the projector. If false it will only be projected on geometry that faces the projector, but will also be more or less transparent depending on the angle of the surface to the projector. If your getting weird results on your static meshes be sure that the normals are not jacked up.
- bool bProjectOnParallelBSP
- The manual says "No longer used", however it appears that if you have adjoining BSP, and this is false, you may not get the projector across both pieces. (someone should add what engine version this "no longer used" goes to)
- bool bProjectOnUnlit
- When True, the projector will be projected onto surfaces that have the Unlit property set True.
- bool bProjectParticles
- When True, the projector will project onto particles that cross it's path
- bool bProjectStaticMesh
- When True, the projector will project onto Static Meshes (the FOV must be set greater than 0 for this to work, as well)
- bool bProjectTerrain
- When True, the projector will project onto terrain. It seems that projecting onto terrain cuts the brightness of the projection way down.
- int FOV
- Sets the angle of the projection trapezoid's sides. Please note that projectors with FOV = 0 will not project on static meshes. For laser crosshairs and similar effects use FOV = 1 instead.
- EProjectorBlending FrameBufferBlendingOp
- The blending operation between the framebuffer and the result of the base material blend.
- EProjectorBlending MaterialBlendingOp
- The blending operation between the material being projected onto and ProjTexture.
- int MaxTraceDistance
- How far the projection is applied. Sets how far the projection trapezoid extends away from the Projector in the direction of projection.
- name ProjectTag
- If set, the projector will only project on actors with the same Tag
- Material ProjTexture
- the material to be projected.
Enums
enum EProjectorBlending
{
PB_None, PB_Modulate, PB_AlphaBlend, PB_Add
};
Functions
- native function AttachProjector()
- This function allows you to attach a projector to a surface. It will trace forward a number of units equal to the MaxTraceDistance variable, in a direction based on its rotation.
- native function DetachProjector(optional bool Force)
- This functional removes the projector from a surface, which is highly useful if you need to update a projector’s properties incase they have been modified since last calling AttachProjector().
- native function AbandonProjector(optional float Lifetime)
- allows you to turn off the projector after the amount of time passed into it elapses, basically leaving the texture attached to the surface while disconnect the Projector (actor) from it (for performance).
- native function AttachActor(Actor A)
- Attach the Projector to an Actor
- native function DetachActor(Actor A)
- Remove the Projector from an Actor
Making your own textures
It appears that projector textures for light effects should be white where you want light cast, and mid-grey (127,127,127) where you don't. You don't need to set alpha or masked when you import the texture.
Known Subclasses
Related Topics
- ProjectorTricks - Projector Tricks (udntech)
- ProjectorsTableOfContents - Projectors Table of Contents (udncontent)
- Weird Projector effects - Extra projector tricks hitherto unused by man
- braagh's Projector Happy Fun Time - Simplified information about projectors
Discussion
StarWeaver: Ok, I keep seeing things in lighting docs say, basically, "You shouldn't try doing this anymore because projectors make it obsolete." What I haven't seen yet is anything explaining how to use projectors for light and shadow effects to those of us who like and generally have an easy time with manipulating level geometry to make it happen, and aren't generally that great with photoshop and texture creation to begin with ...
SuperApe: Good point. I only recently got into Projectors and while I can see the technical performance reasons (and the obvious engine support reasons) why to use Projectors over DynamicLighting and some LightingEffects, there is a definate lack of info here on how to substitute the normal DynamicLighting tricks with Projector functions. That would be useful. In short though, Projectors take a texture and can project it onto BSP, mesh, etc. This can project light or shadow. Each Tick(), DynamicProjectors remove the Projection and re-project it, to make effects like the Vehicle headlights. The reasons why DynamicLighting is "shunned" is two fold: a) A lot of those LightingEffects and LightTypes are unsupported in UT200x, and b) DynamicLighting requires a process each Tick(), similar to what DynamicProjectors do, that is expensive for the CPU to handle. Still, I use dynamic lighting in certain instances that Projectors just can't seem to handle; an ambient glow, for example.
clandestine: Project on particles doesn't actually work, does it?
Wormbo: Oh it works, but it's only visible in the game.
braagh:I'm new to the wiki, but I may start to add information this page as I learn more about projectors(The level I'm working on seems like a good place to learn).