Simple LinearGradient Background

So, I’m learning Unreal by porting my 2D game from cocos2d-x to Unreal Paper2D. So far it’s working very well, but I need advice on how to make the background. The game is a infinite vertical scroller.

I thought of two approaches: one background sprite, resize it to the screen size and then move it with the camera. Problem is this seems too cumbersome.

Or I could make a skybox with a linear vertical gradient, but I didn’t progressed much, because I don’t want a horizon, I just want to paint the sky from the bottom of the screen to the top of the screen with a gradient.

So, what’s the proper way to do this? Is it possible to create a simple Sky Sphere without horizon?

If you look in the Engine Content folder of your project, you’ll find a Sphere_Inversenormals static mesh. Place it in your level, and scale it up to encompass your entire scene.

Then create a material like the one attached to this post and apply it to the sphere. The material uses the viewport UVs to drive your gradient. No matter where your camera located or which way it’s pointed, it will always have the same gradient.

3 Likes