Right, but S7 is different from S6, and I am sure a lot of people still going to keep their S6 (I personally can’t justify upgrading to S7). So, the questing is if it will perform well on S6. There is a game on Gear VR called Dreadhalls (built with Unity) that allegedly uses POM effect a lot. It runs pretty smooth on S6.
I never had a S7 to test on, I only have a nexus 6p. AFAIK they are pretty much the same GPU in terms of raw perf. I had to optimize for the 6p anyways. It ran faster on the 6p but only because we ran at higher res on the final device. Had to run to somebody else’s office once in a while to verify on device.
if I have some time later today I can try firing up a POM material in the 6p. I probably only have it for a few days until somebody from QA snags it back.
Well, Gear VR works with S6/S6 edge/S6 Edge+/Note5 and S7 (which isn’t out yet afaik, but available for preorders). S6 and S7 (for NA and China at least) have different SoCs.
But yes, it would be nice to know how it performs on your 6p in VR rendering 
I dont have any mobile VR to test on. I can test it on the 6p in regular style. but shader cost doesn’t really go up with VR like object count does. I am not sure where the 6p is in terms of the performance hierarchy. I know very little about smart phones. My phone is the 20 dollar kind.
, did you ever find out if it’s possible to achieve rotated POM decals?
Would be useful for putting them on walls and whatnot.
I could only get it to work using a blueprint and using a virtual plane for the POM orientation. That way you can specify the tangent vectors as three vector parameters. will work for decals on flat surfaces but I am afraid it will not work very well for surfaces that have deformation. Even if it could, you’d see some pretty bad distortion artifacts without using real curvature data.
Thanks I got it to work
The custom rotator didn’t output a third component because its a v2 output, so the B component mask errored. I figured out that when rotating it around Z, its tangent space so B is (0,0,1) so I plugged that in. Made me wonder why the third component is used in the divide in the viewtrace length section. I’m guessing it has something to do with changing the length of the tangent vector after its been normalized?
Can’t wait to try with the performance bump. Then I need to see where I can optimize as figure out nice ways to handle blending/masking (something similar to the height blend/mask from kite demo) or a simple max.
I think I’ll call technique POM-BOMB.
I was going to be using to procedurally create cool natural ground materials from a small amount of input textures. Today I discovered wang tiling from someone on reddit…
…so I might try that as well
The divide by Z is how we make it create a ray with enough length to always hit the bottom of the virtual floor that we are projecting downwards. At glancing angles, ray length approaches infinity as Z approaches 0.
right here is one of the biggest differences between POM and bumpoffset. Bumpoffset does not do the divide by Z which reduces the height along the horizon which also helps to hide artifacts.
I made graphic to explain something different in relation to pixel depth offset but I think it still shows point:
On the left is a normalized ray without divide by Z. you can see even if you scale it to the desired height it will not hit the floor at glancing angles without adjustment.
The comment about product is a bit unnecessary in case. The Z is simply the tangent space camera vector Z.
Nice one! However, is there a way to also use a mask so that the sand(?) blends more naturally with rocks?
I would probably perform a heightlerp with the sand and rocks using the height of the rocks as the height texture. To clarify, the heightmap needs to be looked up with parallax UVs as well.
There will be some minor floating artifacts with the sand but if the color fairly float like above it will make it hard to tell. You can also try doing things like soft bumpoffset on the sand where it meets the rocks. as long as the height change is gradual bump offset will work ok. Sadly you can’t really use POM for that part since there is no way to raytrace the painted layer weight. If it was only textures defining the boundaries then you could do a combination POM and get a perfect result but it would be slow and require some tweaks to the custom node code.
fwiw the content example map prepared for 4.12 has an example of height lerp using POM. In that example I put the POM onto the second layer as well to avoid the floating but that won’t work in all cases.
Found on Slideshare:
Slide 25-26 are about silhouette POM in CryEngine.
Maybe useful :rolleyes:
Hi ,
Could you or anyone else with the know-how give some clarity on the method by which you’d accomplish ? I’m having trouble getting POM to work consistently at all really, even on regular meshes.
I use the masked blend mode for the trim material for nice edges but naturally that doesn’t make a difference from regular opaque. My textures are nonsquare for the trim if that makes a difference! 2048x128. You can see it works fine however on the main road which is using a square texture.
Edit:
I would love to be able to do myself, too. They mention in a youtube comment that it’s just a matter of using the “correct node setup” to allow rotatable POM decals, but from everything I’m reading here it seems like there’s more to it.
As a side note, I’m a rendering tech artist so no need to beat around the bush with abstractions or what have you. I just don’t know blueprint as well as I should ![]()
Hmm I am not sure what the is with the above shot. Typically that is what it looks like when you try to use WorldCoordinates without checking the world coordinates box… maybe in case you are doing the opposite and have worldcoordinates set to true when it should be false?
It is just regular static mesh geometry right? Should be nothing special required to make a material like that work. A picture of the node graph would help to debug.
I will try and post some info on the decal thing later but I have a lot on my plate atm.
you aren’t trying to use anything other than UV0 are you? ue4 only supports a tangent basis for UV0 so it goes without saying that POM will only work on UV0 coordinates (or world coordinates which bypass the transform). Technically it would be possible to use other UVs but would require multiple chains of hacks so I won’t even go into it.
Thanks for the reply
Any input on decals is appreciated if it’s not too much trouble. I definitely feel you on being busy lol
For good measure I plugged up a bool and manually set it to false. is all one static mesh btw and the materials are set up pretty standard with a multi-sub mat in 3ds max, but yes it’s using UV0. I’ll keep plugging away!
Ah I see what is happening. Looks like POM isn’t handling non uniform texture scaling at all. Should be relatively easy fix. Simply have to squash the post-transform ray by the same scaling factor. Will try to get a solution tomorrow.
Here is the solution to non-uniform scaled POM:

The blue box on the right is the only addition. Simply place the divide inline.
The non uniform parameter should match the scaling of the mesh.
Thanks for
It works great!
Awesome work you are doing. Currently experimenting with POM, is it possible to change it to accept vectors for texture maps, so you can combine some textures before hand and use their multiplier as input for POM?
Unfortunately, that is not possible. POM Works by being able to ray trace through the texture. That means that from the starting point the shader needs to be able to march towards the camera vector and read new neighbor pixels at each step. When you pass a vector you dont have that ability, all reference to its texture is gone and you simply have the data at that point which does not help for POM.
The only way to do what you are asking correctly is to actually pass each individual texture object to the shader and have it ray trace all of them together and also pass in the height params for each. means you would even need to pass in a texture of your blend mask and raytrace that too. There is no way to perform any kind of parallax when blending using vertex colors . but that is a very common and usually not that noticeable as long as you don’t use and really deep POM heights.
One way to get a cheap version of :
Make 2 POM materials with separate height maps and everything. But use a mask to crossfade the height values of them so that as one reaches 0, the other reaches its max.
Then supply the parallax UVs to the same heightmaps so you can sample parallax height. Then simply check which surface is higher and use that one. You can use the IF node. if you go back a few pages I showed a method almost exactly like that here already.
Believe me, I wish was possible too. One method is to simply pre-combine your blended heights in photoshop or something. I know you might lose resolution but its an option.

