February 24, 2015

Types of Displacement




Special shout-out to caner_ozdemir for his UE4 Iterative Parallax material setup... and making me aware that such a method even exists! For just 12 more instructions, you can iterate the parallax displacement 5 times and get a much cleaner result. I can easily see this method becoming the go-to method for displacement with modern mid-grade and even low-end GPUs.

February 10, 2015

Big Update!: Parallax Occlusion is now fully featured in the Perfect Tile System!

In UE4's forums, user Ehamloptiran shared his custom Parallax Occlusion HLSL code with all the forum goers. Since this project's beginning, I was excited to get parallax occlusion integrated, but there was no way to do it and keep the shader clean. Thanks to Ehamloptrian, I was able to use the code in my project in a very novel way. In order to obtain separate parallax tiling for the Tile Map, I simply had to divide the UV result of the parallax occlusion code by the TM tiling values. This way, I only need to run the occlusion code once. I will be implementing this novel solution through the basic parallax as well and see if it saves the instruction count some more.

There are some things to work on, though: silhouette clipping, and the possibility of bringing back freeform tiling. But in the meantime, you may go ahead and enjoy these screenshots.


February 9, 2015

Polys, Normals, and Tessellation

A simple visual showcasing the differences between rendering low poly geometry, normal mapping, normal map+tessellation, and a high poly model. Normals take care of lighting and shadows, but not silhouette. Tessellation smooths out the silhouette, but if you stick to low-poly normals and don't use a normal map, then the lighting might not smooth out the way you expect. But tessellation together with a normal map replicates a high-poly result to the tee. While it is a tiny bit more difficult to render as it uses a more complex pixel and vertex shader, it will still handle LODs much better than a high-res output and save thousands of polygons.


February 8, 2015

Perfect Tile System - Rewriting and More Rewriting...

For the past few months, I've been working on a shader project in UE4 to handle detail tiling with a grout system. I'm also putting a lot of work into making a pdf document, solid presets that demonstrate a variety of different features, and streamlining the system as best as I can.

Check out updates for this project here!: https://forums.unrealengine.com/showthread.php?50022-Perfect-Tile-System-Do-you-guys-want-this-for-the-Marketplace

One of my biggest setbacks was my incessant need to keep adding features to this thing. Originally it was just a basic multiplication and grout system to handle tiles and some tiling features, but it ballooned into a glass shader, a frosted glass shader that mimics interscattering, a dual-tile algorithm with a controllable midpoint value, texture maps (and dual texture maps), parallax displacement, falloff blending, etc, and it's just gotten crazy. So much so that certain new features required a complete rewrite of the shader's blending setup... multiple times. Upon release, it might as well be called the Perfect Tile System 3.0: nearly every single piece of code would have been written 3 times. And it's still not completely "perfect."

Initially, I used spider web branches to control how toggling different options affect the system. This makes sense if there's only a couple features to worry about. But I revamped all the toggling to feed into each other down a line. The end result is much cleaner code that allows me to add features and make changes to the system rather easily, but getting to that type of solution can be difficult to figure out: the order must be tested under as many circumstances as possible to avoid bugs or rendering errors.

For anyone following, I appreciate your patience with me and this project. I will strive to create the best product I possibly can. Here is my current to-do list:

  1. Finish cleaning up the shader
    1. Textures and Glass features combined are currently untested: may be unstable (medium priority)
    2. "Lerp" functions should be replaced with "If" functions/parameters and be tested for optimum performance (medium priority)
    3. Debug scattering map checkerboard pattern blows out colors and does not cancel out wrong parameters (low priority)
    4. Dual tile implementation is very broad, but not universal, and more can be done with it (low priority)
    5. Clear Coat implementation is very basic at the moment (low priority)
    6. Roughness implementation is good, but more could be done with it (low priority)
    7. Specularity currently has no implementation. This saves on instructions, but more can be done (low priority)
    8. AO implementation is OK for its purpose, but it's pretty basic at the moment (low priority)
  2. Asset Management
    1. Remake all instances for compatibility with final shader
    2. Delete unused assets
    3. Size management
    4. Fix redirectors
    5. Package project for development
  3. Ensure guide is updated to reflect recent changes
    1. Dual tile algorithm midpoint
    2. Parallax options
    3. Shader organization
  4. Package project for development
    1. Quick Test open
  5. Demonstration/Advertisement Video
    1. Music
    2. Narration
    3. Matinee Setup
      1. Live Demo
      2. Matinee Recording
    4. Final Editing
  6. Screenshots
  7. Submit!