Download

Foliage & Parallax Occlusion Mapping Techniques used in Paragon - Live from Epic HQ

Wow, amazing stuff. I’m using the riverbed mesh and texture from the Kite Demo in a game, which makes heavy use of tessellation to implement its height map. Would it be worth converting to parallax occlusion mapping? I want to move to instanced stereo for VR when 4.11 ships, and tessellation isn’t supported for that.

There are several blended textures in the asset though, and in the stream you mentioned that might make things more expensive. Any thoughts or tips on adapting this for that Kite Demo riverbed asset?

I want that foliage blueprint so bad. Looks amazing!

Hey guys. On ipad so quick reply but will reply in more detail later.

The depthfade thing that made the opaque material appear translucent was using the tempaadither node hooked up to pixel depth offset, mixed with a heightmap. This creates a more interesting intersection when jamming meshes together and most rock and tree assets in paragon are using it, with some displacement texture contribution. Then we have other materials which do PDO and bumpoffset which can look great for certain textures and is cheaper than POM.

I think for now POM is my ch faster than tessellation. The river case can be handled in a simple way if you assume the water is a flat plane. Ill post more on that later.

Can someone from epic give more information on painting vertex colors from blueprints? I think I heard that mentioned during this stream but it was very quick.

Currently there are two modes: Fill solid color and Gradient Along Axis.

Usage is fairly simple. Point any static mesh component reference to the paint node, and plug in the colors you want, like this:

vertpaint_01.JPG

vertpaint_03.JPG

You can blend colors along the local X, Y or Z axes.

Regarding the Kite demo river material and POM:

There were two prototype versions of that material.

One used a material wetness type function to make the water in the rock material. The material wetness material function is set up like this:
wetness2.JPG

In a basic form it looks like this:
wetness1.JPG

The only caveat here is that incoming “Height” should be sampled from Parallax UVs. often that means resampling the heightmap texture again. If you pack your heightmap into the diffuse it can help reduce the cost.

The other just used worldposition with some height modulation to make the edge of the rocks look wet and to kill the specular under the water plane, and translucency did the water. This was one prototype image from early on:

d21e04423cac64c557486cda2488ba1cffec3ab8.jpeg

Doing it with POM should really be no different other than that you’d have to use the parallax UVs as above in order to get accurate water intersection.

I figured it was something like that, but I was wondering if you could elaborate or show a snippet of the material when you get the chance? The specific effect I saw had a very broad fade distance but was still casting shadows nicely, and when I attempted to set up a material with a similarly broad fade, the shadows got really screwy.

Here’s the specific part I was looking at:

And here’s a quick test I did showing the issues I’m getting:

You are doing it right. The only difference is that in the vine image the intensity was only 5 or so. But it is making the root darker everywhere by a little bit and does have the same shadowing problem.

There is one additional snippet to make the depth constant which is to divide that result by the dot product of camera vector and vertex normal. That way it will be stable at glancing angles.

Hey RyanB - congrats on an awesome stream!

I got about a million questions but I’ll try and contain myself. So just the top priority ones, if and when you’re able to answer, it’ll be much appreciated:

  1. How do you do material blending along branching roots? Is that something spline meshes do automatically?
  2. Same as above, but between the branches and the leaves. I thought I saw some nice color blending on the “physically impossible” plant-leaves when you were demonstrating flattening.
  3. How exactly are the root traces being done? One from each axis? Along the spline normal? I guess what I’m asking is, if they need to grow around a cylinder or sphere, you need to do traces from different angles, no? How do you find those angles?

EDIT:
4. Can we get an update on the render to texture tools documentation? Either the docs have errors or the tool is broken in the currently available UE4 version. Or, of course, I’m doing it wrong.

Thanks in advance!

I tried to reproduce the blueprint but I failed, Basically I just needed it to give life to my new texture. As you can see…

Oh and I forgot - any chance to update the render to texture tools documentation? Either the tools are / were broken or the docs are missing somethinh.

Hmm the tool should not be broken. The doc needs to be updated though because now less steps are required, in addition to some new features.

You should no longer have to use the high resolution screenshot window at all.

What are you seeing?

@David Trindade:

I see a few issues there.

  1. your topmost error is a missing texture sample
  2. second error is trying to at a v4 (0,0,0,0) to a normal map texture. normal maps are v3 so you need to add a v3. Or just skip that since adding 0 does nothing.
  3. On your PDO switch, instead of having B disconnected try either 0 or small number like 0.00001
  1. Interesting question that hits on a small limitation. When using the TempAA dither thing, if two materials use the same dither depth, the effect does nothing as they both are in sync and thus kind of cancel eachother out in terms of how they intersect (although both meshes will show blurry intersection with everything else). So the only offset that occurs is if there is a difference in the pdo height. This happens a small amount by using the hightmap of the texture as one of the contributors of the height. so then you have some slight variation, but in truth the effect works better with the two materials are different and one of them doesn’t use PDO so the tempAA part works.

  2. The Ivy shown was using PDO as well. In that case, Paul Mader did that on the shader since the ivy is placed onto lots of low poly geometry and for some angles you just cant help it that your mesh will clip into some geometry (clipping is better than floating so an artist will choose to jam something in rather than float it off a wall etc). By offsetting each leaf slightly in PDO it gives the appearance that when there is intersection, at least the leaves look more detailed like the model had more polygons, and the clipping is softened and less of an eyesore. But the same dynamic shadow bug shows up. All the ivy in the level is too dark until we rebuild lighting, since with dynamic lighting PDO causes things to self shadow when they should not. But lightmass doesnt care about PDO so static or stationary lights are ok.

  3. How the trace works is with a basic algorithm. At any one step it only tries to do one trace and then it does something different depending on the result at each point. So it could be anywhere from 1 to ~5 traces at each point. It will take me longer to explain this so I will try to come back with a better example using a simple system soon.

Thanks a ton for the info. I’ve tried replicating a simple use case where I trace down, then move and rotate the next trace based on the impact normal.

Can the render to texture tool make tiling textures automatically or do you need to be clever with your placement?

what if the user disables TemporalAA in the settings? it would look quite bad wouldn’t it?
I’m a little worried that you guys jumped ship into TemporalAA so much and using features that rely on it like that, while the main problems with TemporalAA are still very much there (anything with moving objects causes bad artifacts). I mean, TemporalAA is great for screenshots, but for fast motion I think it’s not quite there yet

The physics drop one will make it automatically tile.

The hand placed mesh one where you use the array to place them will also make it tile, but only down and to the right, so try to place things on the upper left border. of course without documentation it might be tricky to get without trying once or twice.

With TempAA off you’d see a dither pattern. but it would only show up on the intersection of meshes. But its pretty easy to bypass using a quality switch if you don’t want to use it.

Actually for high quality screenshots we just use highresshot which samples at a higher solution. TempAA doesn’t work for those.

RynaB - A few months back I was getting weird array out of bounds errors when trying to make depth textures. I’ll try it out later tonight in the 4.11 preview and report back.

Ok, I will take a look. Of course you can just place the meshes manually and use the “RenderNormalizedDepth” material and set the min/max manually if there is a problem.