AFAIK GPU’s run both branches and discard the incorrect results.
HTH
AFAIK GPU’s run both branches and discard the incorrect results.
HTH
GPUs run their pixels in groups called ‘warps’ which are like simd vector lanes. If one whole warp has a condition and they all evaluate the same then it can branch effectively. If there are mixed conditions within the same warp then it has to do both and afterwards choose the correct result. It can be thought of spatially. If a group of pixels in one section of the screen are all going to have the same result it will be quicker than if they will possibly have different results. Depends on the effect really.
In my case with POM node, both branches are being evaluated even if all pixels on the screen have same condition.
@ > Now that 4.12 is officially out, Any news on the content examples with your amazing POM work?
It should be out, check content examples for a pom map.
You sure? Seems to end with 4.11.2 for me? Also can’t find anything in the docs section?
oh I guess we didn’t update content examples? they should be updated soon. I hear within the hour. Sorry for the delay on . It is a bit tricky to keep track of everything and one just fell through the cracks.
Ok, try restarting the launcher and check again. I just saw it say 4.12 for me so you should be able to see it now.
Yes! Downloading now. Thank you very much . Can’t wait to see the examples
I seem to get a fairly constant and reproducible driver crash if I pass a 4-field vector with a A component of 0 into the heightmap channel input (my height map was a separate texture, not stored in the alpha channel, so I had been using [1, 0, 0, 0] which would cause a driver crash 100% of the time).
Hunting that down as the cause was… Non-trivial.
@ >Content examples are pretty cool! The only thing I’m missing is a proper example of how to blend a 2 pom setup kinda properly (without too much swimming) but I guess it shouldn’t be too hard to figure out.
Now if only we got the news on Epic working on some kind of funky great realtime GI…imagine that :rolleyes:
Top is pure, bottom is parallax planes ||||||||||| with a masked POM, the front is just a maked plane with a normal map in front of those other planes
Also, would plane approach or interior mapping+pom be more efficient? Any other ideas how to fake type of object? Not doing polygons because it’s 80k right now, but I could maybe reduce it to 8k if I did planes with actual deformation, I wonder if that would be cheaper than pom and look better?
Album with more pics: Imgur: The magic of the Internet
Google Drive download with FBX/Textures: https://drive.google.com/file/d/0B7m3EkWf1vh6eEhodDFvY1VILTQ/view?usp=sharing
The material is just the heightmap, 0.03 into height ratio, a normal map, and opacity masked. Nothing fancy. I tried to mess with the reference plane to get it to line up better on the front with the grid, but it didn’t work.
EDIT: Decided to model wavy planes, is probably the best way to do it.
Hi guys , can anyone tell me pls how to use Lerp on the POM ? where can i put the lerp to control the effect ?
What exactly do want to control?
i like to control the the height depending on the mask , something like
Not sure why the node in the pic accept the lerp but the one we have now is different and doesn’t accept the lerp , may be the one in the pic is custom material function , but anyway i like to make a seamless grass/ carpet effect that have different height on some areas , in different word i like to add a mask to the height map that i use for MOP.
something like
Not sure what that function is, but its not Parallax Occlusion Mapping. POM requires a texture object sample which can be iteratively ray traced. The above node looks to be a copy of Bump offset.
You can control the height of POM by doing a Lerp on the “height ratio” input, but you must use a texture object for the heightmap itself.
is how you can control the height ratio by mask:
http://image.prntscr.com/image/f29f4efd8a88493faadbc68a208b8bd8.png
To blend several different heightmaps without noticeable floating, you would need to perform the blending inside the POM custom node at lines 12,37,62, but is advanced and you are not likely to need it.
Thank you guys for the answer as it worked , i have another problem hope you guys can give me an advice if there are an easy way to do it , as you can see in below image i want the area that got the mask to have zero height as now they look like its floating , the reason i am going to these hard way is becasue i don’t want to touch the original height map so i can tile the height map freely without tiling the mask .
so is there are a way i can let the area under the mask to get zero height map so it ill look like its deep and the area around it have height ?
You can tweak reference plane value for that.
I did but didn’t get a good result , i will try to bake the mask to the original height map or find another way . thanks mate for the help.