Everyone and their mom just calls everything similar to , “tesselation”, so POM doesn’t really get much credit and attention. POM is definitely great, and should be focused on, it’s so cheap and adds so much. Please write here, where I ask Epic for a word on the many of us are having with the current POM setup: A better way of referensing 2d sheets through Custom node (fix POM plz) - Feedback & Requests - Epic Developer Community Forums
Will do!
As far as I know, we have three ways of adding depth to our materials: Tessellation, BumpOffset and POM. The best of the three, in my opinion, is POM.
Great! Hopefully we can finally get an answer from Epic.
Agree, Tesselation Displacement works great for some stuff, but I think POM is more versatile as it works way better with small details, also it’s very cheap.
maybe I don’t fully understand the problem (I haven’t tried POM shader),
but can’t you sample a CustomTexture? i.e. make a TextureObjectParameter and feed to it your heightmap, and then make a Custom node where you sample it
I’ve been able to sample textures in HLSL like in the past, I’m sure it should be possible to do it here
Each has their uses and limitations. I wouldn’t necessarily say POM is the best. Tessellation has advantages over POM, but requires a well tessellated mesh to begin with to be able to obtain the detail, but you get shadows, proper decal placement, proper raycast hit (if you want per poly), etc. POM has issues with these, except maybe self shadowing. I never liked in cryengine for example where they used POM on the terrain, sure it looked nice from one perspective, but looked awful from others and when u shoot at it, u get floating decals.
That’s because Parallax mapping is one of those things that always looks like a good idea initially on paper, and then the more you try to fix the stretching and the bugs and the obvious artifacts like edge silhouettes and how it can’t properly receive shadows, the more you realize there’s a reason almost no triple A game has or will ever ship with it. Often you can just brute force the actual polys and end up with something faster anyway, without ever having to sit there and fiddle with any of .
It’s why so many people are so interested in a crack free realtime tesselation solution. If it weren’t for cracks/obvious popping it would be faster and much, much simpler to just throw displacement maps and actual polys at the problem.
Cryengine with all it’s weakness and limitation does one without problems. And almost any game developed by it uses POM for things like terrain, decals and roads.
POM can modify the depth buffer if done right, which makes receiving shadows work fine, and there are several ways to fix silhouette issues, albeit not perfectly IIRC, but it’s better than not having the effect at all.
Many games use POM, It’s not exactly a new technique.
I shouldn’t have cut down my comment…Well, what I actually wanted to say is that in many cases I would prefer POM and Tessellation. Both work better in different scenarios, but for example Tessellation requires a medium-poly mesh to begin with. So very simple meshes can’t use Tessellation. In many cases a combination of both would the best way I guess. Use Tessellation for that and in other cases POM for that.
I used CE3 and I used POM as well as Tessellation a lot. I haven’t had too many issues with decals, sometimes yes, but since most of the POM materials were subtle it wasn’t as bad as it could have been.
Greetings,
Dakraid
Um, I’ve performed many tests with tessellation, and in almost all the cases I know of, it sucked performance like no tomorrow. I even tried tessellating a mesh with 100,000 polygons and using a very low tessellation multiplier, but that barely output at 30 frames per second. POM is still king, until I get enough money for a GTX 970.
I tried tessellation for a landscape, anything bigger than 500m by 500m gives me unplayable frame rates with dynamic shadowing on the terrain. I don’t understand why, it barely adds any triangles and it’s just tessellated in a small radius around the player. Running an OC’d IB i5 and a GTX 760. I’m not unconvinced that there isn’t some bug with .
So I started working with POM, performance is better, but still not what I was expecting. Is there anything other than samples we can tweak in the code to increase performance with Eha’s code? I’m using 15 samples min and 25 max. I’m currently making the parallax calculation 3 times for 3 different heightmaps in my landscape material, and FPS drops from 120 (no POM) to 60-80 (3 calcs) with nothing else in the scene, but the base pass doesn’t have many instructions. I know nothing about HLSL, so I’ve kind of hit a brick wall.
That performance loss is way bigger than I experienced. I lost maybe 10 frames per second when i did a test earlier using 2k maps and 2 materials, max samples at 30 and min at maybe 20 or so. I used it on a vast landscape and tried it on a GTX 970 and a Radeon 7970 and had similar results.
I’m using 4K heightmaps, guess I’m just expecting too much. I’ll have to use lower resolution displacement textures since my material uses 16 heightmaps.
Also, is there any effective way to get rid of texture swimming? Is detecting oblique angles and then falling back to a non-POM texture going to look normal?
EDIT: Going from 4K to 2K increases FPS by one or two.
oooo is awesome I am glad somebody got function working as a custom node as it was a pain working with those long material loop chains.
fwiw, the cobblestone alpha you used on page1 was made from an in-editor material function for making brick and tile textures. I was almost done with that as a content example project when I lost a ton of work due to a hard drive crash. Data recovery got most of the stuff back but the project containing all the materials is a mess since a bunch of random bits were not able to be r
here’s a video of what that looks like:
https://www.youtube.com/watch?v=HDqAwQQ1f1Q
I decided to rewrite node from scratch without any reference. I have it working pretty well now.
After I got my version working I went back and tried out the version in thread. I noticed I can drop a few ms from the render time by replacing the following line:
CurrSample = InNumSamples + 1;
with “break;”
It looks like that is what it was trying to do but with the existing code it still requires the GPU to look at the loop and evaluate the expression an extra time.
Also you can get another speed boost by using >= on the very first compare, since as it stands right now, the first hit will always fail even when the heigthmap value is 1. By skipping that step in addition to the above break command should be a decent boost. Or just add a tiny fraction to the starting ray height.
Nice thanks for that , I am using shader quite extensively, so will help give me a little FPS boost
It’s almost ready. Got soft shadows working thanks to temporalAA shifting the light angle:
The shadows are a tad noisy due to the tempAA which I don’t like.
I almost have a version that doesn’t need TempAA using “proper” cone trace approximation working. It gives really nice smooth shadows on the ground, but introduces horrible stepping on the curved surfaces. I’m sure I will figure it out eventually:
edit, ok that was quick. still a bunch of cleanup so calling it for now but should have something to post tomorrow.
The tiny bit of artifacting that is left is from web compression since I copied the height image from here. Notice the blocks on the slopes.
Wow, that is awesome!
Looks great! Will work with multiple height maps in the same material, for landscape layers? That was always the biggest problem for me using the old method.
That looks fantastic, !