Greetings and salutations! Today I want to show where I have progressed in Unreal Engine 4 in regards to
Prism. It has been quite difficult, but very enjoyable to say the least. I have been working hours at a time in Unreal and forgetting to eat I've been having so much fun. I got to watch that, but it is so compelling to try to fix and experiment and tinker inside the engine, seeing what works and what doesn't. Anyway, last time I was talking about the level I had gotten the level tiles sculpted. Now they are UV mapped and have the appropriate textures ready for them. I also made a tree which I will show below.
|
My tree in Unreal Engine 4. |
The tree itself took over four hours to build, including textures and UVs. It wasn't actually that hard, just long and tedious as I built the texture maps and the branch groups. Overall, the tree consists of 20,000 triangles which is actually probably too much. However, it is the best looking tree I have ever made and I am actually quite proud of it. Usually I am terrible at doing foliage but I am getting better. This tree is proof of that.
The textures on the ground mesh was a totally different story. They were frustrating me to no end. I could not get them to look sharp, clear and good no matter what I did. I tried UV mapping the ground plane and then painting the textures directly onto the mesh in Mudbox. However, that made the textures too large and blurry. So I tried baking procedurals in Maya but that came out even worse. Finally, I got this result:
|
Texture detail of the ground. |
So how did I pull this off? By tiling! I discovered how to tile textures in Unreal by just using three nodes in the material editor. You see, the material editor is just like the Blueprints system and the Hypershade networks in Maya so setting it up was actually quite easy once I discovered how to do this. Tutorials helped of course, but I had to figure out how to actually get all of the information I learned together into a single shader network for this to work. Here is part of the network:
|
Shader network for the ground textures. |
The two nodes TexCoord and Tiling determine how much the texture is tiled. These are multiplied together and plugged into the UV inputs of the texture files. The red and green texture to the left is an RGB mask. It drives where the textures show up on the mesh. Red is for soil and green is for grass. I then put everything together and plug them into the output mode of the material and voila! Instant success. Using one material to drive two textures saves on memory and render times. Unreal Engine 4 can have multiple layered textures, but according to the documentation, it can be quite expensive to have several materials layered in the same network. Thus why not use one material and drive the textures with an RGB mask? Quite ingenious if you ask me. I have a similar set up for the normal maps as well and I think it has come out very nice.
The last thing I am still working on is how to use the lighting engine in Unreal. Unreal uses something called Lightmass which handles its precomputed lighting. This was quite difficult to understand and I am still struggling with the best optimized use for it. When I first baked the light maps in this sample environment, I discovered that the normal maps on the tree were looking very odd, not at all like how it looked in Maya. After doing some research and re-baking the normal maps in xNormal, I discovered it wasn't the normal maps at all, it was Lightmass! It was baking my light maps at too low a resolution. So I upped the resolution and tweaked a few other things. The results speak for themselves:
|
Using Lightmass to bake the shadows and textures into the environment. |
The textures you see on the tree is totally driven by a normal map. However, it only looks that good because I increased the resolution of the light map on the mesh for the tree. The same with the tree's shadow on the ground. It didn't look right until I did the same thing for the ground mesh as well. Then I added a small amount of GI to bring out the color in the shadows instead of having pitch black.
I'm really excited about my progress in Unreal Engine 4 so far. Just learning how the materials and lighting work together and individually will especially help me when I get Aphrael herself into the engine. I also can't wait to see what my finished prototype level will look like. It is going to be great!
No comments:
Post a Comment