Environment Base Shader and Dynamic Emssive Material

I was looking forward to doing some modelling tonight, but ended up starting something at lunch today forgetting that work has max 2017 and I have 16 at home – doh! Instead I worked on a base shader for the environment.

I’ve been toying with the idea of a mega-texture, so I’m not sure if I’m going to get an awful lot of use out of this, but it seemed a sensible place to start if I’m not modelling.

The shader has slots for colour, material, normal and ambient occlusion maps, as well as a colour blend overlay and UV tiling option. Using this I can get multiple materials out of less textures, have to create less shaders and won’t have to compile a whole bunch of shaders at runtime. Lovley!

12131415

I also created a dynamic instanced emissive shader. This means I can edit it at runtime. Having a button where I can change the glowy colours in my level? Yes please!

I added my door asset to a blueprint and enabled input on it (totally did this first, didn’t forget and wonder why my blueprint was broken…no, never).

17

I then setup a key press event with a counter and a switch on int for setting the colour using a set vector parameter value on materials node. I reckon there’s a far better implementation for this, if it becomes more than a silly easter egg I’ll improve it.

16

And here it is! In its .gif-y glory!

6fa2bcf85705223b6af364dc99546e59

Sci Fi Cabin Blockout

Today I started working on a small game idea that’s been floating about in my head – a first person point and click, escape the room style adventure.

I originally had a sort of lab in my head, but after doing some research settled on a small self contained living space, a terraforming pod sort of thing.

concpetsmoodboard 2

I’d like to make this in a style similar to alien isolation – I love the lo fi look and what I’m called “rounded realism”. Its got a touch of stylization to it that I really like without moving into cartoony territory.

Moodboard 1

I started out by setting up my units in max and creating a 6 ft guideline. I then blocked out the space.

1

I made a few changes along the way, importing into unreal to see how it felt and then making changes where appropriate. At first I had a really long bed and when I shortened it had a big gap that I didn’t know what to do with. It was then I realized the pod had no bathroom…

3

Last thing I did today was remove the arms and gun from the default first person blueprint.

4

Looking forward to making some assets and scripts for this!

Electric Girl Post FX

I was listening to the album Electric Girl by She the other day and wanted to try creating a post fx shader in the style of the album artwork.

a1739426881_10.jpg

There are several things that the art is doing that I’d like to recreate:

  • R + B Shifting
  • Vignette
  • Subpixel Overlay
  • Grid Overlay
  • Glitching

R + B Shifting

I did the R + B shifting using the sobel edge detection technique I discussed in a previous post. When drawing the pixel, this depth checks the adjacent pixels and if the value difference is large enough, colours the pixel. I pushed out the values a little so it was checking 2 adjacent pixels to give a thicker edge.

9

The red/blue colour was done by getting the UVs of the screen position and getting the sine of the U component. I used this to lerp between my two colours. I then added this to a lerp between the red and blue components of the gbuffer contents, based on the same interpolator. Multiplying this by the gbuffer contents gave me a blend that brought out the red and blue areas of the scene depending on what the blend colour was.

21

5

Grid Lines

If you’re reading this as a “how to” – don’t. This is super wrong and hacky. But it works for me!

I made the grid lines by multiplying the screen position UV with my scale UVs and feeding this into two linear gradients. I added these gradients to the U or V component divided by the line thickness, then added one on one side and subtracted one on the other. Flooring this then subtracting one from the other gave me a line! Adding them gave me a grid, but I changed my scale UVs to have lots of horizontal lines and the occasional vertical one.

10

I used this as an interpolator between my scene colour and line colour to give a bit of choice in the colour of the line.

11

13

LED Subpixel Element

The subpixel element was just a very small texture tiling texture. I tried adding and multiplying this, but went for an overlay blend in the end to get the look I was after.

14151617

Vignette and Grain

These were both from the scene post process volume settings, but I added an extra vingette to the shader to darken it – just used the radial gradient node that unreal has and used this as an interpolator between scene colour and scene colour raised to the power of 3.

181920