(I am currently using version 4.19.2)
The good news about Unreal Engine 4: its not that hard to learn. Is it worth the effort? Oh, yes. I’m quickly getting up to speed on fundamentals and using them on imported CityEngine work.
As mentioned previously, I’ve been working from a 4-1/2 hour YouTube tutorial by OnlineMediaTutor, a media teacher from northern England with a background in visualization/animation with Maya and 3D Studio Max.
- When you create an Unreal project, the app generates a set of folders in your workspace; click the graphic on the right to view it. Get to know this structure because you will be working with lots of different types of resources and you’ll need to know where to store/find them.
- As you create a new project, you have the option of including Unreal’s built-in “starter content” collection of textures, materials, primitive/architectural shapes and etc. Other resources are available for purchase and download through the Epic Games Unreal launcher, the web page that opens when you click the Epic Games icon on your desktop. Some resources are offered at no cost.
- Surfaces in your work are painted with “materials”, which are created from one or more kinds of “textures”.
- A Diffuse (D) “base color” texture looks like what we are trying to create. In the diagram, grass is created from an image of grass.
- A Normal map (N) is an RGB image that adds bumpiness to a mesh surface by controlling what happens when light hits a pixel.
- The Roughness (R) spectrum goes between 0.0, a smooth and glossy and 1.0, a matte finish. Roughness can be distributed evenly by assigning a parameter between 0 and 1 or generated in patterns using a Roughness map.
- An Emissive (E) map (not shown). Used on lit surfaces like windows at night, tells the material where to glow and what color the glow should be,
The Material Editor is an intricate tool for creating materials from textures and parameters. You will choose expression components (“nodes”) and graphically chain these commands together to perform operations. What is taught in the tutorial is relatively simple, but open some of the starter content materials to see some very complicated operations.
Here are the expressions covered in the first half of the tutorial and how they were used, along with the times where they appear:
- Constant3DVector (1:06:25) – outputs three vectors or “channels” that can carry red, green and blue values. Used to create a material with a solid RGB color.
- Constant (1:14:45) – outputs a single float value. Used to assign fixed numeric values to parameters e.g. roughness.
- Scalar Parameter (1:30:00) – for assigning an adjustable range of values to a parameter which can be adjusted by sliders in the Details window.
- Convert a Constant to a Scalar Parameter (1:29:30) – and vice-versa. Right-click a Constant or Scalar node and then “Convert to…” to toggle.
- Texture Sample (1:20:40) – outputs the color value(s) from a texture. Used to designate the texture files to be used in creating a material. To create the grass material in the example, three Texture Sample nodes were used to assign D, N and R maps.
- Landscape Layer Coords (1:34:45) – generates UV texture coordinates for applying materials to terrain — something you’ve already learned about in CityEngine. Contrast with…
- Texture Coordinate (2:28:10) – generates UV texture coordinates allowing materials to use different UV channels and specify tiling on meshes (rather than terrains).
- Multiply (1:36:00) – takes two inputs, multiplies them together, and outputs the result. Used in the tutorial to multiply the Texture Coordinate node value, increasing/decreasing the UV size of grass surface.
- Layer Blend (1:41:05) – you can assign a single material to cover your landscape in the details window, but that’s not the way the world looks. To be able to cover using more than one texture, you must create a palate of whatever materials you intend to use. Four materials — dirt, dry grass, lush grass and rock materials — are created during the tutorial and used in the blend. From here, we set a dirt “base” texture for the landscape (to avoid any missed areas) and paint the terrain with the materials in the palate.
Starting at the right of the Material Editor diagram, a grass surface material is created from a Diffuse texture sample that is plugged in to the Base Color channel and a Normal map, plugged into the Normal property channel. A variable parameter node is plugged into the Roughness channel. To the left in the Grass Scale section, initial UV coordinates are set with a Landscape Coordinates control. This node plus a variable parameter Image Scale control are plugged into a Multiply node that is connected to the UV values of the Diffuse and Normal images. At the far left, the material is shown on a sphere-shaped mesh with the values of the Image Scale control below.
* * * * *