UE5.1 Simple Fog of War with Volumetric Fog using Distance Fields

Поделиться
HTML-код
  • Опубликовано: 15 ноя 2024

Комментарии • 27

  • @MrKosiej
    @MrKosiej  8 месяцев назад

    Check out my fog of war using arrays in materials
    ruclips.net/video/5QiJoXuvZYw/видео.html

  • @feedee1998
    @feedee1998 18 дней назад

    Hello, great video! Everything worked correctly and looks amazing, but now I’m implementing a tactical pause to give orders to the characters. While the game is paused and I move the camera, the fog displays strange rendering, as if it stops processing. I tried enabling "tick when paused" in both the material (time node) and the rest of the blueprints, but I didn’t get any results. Any idea what might be causing this? Cheers!

  • @zinger3max
    @zinger3max Год назад +1

    hey, really appreciate the video - question regarding the volumetric fog params, how would we handle various HoleSize values (unique for each actor)?

    • @MrKosiej
      @MrKosiej  Год назад

      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.

    • @itsteelworks
      @itsteelworks Год назад

      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

    • @itsteelworks
      @itsteelworks Год назад

      If canvasrendertarget2d is too technical you can probably achieve something similar with a capture actor and some filtering

  • @showd6229
    @showd6229 24 дня назад

    for some reason I'm not seeing any fog when I try this. I am in 5.4, which could be a reason, but I've changed the exponential fog (to have volumetric fog enabled and to reduce density to .001), I've replicated the material, but anything I apply the material/material instance (with your settings) to just becomes invisible, and there's nothing with the affect distance field lighting checkbox turned on. Any ides what could be going on?

    • @MrKosiej
      @MrKosiej  23 дня назад

      Hmm, i'm not sure. For now i can only suggest checking out scalability (it tends to disable fog on lower settings). Did you try this on a fresh project?

  • @m1kehiggs
    @m1kehiggs Год назад

    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!

  • @Novarcharesk
    @Novarcharesk 2 дня назад

    The 'implementation' part of this didn't make any sense to me. It needed a step by step method of how to take the material, what to assign it to, and what settings to change, and there basically was none of that. Any time anyone says 'you guys know what I'm talking about' or anything similar means there's a problem. No, not everyone will understand, and then they're left in the dark.

  • @VelocityZap
    @VelocityZap Год назад

    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
      @MrKosiej  Год назад

      Use "View Distance" in exponential height fog

    • @VelocityZap
      @VelocityZap Год назад

      @@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.

    • @sayrusan2127
      @sayrusan2127 Год назад

      @@VelocityZap you can tell me how you solved this problem . I also ran into her

  • @melchiorpietrasik7434
    @melchiorpietrasik7434 Год назад

    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 :)

    • @MrKosiej
      @MrKosiej  Год назад +1

      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 :)

    • @melchiorpietrasik7434
      @melchiorpietrasik7434 Год назад

      @@MrKosiej Thanks, I'll research dynamic materials. That sounds way better than my workaround :D

  • @sayrusan2127
    @sayrusan2127 Год назад

    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

    • @sayrusan2127
      @sayrusan2127 Год назад

      when the heat **HoleClarity** of this in -5 fog is poevlyaetsya and if the heat **HoleClarity*** 5 then the fog disappears visde

  • @橙柒-w7q
    @橙柒-w7q Год назад

    Hi! amazing tutorial, can i get this project ?

    • @MrKosiej
      @MrKosiej  Год назад

      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.

    • @橙柒-w7q
      @橙柒-w7q Год назад

      @@MrKosiejthanks,i'll support that

  • @ВиталийСазонов-я9у

    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?

    • @MrKosiej
      @MrKosiej  Год назад

      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?

    • @ВиталийСазонов-я9у
      @ВиталийСазонов-я9у Год назад +1

      @@MrKosiej Can I contact you in discord, reddit or telegram? I want to show you how it works for me, maybe you can help me

  • @ivomollov3073
    @ivomollov3073 8 месяцев назад

    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?

    • @MrKosiej
      @MrKosiej  8 месяцев назад

      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.