Oh gosh, I know this was a while ago, but are you OK now?
A self-shadowing blueprint light source sounds pretty awesome! Also, Daniel W. commented on that POM thread, saying a Pixel Depth Offset material node is coming in UE 4.8: this will allow you to push pixels back into the screen, making post-process Ambient Occlusion possible. If you can use it, this will be huge.
Sorry, I tried to find a better solution than a simple fresnel falloff, and I just couldn’t. I tried pixel depth, a combination of pixel depth and fresnel, and even just hard-coding the samples, but nothing improved performance better than fresnel by itself: more samples at oblique angles, less samples when viewed head-on. I think the reason for this is the majority of screenspace for a material like this will be viewed head on, and only a small portion of the screen will glance the edges. Also, the instruction count is much lower than if you wanted to combine another distance-based system to eliminate ridiculous sampling in the background. Even one extra instruction performed worse than simply allowing the samples to accumulate in the distance. You can still try your own solutions, though.
Just a question regarding what my eyes are seeing.
Can we perhaps have a wireframe shot of one of the screens?
Flat quad, I’m pretty sure. POM is a pixel parallax operation, not a vertex displacement one.
That is correct.
Yip. Why im curious to see a wireframe. I’ve never seen POM go beyond the limits of the silhouette.
The last time i saw POM was using Cryengine and also as you can see in the first picture the borders are retained.
So i’m curious to see a wireframe cause technically i should only see a plane or a sphere.
And im assuming the loss of respect for borders is caused by this thing called sillhoute clipping…
which then also makes me wonder how tileable textures behave
If this system has a interface like plug in your map and select value then yes i would buy it.
Great! I really want to get my huge landscape to have working POM without having to deal with the problems we’ve had with referencing height maps in the other thread. I’ll buy it as soon as it’s out, my only concern is that marketplace submissions are so awfully slow that it’ll be quite a while before it’s available. Any idea when you will submit it to Epic? Also do you have any plans on releasing it though some other distribution method? So we don’t have to wait three months for Epic to release it.
The POM shader in the other thread has silhouette clipping too, but it’s so basic it doesn’t work within itself, and doesn’t work when you tile the texture. I tried writing it so it does, but it only worked for me in one direction, and not within itself. This one seems to be capable of clipping within itself, so the pixels glancing the surface will be capable of rendering the object behind it instead of flattening out the POM calculation.
Also wondering how it would work on terrain when blending it with something that doesnt have this POM.
I read somewhere that 2 blending layers don’t work so well when POM is involved
Its not that im against the idea of this, its just that after seeing content on the marketplace being released with half of the features you would think should be compulsory for that specific asset i am very skeptical about anything on the marketplace or going to the marketplace. And im hoping asking a lot of questions and pointing out potential let downs or flaws could help the creator add features they perhaps forgot about.
I expect to go gold in the next week or two! After that it’s up to the Marketplace process.
Not particularly, thanks for asking though. I’m too disabled to hold down a desk job. I have constant severe head pain (waiting on a neurologist appointment) and when it gets bad just surviving the day feels like an accomplishment. I’m on painkillers strong enough that I sometimes don’t notice when I’m burning myself on the oven. I’m also struggling with complex PTSD and a possible heart condition among other things. If I ever disappear for a period please just assume it’s health and not that I’ve given up on anything I’m doing.
I will definitely add that as soon as it’s out! I don’t think it would even be difficult to include.
Sounds like you’re having the same difficulties I am. Might scrap this part.
The screenshots are of the material editor default shapes. This is 100% pixel displacement using the mesh surface as a canvas. No vertices are being moved. If you wanted to get some really bizarre and unique effects you could move the vertices too!
My only concern with direct purchases is the fact that I plan to provide updates and I don’t think I can manually keep track of customers as a sole proprietor without it sucking up a disproportionate amount of time (especially since direct contact with people stresses me out). I’ll see if there are any good solutions to this and update everyone here, because I don’t want to wait 3 months either!
I’m also going to be setting up a Patreon soon (I finally feel comfortable doing so after they kicked 8chan/ED off). The primary reward for backers will be early access to basically whatever I’m working on at the moment, whether it be new graphics tech or music draughts or sky]scraper alpha builds.
The way mine works is you can set arbitrary UV clipping borders. Using those, the material function outputs a 1 bit mask that you can then send to your opacity output, or process however you like. This lets you set the clipping points to something more complex than just constants in case you want a specific effect. It’s still not as perfect as true geometry (nothing will be) but it’s the most robust solution I’ve seen. It also avoids that “black fin” problem certain setups will get when wrapping UVs around a cylinder or what have you.
The workaround for the custom node brokenness can cause issues with multiple POM materials in one graph but I’m using shared samplers which seems to sidestep that. I will update here when I do the terrain/blending tests. Of course, there will be always be additional considerations and some aesthetic tweaking required to get multiple POM/non-POM materials to look correct together, since you’re relying on an optical illusion.
Great questions all! Thanks for being so communicative.
SF: For other distribution methods, you could look at Sellfy; they have a good thing where the item is bought, and if you upload another version, the people that have paid for it already can re-download it for no cost. Not exactly an “updater” per se, but its another option for you.
I’m looking forward to this shader btw. Thanks for tackling this!
Just added the first version of self-shadowing!
Here’s a visualization of the displaced heights I’ll use as an example. White is closer to the camera:
This is an unmodified /Engine/MapTemplates/TestCard being displayed on a flat quad. I like to use TestCard with a really large parallax scale for debugging because it demonstrates a bunch of worst case scenarios (nearly-vertical drops, axis-unaligned shapes, high frequency surfaces, and thin features to be exact). You can assume that any examples I show using TestCard will look even better with typical assets, or assets authored with POM’s limitations in mind.
(Just multiply this by a fraction to get lighter shadows, or leave as-is for a very stark comic book lighting effect)
Soft shadowing raised to the power of 3:
The shadow layer is its own output so you can use it in your PBR or unlit material workflows however you like. This flexibility even allows you to process the shadows separately. Imagine a small amethyst structure letting glassy purple light through, or a magical water structure forming and casting panned caustic patterns on itself!
It also includes a tweakable shadow offset so you can trade artifacts for accuracy as you like, or do weird effects.
Note too how unlike most solutions which assume a directional light vector, the shadows are distorted as if emanating from a point source. This makes the effect much more convincing on large surfaces. The function simply takes a world space position as input. This is a huge advantage if you have multiple self shadowed materials, as it means you don’t need to calculate and pass a different light vector to each one in the blueprints. If you want a directional light, you can simply pass in a light source position relative to the the pixel position. Want to simulate a flickering fire? Just jitter the position input over time! You can also do neat glitch effects by passing in positions which change per-pixel in unrealistic ways. Maybe a phantom that emits light but causes shadows that ripple?
Next I’m going to add support for light sources of varying widths. Will update with results!
Experimented with penumbra estimation for soft shadows. It added a huge amount of graph complexity for a relatively minor effect. Couldn’t get it to a state I’d be happy with in a timely manner so I’m shelving that feature for now. May or may not come back in a future version.
This looks pretty amazing! I’m excited to see this being implemented with such care and precision.
Hey look, working POM on landscapes!!
Big thanks to mAlkAv!An for pointing out the bug preventing this from working in the other thread. What a ridiculous naming collision!
This gonna be good !
holy moly. amazing stuff.
So I experimented further with the issue that causes POM to look totally flat on terrain. It’s not actually the naming collision mAlkAv!An pointed out after all! I’m not sure what it is, but it reoccurs after editor restarts even if I named the heightmap texture object parameter something like “flippitygibbert”. If I then rename it again, it’ll go back to working. This definitely seems to be an engine bug, and worth noting if you plan to use this on terrain.
So anyway, I updated the silhouette clipping to no longer generate an opacity mask, it just discards pixels it shouldn’t care about. I do this in two passes: First to discard anything outside of the user-specified UV boundaries, and again to carve out the edges defined by the parallax effect. This is easier to set up for the user, needs way fewer wires, and provides some great early-outs. I’m making sure that the ray tracer terminates as soon as it realizes a pixel won’t be used. This also means (I think?) that said pixels will be culled from the depth buffer like they should be, preventing them from interfering with other effects, and no longer requiring you to use a “masked” material. The results are really good! Here are some shots of just the shadow layer on a flat surface:
These are with reasonable sample values too, I didn’t turn them way up for the screenshot.
Worth noting: Contrary to what’s been said in the other thread, samples can be quite expensive, especially since these loops involve dependent texture fetches. ATI specifically recommends people use procedurals or conditional branching in lieu of sampling values wherever possible these days. Clipping can also be expensive, but it’s of most concern on older hardware where you probably wouldn’t be using this effect anyway.
Speaking of shadows, here are some examples of shadows from a point light on terrain!
I’ll try it with a less distractingly noisy heightmap some time, but you can see the ridges darkening on faces shielded from the light source, as well as how the light vector is being determined per-pixel in world space (this also makes the Blueprint setup much easier). All I’m doing is raising the shadow output to an aesthetically pleasing power, then multiplying it with my AO map. They’re never going to be physically accurate for PBR, but they still do a great job of conveying believable shape. You can of course use the shadows however you want, since they’re output separately. This means they work especially nicely with stylized environments, “fake” lighting, or all-emissive workflows (imagine this + hard shadows in a cel shaded game!).
Here’s a more typical use case. Look at how nice the definition on the bricks becomes:
More to come soon!
Really hope the landscape issue can be fixed though, being able to use proper POM on landscape is important for our project.
I haven’t tested it with packaged projects. It’s possible the flatten-on-reset thing only happens inside the editor.