After rereading the presentation it seems that it’s using reverted heighmap where surface is 0 and deepest end is 1. So for typical heightmaps would mean max mipmap generation instead. Sorry for confusion.
Just sparking some conversation here…
Do you think it would be possible to write a version of parallax mapping that would push up instead of down? I’m thinking that if you use a box as your surface with the bottom polygon as the plane, then the raised polygons of the sides and top of the box would allow you to render pixels at a height above the plane. I’m thinking aloud here and will need to sketch through the tracing math to see if the inverse of it would work.
Now that I think about it, it would be very similar to a volumetric decal but with the ‘distance’ in 2d only.
Yes that is really easy to add. I had it done at one point and crashed and forgot to re add it. All you have to do is add a portion of the initial UVDist value into the offset. If you subtract it, the POM will be up instead of down.
I might give it a go with a box and try it with a 0.5 mid point based heighmap so we can have parallax in both directions.
Hey , can you identify what POM method cryengine 3 uses?
it’s very efficient…
but I’m sure that with your amazing and hard work you will get better results ![]()
post contains all I know about that (not much):
There are really only a few possibilities though when it comes to curvature. Either they are baking a curvature texturemap under the hood and then using that initial curvature value to bend the ray at a constant rate (slightly cheaper), or they could be actually tracing through the curvature map at each step and re-transforming the ray. Or they could be doing the same thing with a VertexNormal texturemap and tangent vector map. Those are way easier to bake but more expensive to trace since it requires three texture lookups at each iteration. If you are saying its efficient then they are probably using a real curvature map. I am not quite ready to analytically render a curvature map myself (although i’ve been trying off and on) but if we get something from Xnormal that should be possible soon. But I am not sure how that data is normalized since its possible for curvatures to go over 1. More to research. If anybody has more info let me know.
So I tried (without the LightVector) and then I got result, and with the LightVector I get an error as you can see in the first image.
What am I doing wrong? ![]()
Those links are both the same and they look related to the pixel depth offset not being the correct value. Can you post a screenshot of your material?
Oh yeah! Sorry for that, the first link was intended to be of the material.
Here is the material: Screenshot - 577e0943509cfc05c7448a23913fe753 - Gyazo
EDIT: I know there’s an error, and I read on the documentation that the LightVector is deprecated, so I tried to use a collection parameter but i got the same results.
You cannot use light vector in an opaque material in a deferred renderer like UE4. You need to manually create the light vector using a blueprint. I suggest using a material parameter collection to share the value between multiple materials. With a collection param make sure you mask RGB since it will try to pass a v4 RGBA.
The “manual texture size” is not the dimensions of the textures, it is how big one 0-1 tile is in worldspace. That number is definitely wrong and that is why the intersection with the cylinder looks wrong in your animated image.
Oh, alright. Thanks. ![]()
I have another question, why doesn’t it react well with lighting? happens when I place a point like near the mesh with POM. It receives lighting very well when I place it at the same position as the mesh, but I won’t always be able to do that.
I think it’s probably me who did something wrong though, I have “Render Shadows”, “Specify Manual Texture Size” and “Use World Coordinates” off.
EDIT: I noticed it’s because of Pixel Depth Offset. Is there any workaround? I really like it. ![]()
Depth offset needs to be fixed on Epic side. Not sure on timeline tought.
Volumetric decals…you know what that means?!
Parallax bullet holes!!!
Go give that idea to the Unreal Tournament team ASAP if they haven’t been trying already.
Parallax pseudo-decals are easy (showdown used them and I believe UT already uses a version of them), but actually poking holes in walls using decals or parallax is another challenge altogether.
Wow, is amazing ![]()
what i was wondering, is it possible to remove the mirroring effect at the edges of the texture?
Also, how would i use the function to make the geometry appear popped out like ? (CryEngine)

i tried using a negative Height Ratio which just seems to mess everything up ![]()
I am not sure what mirroring effect you are talking about, can you post an example?
For the second question, that was an oversight on my part. I meant to include a ‘reference height’ input but just forgot. Thankfully it is really easy to add.
Basically, inside the POM function, need to take the UVDist value that has been multiplied by HeightRatio and add a fraction of that into the UVs before going into the customnode. Also note that that ‘new UV’ node has to be added to the result of the custom node since the custom node returns only the offsets.
The new nodes here are the ‘Multiply’ (with the tooltip), the scalar plugged into that, and the “Add” node downstream from the multiply.
With that setup, a scalar parameter of 0 would give you the current behavior. A scalar of -1 would offset up instead of down. A scalar of -0.5 would offset from the middle.
It would probably make more sense to multiply by constant -1 and do a 1-x so that the scalar was instead 0=bottom, 1=top but I didn’t want to clutter up the already cluttered image. But when I do add I’ll make the numbers more sensible.
Note: with the above method there are some artifacts when the camera goes inside of the virtual box that the “up offset” creates. As of yet I don’t know an easy way to fix without some naive distance mask hack. It is probably best to use a collision the size of the virtual top of the POM in that case since it really doesn’t make sense for the camera to go inside of that projected volume.
Is there known problem with ios and 4.9? POM node is crashing iPad air using gles2.0 backend even thought we have level switch and node itself have that too. If I manually remove that node then its fine.
Yes, fixed in most recent hotfix. issue was int i was no initialized to 0 which mac cared about.
