Hi, this time we have a fog of war using a volumetric fog with distance fields, so a combination of my previous videos Metaballs: • UE5 Simple Metaball sh... Volumetric Fog: • UE5.1 Placeable Volume...
Hey, it's a bit more tricky. The fog material is changing its pixels opacity based on the proximity to distance fields (talking about holes, the rest is vector noise), not actor per se, so we can't really use a parameter for that. We would have to have a dynamic array of actors inside the material and i'm not aware of any way of doing that (please let me know if you find a way :v). So the only way i can think of is just increasing the size of distance field actor, but it should work fine if you implement it as i showed at the end of the video, so having a separate actor just for distance field and removing it from render passes.
Passing actual hole array data might be possible with the custom primitive data stuff, but ultimately it would end up being way easier to use a canvasrendertarget2d as a mask for the fog and paint to it from the actors if you want to have variable holes
Thanks for the tutorial! I couldn't find anything else that looks at this issue. I got it to work in UE5, but for some reason in UE4.27 the "Hole Clarity" is setting the real fog clarity, and "Fog Clarity" doesn't effect anything. Also in UE4.27 I cant seem to get the fog hole to work at all, setting "Affect Distance Field Lighting" does not seem to do anything, even when the parameters are set up. Not sure if I just messed something up, but if anyone got it to work in UE4.27 would be great to know how!
Hey, I was experimenting with the material you've created and I really liked the idea of using volumetric fog as a "fog of war". However, I want to be able to manipulate it at the runtime and I am not experienced in the materials. At this point, I thought about hacking it and just having material variations with different params that I can swap in the static mesh, but I would love to hear your ideas if you've thought about it :)
You can easily modify it at runtime, it's just a material applied to a mesh, cube in this case. You can covert it to a blueprint and set dynamic material instance at begin play then just modify it through parameters. Dynamic materials are quite easy to grasp, google it and you should have a clear idea on how to do it :)
Hi there. I followed all the steps but my characters dont seem to push away the fog and when i turn on shadows of the spawned meshes I see they are stuck at the initial spawn location. Any idea how to fix that?
I don't know what could be the issue but if the mesh doesn't affect the fog at all, then make sure the system is properly configured and distance field is enabled. Use debug visualizers to check that. If he mesh doesn't move with the character, make sure it's properly attached. Otherwise maybe a tick issue, but not very likely.
Hi, I love your tutorials! Very useful. Question, my material fog is disappearing if my camera goes away from the cube (fog of war area). Is there anything that I can do to prevent the culling distance or how did you set it up in a way that makes it not disappear?
@@MrKosiej Yes, already have played with that. -Have it maxed out but it's not enough. I'm guessing this type of Fog War Method isn't applicable for large-scale map modes?- Edit: Nevermind, ended up finding a way to get it all to work now to my desires.
Hi! Great tutorial, but I have a question. When you disable shadow casting for static mesh, affect distance field lighting is disabled. How did you pull this off?
I can change cast shadow and affect distance field lighting on static mesh actor independently, one does not affect the other. Where do you see that it's disabled?
No :D I test multiple systems on single projects and i modify them a lot, so you wouldn't get too much out of it anyway. Maybe i'll set a system someday to store my projects for future reference.
hello, tell me your wishes. I 've done everything as you have in the lesson, but I can 't put the radius of an empty place in the fog . if I put the numbers then the fog disappears altogether how do I fix it