Hello folks,
I’ve been trying for some time – prior to UE4, even – to sort out how to implement two effects (Ultraviolet reactive and Retroreflective materials) that I hope to use in one of my projects, but I’m having trouble with certain aspects of the problem. Finding solid information on how this has been achieved in other games would give me a better idea how to do it in UE4, but I haven’t had a whole lot of luck with that to date. Due mostly to my own limitations with programming, I would greatly prefer to get this stuff working with Blueprint (i.e., without C++ or low-level shader code).
Retroreflective effects seem the easiest. The definitive examples I can think of are from Left 4 Dead 2: the infected eyes and the uncommon common infected’s (construction vest/CEDA hazmat suit stripes, etc) clothing. There aren’t many details for that implementation online that I’ve found … mostly just a presentation on how the retroreflective portions of the mesh’s skin were encoded as textures, and a mention in the developer commentary that the effect was part of the shader with no real details. Neither is especially helpful for actually creating such an effect.
I have found the Camera vector examples in the Content Examples Math Hall; the camera forward vector example seems like the best basis for the effect. Changing the Lerp node to go between black and white and lowering the exponent a bit gets pretty close to a basic retroreflective material. However this only gets partway there; the material behaves the same way regardless of whether the player is pointing a thousand lumen flashlight straight at the object or whether they are standing next to the material in a completely lightless room.
That illustrates that for both effects, I’ll probably need to figure out how to make it react to a particular type of dynamic light source: phosphorescent materials react to a UV source (blacklight), and retroreflective materials react only when there is a light source roughly in line with the viewer and the material (in front or behind the viewer). So that’s part of the problem; I’m not yet sure if this is even possible in Blueprint, much less how to go about it.
For blacklight effects, I can think of a few examples that give me some ideas. I seem to recall that Condemned had a small UV light you could carry around for evidence gathering purposes. I believe (from seeing videos) that Daylight implements a similar effect in UE4. Psychonauts had Black Velvetopia, which could be easily reproduced by basic emissive materials, except that this effect was constant (materials didn’t change from “normal look” to “UV look”).
In the MMO City of Heroes, the Dark Astoria zone’s nighttime lighting originally had some of the feel of a blacklight. (Actually, as one of my groups discovered, setting your costume’s colors to light blue on dark purple made it look roughly UV reactive at night regardless of zone, but Dark Astoria seemed specially designed to look that way all over the zone.) One can kind of reproduce the look of the zone using textures with light-colored highlights and lighting the entire scene primarily in light blue, but of course that’s only a partial effect mimicking the way that certain materials – like the whitening dyes laundry detergents – look. It offers no way to control how any given material responds (some white fabrics react while others do not. Small particles and threads on the skin are much more apparent under UV light since the skin itself does not react and is only dimly lit by the purple spill light. Teeth and nails react, while eye sclera do not. Thus, I suspect that this effect may wind up actually being a blend of several different ones, with some means of defining which one dominates.
Anyway, if anyone has any insight, please feel free to share.