POM material

Wow, is amazing :slight_smile:
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)
13_pom_animation.gif

i tried using a negative Height Ratio which just seems to mess everything up :frowning:

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.

Hi - first thank you for the POM node. It works great and is pretty easy to use.

I do have a question regarding usage though. We just finished a set of ground materials and were testing it in UE4. The landscape looks great but we’d like to get some distanced base POM on the landscape mat. It’s pretty easy to get on a single Mat but is there anyway to get it on Landscape - preferable using the landscape layer nodes instead of something like vertex paint.

thanks for the help!

Hey
Thanks for the reply!
I was able to get everything working perfectly :slight_smile:

To get rid off the mirroring all i had to do was create a OpacityMask based on all the pixels that were using UV’s out of range.

Has anyone else having trouble with adding detail normals ? is my setup and i’m getting crazy pixels :

On the right of the picture you can see what I mean with crazy pixels

I need to fix up some bad advice from one of those tooltips.

Instead of using “offset only” hook “parallax UVs” into your multiply down low.

Not sure why exactly I got confused when i wrote those tooltips, sorry bout that :slight_smile: somebody in thread actually caught that for me a couple pages back.

Thank you so much !

Hey , just wanted to say awesome work with POM node, it’s amazing!

I was wondering if those content example materials you had posted a while back had made it into 4.10- just looking for a solid example of hooking up the “shadows” output from the node/seeing the proper way to setup the lighting for the “Light Vector” input!

Thanks!

Also very interested in the proper connections for shadow and light vector! :slight_smile:

What causes these artifacts?


I’m going to chalk it up to depth buffer precision.

hmmm I have no idea what I am looking at… that looks more like a bounding volume trace like VolumeDecals more than POM… are you trying to POM using virtual plane coordinates or somesuch?
If you can post some more info like a small thumbnail of your heightmap and what the actual geometry looks (above shape looks like a cube, but the UVs appear to not be a cube so I have no idea) it will help us debug.

Hi ,
Firstly, I’d like to thank you for sharing POM function. But what is a proper way to get it working with tri-planar texturing? What I’ve done so far is modifying WorldAlignedTexture node to calculate it 3 times, however it results in correct parallax direction only on one side of the cube. Other sides have parallax direction inverted.


How can i overcome ? And do I actually need to calculate the parallax 3 times for ?
Thanks in advance!

Hello, first of all I really love it! I’ve been playing around with it, and I’m impressed.
I have a little question about the “offset only” function. In my case I have two normal maps (main with height map, and second just a detail with more tiling) and I wish I could make them bumped with that height map.
I would love to understand more in detail what should I actually do since the tip in description is quite confusing for me, and can’t figure it out. From description that looks exactly what I’m aiming for:

“Use when you want to use t he offsets with textures that need a different tiling factor than the heightmap.
You need to multiply the offset by the tiling ratio between the surfaces. Ie, if the Heightmap had a tiling of 1, and a second overlay detail texture had a tiling factor of 8, you need to multiply Offset value by 8 before adding it to the UVs of the detail texture.”

I would really appreciate any more help, if not best would be some illustration. Thanks in advance.

That ‘advice’ I gave in the tooltip is just wrong. You can take the “parallax UVs” output and multiply it by another number to tile it more and it will work fine. I am going to fix that wording in the node soon.

Also currently triplanar mapping requires a modification to the tracer. Right now it is transforming the view ray into tangent space. For triplanar POM you will need to do POM three separate times like you guessed.

But it also needs a custom transform for the 2 side faces (XZ and YZ). I think some kind of swizzle operation will work there but I haven’t tested it out yet. is a nontrivial amount of things to add I am not really sure about adding support for it in the node since it would require new inputs and it would probably be so expensive it would be almost guaranteed to get cut from any shipping product.

The simplest way to expose it yourself is to go into the function and find the camera vector that goes into the “world to tangent” transform. Delete that transform and add a new function input called “Custom Camera Vector”. Then you can do the custom swizzles for each of the sides and plug in the different camera vector for each of the tri planar samples.

Actually I just realized somebody made a material function called “TriPlanar Camera Vector”. see if you have it… if so those vectors might work here.

Okay, Thank you so much :slight_smile: I will give it a try.

Yeah, triplanar would be great for environment elements, so I’m also waiting for someone to figure it out, hehe :wink:

Hey, nice shader. Thanks:cool:
Purely as an experiment:


Light Shaft Oclusion

We have huge issues inclusing crashes and driver time timeouts when using POM with cyliderical mesh. I can reproduce by applying POM to basic Sphere mesh. What could cause kind of bug?

I am not sure.

The only time I have seen such a crash was when using a local version of POM that tried to perform some of the calculations on the CustomUVs and then it only seemed to happen when using pixel depth offset. But I have never seen it with the vanilla POM node. Maybe some strange driver combo??

Does it happen with Pixel Depth Offset disabled? If not, does it happen when “Manual Texture Size” is set to true?

Also which version are you using? last suggestion is a longshot, but maybe you have the old version that failed to compile on macs. If the custom node inside of the POM has a line “int i;” try making it say int i = 0;