Playing with materials
In the last weekend I didn't have much time to dedicate to the project, so I decided to take a brake from coding and spent some time enhancing the visuals by playing around with materials.
I decided to give the game a temporary background, so I googled for a starfield texture with some nice colours, and I cropped the image to have a 2048x2048 square texture.
Then I modeled a square plane in Blender and I imported it in Unreal Engine, together with the star texture. By using the "front view" in the editor, I rotated the plane to be roughly perpendicular to the camera.
The next step was creating a new Material, clicking on "Add new" and then choosing "Material".
In the material editor I right-clicked and selected "Texture Sample". In its options I chose my star texture, then I connected the output pin of the texture box to the "Emissive color" pin of my material.
Clicking on the material box, the left panel shows its options, and here you can choose the various parameters that will affect how the material will be rendered in-game.
For the background I decided for a simple Opaque and Unlit material, since it does just need to render a static background, without any translucency or reflection; after saving the changes and applying the material to the plane this is the final result:
For the tiles, I right-clicked and typed "Constant3Vector" to create a vector box; this is simply a triplet of numbers representing the R, G, B values of a color. In the left panel you can type the values, or even use a color picker to select a color. This value can be plugged directly into the "Emissive color" pin of the material, and I'm choosing a white (1, 1, 1) value.
I want this material to be "Additive" instead of opaque, because this will give a nice "see-through" effect that will show the background underneath, as if it's a kind of glass tile. As you can see I used the white for both base and emissive color, to give it some boost.
Now, the highlight material. I like the green coloring, but I'd like it to be illuminated like a led light. I can still use the Vector3 color and the additive material, but I have to multiply the emissive value to see a glow around it that will simulate light emission.
Instead of plugging the Vector3 directly into the material, I'll create a "Multiply" box, and plug in the color and a constant. Try different values, I liked the result when using a value of 50.
Commenti
Posta un commento