Parallax Occlusion Optimization - Advanced Materials - Episode 15

  Рет қаралды 22,611

Ben Cloward

Ben Cloward

Күн бұрын

Пікірлер
@snakeywakey4109
@snakeywakey4109 Жыл бұрын
This not only increased my performance, but also somehow removed some of the serious artefacting i had!
@3DWithLairdWT
@3DWithLairdWT Жыл бұрын
I always look forward to your videos! I don't doubt that following your channel helped me break into my first industry position, and I still learn something new with each one. Thanks for all you do!
@BenCloward
@BenCloward Жыл бұрын
That's awesome! Really glad I could help.
@jonilo8792
@jonilo8792 Жыл бұрын
Best channel on KZbin. Thanks Ben!
@ActualJRod
@ActualJRod Жыл бұрын
Brilliant video, I'll be employing this immediately!
@devmishra18
@devmishra18 Жыл бұрын
Texture instead of a constant value for steps! Why didn't I think of that. Thank you so much! PS. Those Cobblestone textures are legendary. I think I saw them even in your old HLSL series. Almost as old as the channel :D.
@BenCloward
@BenCloward Жыл бұрын
Hah! Yes, I made that cobblestones texture set like 18 years ago and use them in just about everything. Too lazy to look for something else. :P
@Kolyasisan
@Kolyasisan Жыл бұрын
Curious! Never worked in-depth with POM and I always assumed that it's a linear loop that is better not be disturbed to support constant unrolling. But now dug through the code and saw that it's dynamic, so might as well reduce the sample count under specific cases anyways. Love your channel, got to it after watching your excellent Anthem talk, thank you!
@da-mor
@da-mor Жыл бұрын
Great tutorial as usual! Thank you very much!
@ErikBorchersVR
@ErikBorchersVR Жыл бұрын
I just found your channel Ben. Amazing content! I’m working on my first indie VR game for Meta Quest 2 in Unity and I’ve been using urp shader graph for all my shaders. I learned shader basics from Freya Holmer’s KZbin channel a few weeks ago. It’s great to see you have so many videos on advanced techniques 🙂
@dreamisover9813
@dreamisover9813 Жыл бұрын
These videos are so good!
@GeeCeeAte
@GeeCeeAte Жыл бұрын
Absolutley A+! amazing! thank you so much!
@morganlak4337
@morganlak4337 Жыл бұрын
wow I'm only halfway through, but these optimizations feel really obvious in hindsight lol. I did a bunch of experiments with POM last year and ultimately gave up on it due to cost, but this helps so much. Great video!
@mlecz
@mlecz Жыл бұрын
It would be amazing if you brought up the topic of 'silhouette parallax occlusion mapping' and showed how to implement it from scratch in UE4.
@mrmensje1
@mrmensje1 Жыл бұрын
this would be amazing!
@dylankuzmick3122
@dylankuzmick3122 Жыл бұрын
Holy… I didn’t even know this existed. I’m trying to figure out a way to make better twig silhouettes for a SUPER high detail tree and even with nanite available, I can’t assemble models with the polygons required before bringing into unreal (it would be like 200M tris at least for a big spruce). A material displacement method (not using vertices) like POM would work great if it can do silhouettes. Tutorial would be amazing! Edit: this is for VFX, definitely not games lol. Also I'm not a big fan of premade opacity cards since they don't look great from every angle, but with Ben's other videos I might try to make that work instead. A sillhouette displacement method tutorial without tesselation would be great though!
@DanielElliott3d
@DanielElliott3d Жыл бұрын
Does this reference a particular paper or specific technique? The only thing I could find was a cryengine shader called sillouette POM and also a paper from AMD that raycasts prisms... developer.amd.com/wordpress/media/2012/10/Dachsbacher-Tatarchuk-Prism_Parallax_Occlusion_Mapping_with_Accurate_Silhouette_Generation%28SI3D07%29.pdf
@mlecz
@mlecz Жыл бұрын
@@DanielElliott3d There are a couple of approaches to solving this problem, this is one of them: www.cs.nthu.edu.tw/~chunfa/PG08_1258.pdf
@ra-di2wu
@ra-di2wu Жыл бұрын
Thanks, these optimizations helped me develop my POM system that works fairly well with a distance of about 8 units. It would be great to take a look at blending POM between multiple landscape textures, as they appear to float above each other. Perhaps something like including multiple textures in the POM core loop and raymarching all of them and taking the "highest" one. But it would seem that the other textures need pulled down into the screen as if they are the lower parts of the texture that's winning.
@LuxAlibi
@LuxAlibi Жыл бұрын
Thank you for your great tutorials! When I try to apply parallax occlusion on an object that is not based on a main flat surface I get very weird effects: I tried to make some bumpy moss on some rocks, but the result was quite bad 😞 Is it me doing something wrong or this method doesn't work well when the material is applied on a complex shape mesh? Thank you
@TechArtAlex
@TechArtAlex Жыл бұрын
Simple PoM casts its rays based on the assumption that the surface is flat. You can get acceptable results on surfaces that have gentle curves (like terrain), but the more curved a surface is, the worse artifacts you will have. The greater the offset is, the worse artifacts you will have. If you stick to a small offset amount, and mainly offset down/inward and not up/outward, you can get acceptable results on even fairly curved surfaces.
@cgcowboy
@cgcowboy Жыл бұрын
Fantastic! Any chance you would do a video combining this technique with your Interior Mapping content to simulate geometry in an interior-mapped room? For instance, showing a chair in the middle of the room using a parallax effect.
@GreasyBirb
@GreasyBirb Жыл бұрын
Any chance you can cover Cone Step Mapping as an alternate to POM?
@bovineox1111
@bovineox1111 11 ай бұрын
Nice. I wonder if near objects when filling the screen st flat angles the cost is spiky or whether balanced out 🤔 I tried this on quest two ages back and it ate the gpu but I think that was a alternative method still, wort another look, especially from q3
@dxiii5056
@dxiii5056 Жыл бұрын
Hello sir Ben, can i ask, How to use Parallax Occlusion Mapping for Triplanar Project? i have tried combine 3 faces with use only 1 time sample but still fail, it only working in Z face, X Y is not :( Help me please.... Thanks for reading, sorry for my English
@sarabuajay1938
@sarabuajay1938 Жыл бұрын
Hi ben love your tutorial can you do a tutorial on stone wall texture tile repetition from bridge textures
@Sweenus987
@Sweenus987 Жыл бұрын
What would the performance difference be between this an tesselation?
@dylankuzmick3122
@dylankuzmick3122 Жыл бұрын
It depends on the scale you’re working at. POM works great for larger objects that need lots of detail like terrains. Tessellation has relatively similar performance impacts to polygon count, because essentially tessellation is adding polygons. Tessellating a 4km landscape makes no sense. But for smaller objects, say a tree trunk, it works out very nicely. POM is generally for flattish surfaces and won’t let you make nice silhouettes on corners. Think of the corner of a brick wall, it goes in and out with the grooves, a look that POM can’t really do. POM is also great if you don’t want to even deal with bad topology or anything, it just “works.” The advantage of tessellation and POM is that you don’t have to deal with all the headaches of high poly models until the very end when you see it in engine, and you can easily scale it depending on hardware. Tessellation at landscape scale is dumb and hurts performance, but at small scale is very nice. POM is somewhat okay at any scale but you kinda get diminishing returns as you scale down, better just to represent with triangles at a certain point. What exactly that point is I’m not 100% sure (though it somewhat depends on your specific hardware) but I just like to use POM sparingly where triangles start to become an issue and where it makes sense to do so (flat stuff w/straight/no corners)
@GhtPTR
@GhtPTR Жыл бұрын
@@dylankuzmick3122 UE5 doesn't care about polycount anymore but your reply is enlightening nonetheless. I personaly like it better to use a height map in the modeling tools displacement deform tools because it's easier but hey! you got me thinking 🤔
@dylankuzmick3122
@dylankuzmick3122 Жыл бұрын
@@GhtPTR Very true, but in fact UE5 doesn't actually have dynamic tesselation as a feature anymore, they got rid of it (except virtual heighfield meshes which tessalate only terrains based on a faloff distance, but that's an edge case I hardly use because of POM anyway, even in UE5). Regarding heightmaps, absolutely, I use them all the time! Sometimes people confuse displacement and tesselation since they go so hand in hand. Tesselation subdivides geo and adds triangles (realtime tesselation removed in UE5), displacement moves the geomety's verteces up and down based on the colors and uv mapping of the heightmap (in UE it's called WPO). Usually adding more tesselation gives more detailed displacement, but since realtime tesselation isn't a thing in UE5, you have to make sure your geometry has enough verteces when imported into the engine to look nice. One thing to note though is that you CAN add tesselation to meshes in UE5 using the mesh editing tools, but you really should bake it (which takes a couple minutes depending on the tri count) and enable Nanite for it to not slow your system down. If you're working with meshes you've made yourself, it's usually faster to do this in your DCC of choice (Blender, Maya, ect.) instead of Unreal. Also, for general reference, I find that for a 2X2m plane, I need to add at least 2-4 million tris for it to look comparible to POM, and even still it's not quite there (depending on the steps for POM shader and the angle you look). Though I would guess that with Nanite enabled it would perform better than POM at this scale. While Nanite is amazing, I wouldn't do anything more than 10 million tris with it, simply because it takes FOREVER to load into the engine, and it takes about as long to bake meshes. What I like to do is take a bunch of blank 2x2 or 4x4m planes with 5-10million tris each, and just stack them next to each other. Then I apply a displacement material to all of them with global UV mapping (so you don't notice that they're individual planes). For small-medium sized scenes where you don't need landscape mesh features and you want some real displacement instead of POM, this can work wonders. I often like to mix and layer this technique with landscape meshes using POM for larger scenes. As a last note, given that Nanite is such a beast, I use Nanite + displacement (aka WPO) for pretty much everything except for large, planar objects that can't easily be broken into peices and that I won't see the silhouette of. So far I've yet to encounter such a mesh besides my main landscapes, so I've personally only used POM for Unreal's landscape meshes. Everything else I personally use Nanite, but maybe you'll find a situation in which POM suits you better.
@Genebriss
@Genebriss Ай бұрын
@@GhtPTR UE5 doesn't care about its game running at 30 FPS either because the marketing is the only thing that matters
@tufisaydin
@tufisaydin 13 күн бұрын
Best shader channel !!! is it have depth offset how can we make it? someone said you can convert your .shadergraph to .shader with "View Generated Shader" and edit it manually. Can you do that?
@impheris
@impheris Жыл бұрын
this is AAA stuffs, thank you!
@antonovivan3008
@antonovivan3008 Жыл бұрын
Hey Ben, thank you for the tutorial. I am wondering how the LOD input works in Unity? I tried to test it by myself and seems like it has nothing common with LOD Group component settings. Seems like it works the way Parallax Mapping linearly becomes flat when it's LOD input value is between (LOD Threshold) value and (LOD Threshold+1) value. So probably I can easily use distance from camera calculation plugged in LOD input to make Parallax Occlusion being flat on distance. I am wondering if it can make the material even more optimized than you did at this video? Or it just affects the POM amplitude value and does nothing for performance?
@nishblr6522
@nishblr6522 Жыл бұрын
There is one thing I don't understand. When you connect both two multiplied masks straight to the base color and move away on a distance- the object becomes black. But how could it be, if we have a ceiling node at the end of all multiplications? I mean, you said the ceiling node would round the number to one, but on a distance I got black color. The first mask works correctly and never goes lower than one (the object is always white), but the second mask goes to black on a distance, having a ceiling at the end, after the all masks multiplication. I mean, this is how it should work in the best conditions, but I don't understand the math here (having a ceiling at the end, we somehow get black(0)).
@importon
@importon Жыл бұрын
Very cool! could this be used with a render target to create a dynamic damage effect?
@joantonio6331
@joantonio6331 Жыл бұрын
How does parallax performance compare with nanite?
@TheDevBlock
@TheDevBlock Жыл бұрын
I could be wrong, but you can't change shader complexity only changing camera distance and switch steps or so on. It still will have same number of instructions. Only way to optimize material its use different simplyfied mats between lods, or iаm wrong?
@BenCloward
@BenCloward Жыл бұрын
This is one of those cases where instruction counts are very deceptive. Just judging by the instruction count, you could easily make the conclusion that you can't change performance based on distance. But in this case, the parallax node is using a for loop internally, and the instruction count only shows you the maximum instructions. If you change the number of steps dynamically, it actually DOES reduce the number of loops it's doing in the for loop, so it ends up making it a LOT cheaper. But don't take my word for it. Try it out for yourself and verify!
@TheDevBlock
@TheDevBlock Жыл бұрын
@@BenCloward Thank you Ben) will make some tests with this technique with different type of shaders.
@foodcuisinepoint
@foodcuisinepoint Жыл бұрын
I watched your Post Process Cartoon Outlines - Shader Graph Basics - Episode 57 and I am facing a problem in the hd sample buffer node in unity. It does not give clear texture in the sky. My outlines just stick in the sky. They are not cleared every frame. please help
@BenCloward
@BenCloward Жыл бұрын
If I knew the solution to your question that you posted on the other video, I would have answered it there. I didn't answer it because I don't know. This is something that I could probably figure out given time, but unfortunately, I don't have time to investigate and solve this issue for you. If someone else has a solution, they're more likely to post it under the other video.
@3dsmax_metronomus480
@3dsmax_metronomus480 Жыл бұрын
Dear Ben, do parallax materials work with trim sheets (multiple textures on one sheet and mesh cut up into pieces) or just tiled textures? I am having issues to get trimsheets to work properly with pom. Somehow the pom doesn’t know when a trim ends and bleeds into the next one on the sheet. I asked on discord and somebody said that one would have to change uv mapping?!
@quartermaster2809
@quartermaster2809 7 ай бұрын
That's just how trim textures work, if the uv mapping is off for the mesh, the texture will have other parts of it appearing on it. For example if we have a simple trim texture, top half being red and bottom half being blue - the way UVs are mapped should be done properly, because if a little bit of it goes up or down that part will be visible on the mesh. You can use modeling tools in UE5 to change it if you're in that engine or just opening the model in blender to move the UVs.
@muhammetemirbulut6511
@muhammetemirbulut6511 20 күн бұрын
Yeah very good
@Theironlefty
@Theironlefty Жыл бұрын
A question is it cheaper to use the Fresnel node instead of the custom view + dot product shown in the video?
@BenCloward
@BenCloward Жыл бұрын
It may be a TINY bit cheaper to use the custom method but the difference will be so small it won't be measurable. But of course the best answer to every "is it cheaper" question is to test it!
@dannys_85
@dannys_85 Жыл бұрын
I believe that it would be better in the end to clamp the steps to the max value lets say 120 max what do you think? Ben good video as always.
@BenCloward
@BenCloward Жыл бұрын
I'm not sure I completely understand what you're saying - but the best thing to do if you have an idea for improving it is to compare it and see. Try what I'm showing and then try your idea and see which ones gives you better performance. I go over methods for performance measurement in this video: studio.kzbin.infoiQLBbcqNv2E/edit
@ArkTemplarioMaster
@ArkTemplarioMaster Жыл бұрын
If I use texture normal plus tessellation, I think it's more expensive and you get almost the same effect, is this a better alternative in terms of performance? Or I'm wrong
@BenCloward
@BenCloward Жыл бұрын
That's a really good question and I image the answer may be different depending on the hardware. Only way to know is to test it!
@Trass3r
@Trass3r Жыл бұрын
See for example this excellent talk: kzbin.info/www/bejne/eHWUq4uNbLqtbrM
@Slu2112
@Slu2112 5 ай бұрын
will it work on mobile?
@BenCloward
@BenCloward 5 ай бұрын
Yes, but you'd probably need to use it very sparingly and keep the max sample count very low. May not be worth it, but you'll need to be the judge because it depends on how it's being used.
@alexanderalikin1210
@alexanderalikin1210 Жыл бұрын
Last video was about sand, not about parallax. Or am I missing something?
@BenCloward
@BenCloward Жыл бұрын
Yes, you are correct. The episode right before this one was about sand. Did I make a mistake and say somewhere that it was something else? I think I mentioned that I had done a previous video about parallax mapping. That video is here: kzbin.info/www/bejne/rZSThKeDp5h2h9E
@alexanderalikin1210
@alexanderalikin1210 Жыл бұрын
@@BenCloward oh, I got it now, thanks.
@Trass3r
@Trass3r Жыл бұрын
TLDR: reduce the number of steps based on viewing angle and distance from the surface. Thanks for the video! :)
@ItsBaffledd
@ItsBaffledd Жыл бұрын
How are you going to be rude and then say thanks?
@winnie8614
@winnie8614 Ай бұрын
To be honest, distant part of plane looks bad with this "optimisation" when you are close to the surface
Glass Shader - Advanced Materials - Episode 16
25:43
Ben Cloward
Рет қаралды 20 М.
Quando A Diferença De Altura É Muito Grande 😲😂
00:12
Mari Maria
Рет қаралды 45 МЛН
小丑女COCO的审判。#天使 #小丑 #超人不会飞
00:53
超人不会飞
Рет қаралды 16 МЛН
Гениальное изобретение из обычного стаканчика!
00:31
Лютая физика | Олимпиадная физика
Рет қаралды 4,8 МЛН
The Best Band 😅 #toshleh #viralshort
00:11
Toshleh
Рет қаралды 22 МЛН
Parallax Occlusion Mapping | 5-Minute Materials [UE5]
15:21
PrismaticaDev
Рет қаралды 14 М.
significantly speed up renders in blender
4:52
CGMatter
Рет қаралды 31 М.
Parallax Occlusion Mapping in Blender // Tutorial
11:09
Default Cube
Рет қаралды 54 М.
Parallax Occlusion Mapping - showed & explained !!!!!
7:11
mohsen zare
Рет қаралды 7 М.
Unreal Engine 5 - Parallax Occlusion Mapping Tutorial
16:38
renderBucket
Рет қаралды 57 М.
how this game made millions of rooms using 1 polygon
4:57
Stylized Station
Рет қаралды 2,2 МЛН
Iridescent Bubble Shader - Advanced Materials - Episode 19
29:59
Ben Cloward
Рет қаралды 19 М.
Understanding Texture Maps - Shader Graph Basics - Episode 5
29:06
Quando A Diferença De Altura É Muito Grande 😲😂
00:12
Mari Maria
Рет қаралды 45 МЛН