If you do not have any experience in UE4, please go watch the very informative series provided by Epic Games on their Youtube channel. Most of these videos were made before version 4.7 and they maybe inconsistent with how things are done now. Don't get frustrated if something isn't working, Check the Answers Hub first, for a solution. I will be using Version 4.10 for this quick demo.
Material Building in UE4
Bringing Everything Into the Engine
Now that all the maps have been generated, launch UE4 and start a new project. I generally start with the default map and Starter Content for testing materials. I've set up my viewing area with a Material Preview Mesh which is available in the Starter Content folder (Content Browser Tab>Starter Content Folder>Props Folder>SM_MatPreviewMesh_02) and just copied and adjusted one of the floor static meshes to be a wall.
This is pretty much as basic as the process can get. I do want to point out that there is a TON of work that can go into making this material look better during the Photoshop stages. The first and most obvious would be making the texture map tileable. UE4 really likes maps that are a power of two, the engine will be able to ensure the texture looks good in many different situations. Another big improvement would be adjusting the images used to create the normal maps. It is a relatively small detail that the average person may not be able to pick out but most video game artists will view it as a huge glaring error. Take a look at the specular and normal map, then the rendered material to see if you can spot the problem:
(Fig. 1) Start a basic environment to test materials
- In the Content Browser Tab, create a new folder and name it appropriately. I chose PAPERBAG.
- Create a new material in the folder by right clicking and selecting "Material".
- Select "Import" from the top of the Content Browser tab and navigate to the proper files to import them into the folder.
- Double click the material to open the Material Editing tab, then tare the tab off into its own window (Left Click>Drag).
- Select all of the texture maps and drag them into the Material editing tab.
(Fig. 2) Import texture maps then drag them into the Material Editing tab. - Connect the textures to their proper node buttons on the Output Node.
- Done. Apply to any and all surfaces and stare in wonder.
(Fig. 3) Textures connected to their proper node buttons on the Output Node.
This is pretty much as basic as the process can get. I do want to point out that there is a TON of work that can go into making this material look better during the Photoshop stages. The first and most obvious would be making the texture map tileable. UE4 really likes maps that are a power of two, the engine will be able to ensure the texture looks good in many different situations. Another big improvement would be adjusting the images used to create the normal maps. It is a relatively small detail that the average person may not be able to pick out but most video game artists will view it as a huge glaring error. Take a look at the specular and normal map, then the rendered material to see if you can spot the problem:
The paper bag used for the capture was uniformly flat where the ink touches the paper. But because there was such a high contrast between the black ink and the light brown paper, the ink in the rendered material looks embossed which has lead to exaggerated highlights on the ink and the surrounding edges.
It is very important to remember: the more care used during the Photoshop phase of this process, the better the end result will be. Again, this is by no means a "cheat" to make PRB materials without having to use a Photometric stereo capture system. Photometric Stereo, depending on the amount of lights and the quality of the equipment used, will always be able to produce better quality maps, quicker. But this is another way to produce some materials inside of a real-time engine while having a lot of control over tweaking the texture during the processing stages. I have been messing around with different filter stacks in Photoshop to produce better results and will probably share this information at sometime in the future.
Some things to remember whenever texture maps are being generated by hand:
It is very important to remember: the more care used during the Photoshop phase of this process, the better the end result will be. Again, this is by no means a "cheat" to make PRB materials without having to use a Photometric stereo capture system. Photometric Stereo, depending on the amount of lights and the quality of the equipment used, will always be able to produce better quality maps, quicker. But this is another way to produce some materials inside of a real-time engine while having a lot of control over tweaking the texture during the processing stages. I have been messing around with different filter stacks in Photoshop to produce better results and will probably share this information at sometime in the future.
Some things to remember whenever texture maps are being generated by hand:
- Make them a power of two (2x2, 4x4, 8x8,, 16x16, etc).
- Make them tileable.
- Remove gradient lighting to improve repeatability.
- Even out contrast/brightness on flat surfaces when generating normal and specular maps.