Generating displacements from textures for high quality Normals.

For the highest quality normal maps, you really want to sculpt textures in zbrush or mudbox. The problem is where do you start. Starting from scratch using masks can be time-consuming. You can start with a displacement map. But displacements derived from photos can cause artifacts and cleaning these up can be tedious. My solution is to generate displacements using an actual mesh and getting good results quickly. Here is my solution.

1. Start with a tileable texture. Paint the outlines of the brickwork that results in a mask texture. (this is the only tedious part)
2. Import texture into houdini and convert into geo (using trace sop)
3. Each brick is then iterated one by one (foreach sop) . For each iteration the sampled brick is extruded and beveled by a random amount. To establish a natural look, the amount of bevel is modulated by a nose texture along the edge. This creates a chipped edge look.
4. Each brick is also rotated slightly using a random seed.
5. The mesh is converted into an isosurface to give it a more organic shape and remove meshing errors.
5. At this point a depth map is exported from houdini as a 32 bit OpenEXR file.
6. In mudbox/zbrush you can use this as a displacement which will already give you a very organic base sculpt to start from. You can then sculpt as usual to build up detail.
7. This gives you nice normals and a very accurate depth map that can be used in blending shaders.

This is the final result. I spent 30 minutes to get to this point form start to finish, the key was to get a good base displacement from actual geometry without having to do a bunch of tedious modeling.
From there you can achieve an organic look very quickly.

Video of a texture blending shader in UDK. Please see "technical development (march post)" section below for details.

Fluids flows in UDK?

I've been developing some techniques to get fluid flows from Maya/Houdini into the UDK. Putting it together into a video tutorial format. Stay tuned!

I am on Linkedin!

For those looking to find me on Linkedin, here is a link!

Sneak Peak

Just a sneak peak at what I've been working on lately. Procedural modeling of high-detail terrain surfaces, PTex and DX11 tessellation in UDK. Wrote a displacement shader that works with both vector displacements and heightmap displacements.

New Reel!

My 2011 DemoReel is up!

Thanks for watching.

Fun with Paintovers

I try to do as much as I can in Unreal Engine, but sometimes the best way to convey the solution to a visual problem is to do a quick paintover or sketch. Here are a few examples.

Tools of choice: Photoshop and Wacom Cintique.

Look Development Process

This was an environment I worked on while at EA on the LMNO project.

My responsibilities were:
- Look development, including creating shaders, atmospherics, post process, and VFX elements.
- Responsible for creating specifications for the rendering system and working closely with engineers on implementation often prototyping and doing some of the coding myself.

Below is an outline of my process.

Concept Development: This environment is a modern biomedical research lab which the player must infiltrate undetected. I started looking at a lot of reference of set pieces and architectural details to help sell the story and gameplay. I quickly mocked up some spaces in Maya. Here is the approved mock-up.

Prop Zoo: I started to do a lot of image research regarding props and set pieces. I needed to come up with a set of props that was visually complex, unique, and fit within the memory budget. This collection of props we knew as the "prop zoo".

Final Concept: The prop-zoo, mockup and references was handed over to Ryan Church ( . This is the final concept.

Modular Construction: I developed a modular construction method that allowed designers and artists to work seamlessly together as well as keep complex levels within budget. Looking at the concept, I started to identify repeating shapes that could be built modular. I would often do little testbeds like the screenshots below to show everyone on the team how the kit of parts worked together.

Base Textures: I started to paint a set of textures to represent all the major surfaces (walls, floors, ceilings, dividers..etc). These textures were clean and non-distressed. Rather "boring" as compared to the more grungy textures typical of most game environments. Lighting was key to pulling of the mood in this space.

Set Dressing:
I developed a workflow that allowed set-dressing and asset-artists to work in parallel. I made stand-ins for all the assets in the prop-zoo with the correct pivots and set dressed with those. Once the assets were finalized by the asset-artist, the stand-in props would automatically get updated in the right locations. I did a lot of final tuning of textures and assets as needed.

Lighting, Shaders, PostFX
I was responsible for working with the engineers and provide the specifications for the lighting system. I proposed we use a global illumination system rather than Unreal Engine's native hand-placed lighting workflow. Also we added support for high dynamic range with a linear workflow. We also added tonemapping, LUT (Look up tables), Depth LUT (Depth based lookup), Vignette, Aparture flares, HDR Bloom.

In addition to lighting specifications, I also wrote an uber-shader that could be tuned to represent lots of different surfaces. Lastly, a lot of attention was put towards the post processing shader to really tune the overall color grading. I would often prototype these systems and hand off prototypes to the rendering engineer to make it into the final game. Below are shots from the final result.

This side by side comparison shows the enhancements from our old lighting model to our new global illumination lighting model. Note the accuracy of the shadows, bounce and tonemapping.

Technical Development using the UDK

Activision: The screen shots below are from another Unreal Engine project. I was responsible for taking the existing environments and bringing them up to a high quality photo realistic look. In addition I developed the specifications of the rendering system.

In summery, I developed the following features to reach the look we were after.

  • Look development on all environments.
  • Tuning textures, assets, postfx, FX, anything needed to achieve the final look.
  • Tonemapping shader.
  • Atmospheric Scattering shader that could change dynamically based on time of day.
  • A wide variety of surface shaders (rimlighting, dust shading, dust storm, skin shader, threshold-based blend shader, particle lighting shader, and more)
  • Developed postFX shaders including Dual tint, vignette, depth LUT and Aparture Flare.
  • Dynamic weather particle effects (sandstorm rolling in)

In addition I worked with another rendering engineer to implement/improve the following:

  • changed the UDK to render to a FP 16 render buffer, completely linear rendering pipeline.
  • Improved exposure controls in the UDK by using the linear result.
  • Added primary and secondary bounce intensity features to the UDK so the artist could control the bounce energy.
  • Improved the bloom functionality so it used the linear result for the cutoff thresholds, also added anamorphic distortion to bloom.

Screenshot before I started working on the level:

Screenshots after my look development pass.

Sandstorms and Atmospheric Scattering.

The images below demonstrate different stages of a sandstorm that can dynamically change based on the angle of the sun and density of the atmosphere. Another requirement was to have a minimal impact on overdraw and fill. I used a method similar to Rayleigh scattering. My approach was to use 2 shaders, a screen space post-effect, and a surface shader for the skybox. The shader was based on these papers:

To sell the drifts of sand along the ground, another postfx was utilized that essentially modulated a heightfog with noise texture. Lastly, a blowing sand effect was created in Cascade which was optimized to minimize overdraw.

I set up a some kismet and matinee that allowed time varying parameters (sun angle and atmosphere density) to drive everything.

The image below demonstrate different stages of the sandstorm. Visit my demoreel page to watch it in motion.

Texture blending.

I developed a texture blending shader that allows for a lot of detail without using high resolution blend textures. The blend texture is a 128x128 greyscale map (optionally you can also use vertex color). With this technique the brick transitions to the plaster naturally and with a lot more detail.

Gamma correction and Filmic Tone Mapping.

I implemented my own flavor of tone mapping based on work done by John Hable ( ) and HP Duiker ( ) . Below is an example of the effects of tone mapping on the same scene.