Saturday, January 11, 2014

[UE3/UDK] Equirectangular Environment Mapping

Equirectangular Environment Maps can be a nice alternative to cubemaps as they are pretty easy to handle (1 texture vs. 6 cube faces). Another advantage of these maps is that you don't need DX11 for proper MipMaps, so you can easily walk down the MIP chain for some simple IBL setups.
Unfortunately the material requires some trigonometric functions which will add a bunch of instructions.


Material Setup


Using this setup you can easily multiply a specular/roughness map by the MIPLevel to control the reflection blurriness by surface roughness.





IBL Example GIF (800KB)

http://www.abload.de/img/latlong01bofgl.gif

Tuesday, January 7, 2014

[UE3/UDK] Mixing Normal Maps

Approaches on mixing/blending normal maps using UE3' material editor.


Base Normal Map



Detail Normal Map


#1 UDN / 52 instructions (47+5)




#2 Whiteout / 53 instructions (47+6)



#3 Unity / 55 instructions (47+8)



#4 RNM / 55 instructions (47+8)
 

Friday, November 22, 2013

[UDK Quick Tip] Alpha Channel sRGB

Just a quick reminder that alpha channels of a textures won't be stored in sRGB color space. Having linear data is crucial for height or normal maps, however when using the alpha channel for something like a specular map it will just look wrong.

A quick way to fix this is to do a linear -> sRGB conversion inside the material, by taking the power of 2.2. The downside of this method is an extra 5 instructions. Instead it's good practice to multiply the alpha channel by itself (=taking the power of 2) which is slightly wrong but only adding a single instruction.


Sunday, November 3, 2013

[Blender/UDK] Fire Hydrant Model

Lately I've been practicing some Sub-D modeling. The Polycount thread on that topic was a great resource for recreating various shapes to begin with. Afterwards I started to make whole models; this fire hydrant was the first one. The topology/edgeflow is a bit messy where the main cylinder gets extruded and causes some pinching. But it was sufficient to bake a proper normal map for the low poly. The model is also slightly out of proportions since it's too elongated, espacially at the top.


High Poly / Wireframe in Blender
http://www.abload.de/img/firehydrant_001hp4jf05.png



Textured low poly in Blender (GLSL viewport grab)
http://www.abload.de/img/firehydrant_002tpr71.png




Textured low poly + LoD model in UDK
http://www.abload.de/img/firehydrant_003cypu6.png



Blendswap Download: http://www.blendswap.com/blends/view/70874
Sketchfab Preview: https://sketchfab.com/show/96ded07b6ac1434b9225531540fe2bda