Monday, April 21, 2014

Unreal engine

Last blog I went over shaders in Unity, today i want to take a look at the other U engine, Unreal. Once again using the official tutorials. While writing shaders in manually is possible in Unreal (actually ShaderDevelopmentMode, is disabled by default) I'm going to go over the material editor, and lighting.
Heres a quick look at a simple version of the materiel editor being used, with GUI more common in hardware development, the properties of a material are set up this way in Unreal. On the left we have a big box with a lot of inputs. Thats the material, and its name can be seen on top. The inputs cover a large portion of data and maps. Texture, spuclar and a normal map have been applied simply by loading in the texture and connecting it to an open slot on the material. Theres also use of speed tree, a program used to make quickly randomly generated trees. In this case its connected world position offset, which lets speed tree change the world space of the vertices.

Honestly at fist glance this system looked great, easy to read and understand and it covers a lot of the basics for shading materials. Once i figured out about Material functions it was pretty great. Material function are small material shaders that you can create to make an even simpler experience when using the material editor
 The example here shows a screen blend function, taking two layers and blemding them together. Now you can downsize all these windows into a single window, from the inputs to the output. This allows anybody to use your effect/shader with ease. The materiel editor is an awesome little feature that makes creating effects super easy, it can even use premade math function including things like Lerp and some you see from .glsl's like Clamp.
There are 4 kinds of preset dynamic lights in unreal and those are Directional, Point, Spot, and Sky lights. the reason i did this blog on the material editor and lights is because lights have light functions that can be edited just like materials

I didn't mention that Unity has a similar approach to materials, but from what i've seen the Unreal engine's cleaner and simpler and is good for implementing the simple shaders that I'd use any day, but Unity still has its uses, allowing you to code in shaders by yourself easier.


No comments:

Post a Comment