Flickery lights

It’s been a while since I’ve worked on this scene, so I thought I’d ease back in by playing around with materials again!

When the big machine in the roof of my scene turns on, I wanted to turn on a bunch of lights.
Here it is!

I’m doing this with a mix of actual lights, and an animated dynamic material.

Each piece of the geometry that is lit has vertex colour data on it, and the vertex colour is used to offset the flickering (which I’ll explain a bit later).

Here’s what the vertex colours look like (I’m only using the red channel at the moment, but I might use green and blue for other data later when I want to damage the lights):

ModoVertColours

And here’s the material:

FlickerEmissiveMaterial

The stuff outside of the “Flicker” group is just regular Normals, Roughness, Metalicity, etc.
I’m not using a separate emissive texture, I’m just masking the parts of the Albedo that are glowy, and using those in the material emissive slot. The mask is stored in the Albedo alpha channel.

Now, for the flickering part…

I’m using a texture to determine the brightness of the flicker, each pixel representing a different light intensity at a different point in time (I stretched the image to make it obvious, but it’s actually a 256 * 1 texture):

LightFlickerPattern2

The vertex colour, that I mentioned before, is the offset into the above texture. So each light has a different offset into the flicker pattern, so they all go through the same cycle, but they start at different points in the texture.

There are parameters for the strength of the flicker, minimum and maximum emissive strength, etc.
These parameters are controlled by a dynamic material instance, so that I can play with their values in the RoofMachine blueprint, like so:

DynamicMaterialParamsBlueprint

And, finally, I just set up some curves to control these parameters over the “power up” phase, which I just played around with until I was reasonably happy:

LightPowerTimeline

And that’s about it!

I’ve also done a little tweaking of the lighting, etc, and although it’s a bit too gloomy at the moment, it hides my nasty wall material that currently looks like cheese 🙂

LightTestAndWalls

Advertisements

Tags: , , ,

4 Responses to “Flickery lights”

  1. Laz Says:

    Hey bud, I came across this blog a week ago when I was doing some research for a project I was about to start, that project was recreating the test chamber in UE4 in order to familiarise myself with it.. heh. I thought it was a perfect project for me, because this sequence is what put me on the path to being part of the VFX industry (I’m currently at WETA in NZ). I thought the whole thing would be very interesting in in VR. Anyway, since discovering this blog, I have decided to do something else instead, but will keep an eye on your project, it looks fun.

    I see you were playing around with a portal effect, are you planning to also recreate the vortigaunt / ichthyosaur parts too?

    Is there any reason why you aren’t posting this on the unrealengine forum as well?

    Looking forward to more updates!

    • Laz Says:

      Ha, I totally forgot to comment on your actual post! Ha.. I really like how the flickering feels like it is going around the AMS, could you cycle that affect so in stead of going full bright they just keep going around? I reckon that could look pretty cool, almost like the lights are being affected somehow by the giant motor turning the rotor at the end. A really nice solution btw, it works very well!

      • geofflester Says:

        Thank you 🙂

        Yeah, I have left a *tiny* bit of the flicker on, but it’s barely noticeable. That’s a cool idea about having the motor affect them, I might give that a shot 🙂
        I could probably use the green channel of the vertex colours for that part of the cycle, maybe!

        In a previous post, I wrote some code that modifies vert colours on the fly, so that they actually get affected by the rotor arms, but sadly I had to modify engine code for that to work outside of the editor. That would have been neat, because then I could have put little vertex colour modifying volumes in a few spots, and I could have used that for when the scene blows up! (If I ever get that far :P)

    • geofflester Says:

      There can never be too many Half Life test chambers 😉
      There’s also the Black Mesa project that rebuilt it all, which I totally forgot about until I was a good month into the thing…

      I hear you about Half Life being a motivation to get into the industry, it sure gave me a huge appreciation for what games could do.
      Took my sweet time after that getting into the industry, mind you 🙂

      That’s awesome that you work at Weta, I’ve heard great things about that place, and ovbiously the work speaks for itself!
      I managed to visit the workshop at one point, which was awesome (my wife’s a Kiwi, and we were living in Melbourne at the time) 🙂

      I really want to do the vortiguant parts, and I’ve blocked out the rooms, and the teleportation, but… Well, I keep getting
      distracted, so I’m not sure I’ll get there… Hopefully!

      I suppose I should post on the Unreal Engine forum, not really sure why I haven’t, guess it just didn’t really occur to me…
      So good suggestion, thanks 🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: