Announcement

Collapse
No announcement yet.

Blueprint Only Fog Of War ! Using Render Target !

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    [TUTORIAL] Blueprint Only Fog Of War ! Using Render Target !

    A way to make fog of war using blueprints only ! Not Perfect But Works !

    I forgot to add i set the render target texture size to 2048 x 2048 "Smaller Is Better For Performance"
    Last edited by Pauly1986; 01-11-2018, 04:01 PM.

    #2
    Thank you so much for sharing this tutorial!
    I made a few changes and it's working brilliantly in RTS Game.

    Cheers!

    Comment


      #3
      Yes, thanks a ton for this tutorial! BTW FYI:
      - Fog_Mat needs Translucent blend mode
      - You can scale up the X/Y size of the Render Target if you are having issues with aliasing (those square chunks in Fog of War).

      I'll combine this with "Read Render Target UV" and a hidden fog of war to handle this for the enemy team AI as well!
      Click image for larger version

Name:	img.png
Views:	1
Size:	72.8 KB
ID:	1509139

      Comment


        #4
        Pauly1986, Thanks for sharing this, got it working in my turn based project with a little modding...

        Comment


          #5
          Click image for larger version

Name:	Help1.PNG
Views:	1
Size:	341.8 KB
ID:	1563220Click image for larger version

Name:	Help2.PNG
Views:	1
Size:	184.8 KB
ID:	1563221Click image for larger version

Name:	Help3.PNG
Views:	1
Size:	307.0 KB
ID:	1563222Click image for larger version

Name:	help5.PNG
Views:	1
Size:	48.9 KB
ID:	1563223Click image for larger version

Name:	Help4.PNG
Views:	1
Size:	132.0 KB
ID:	1563224 don' t know if people are still using this but I cant seem to get mine to work at all?

          Comment


            #6
            Thank you !

            Comment


              #7
              After spending countless hours, finally, I got to the solution how to get this script work in multiplayer.

              I am leaving a quick tutorial, how to do it:

              1) First things first, instead of adding an existing render target to Fog_Mat, convert texture sample to Parameter and called it (I called it 'RenderTargetTexture').

               
              Spoiler


              2) Next, instead of manually adding your Fog of War to a level, spawn it in your main Pawn (see the attached image).

               
              Spoiler


              3) Now, in your Fog of War actor, you should add 2 new variables called 'FogOfWarMaterial' which is Material Instance Dynamic and 'RenderTarget' which is, of course, Texture Render Target 2D.
              After that, change your Event Begin Play like in the attached screenshot below.

               
              Spoiler


              4) Finally, at the end of your 'DrawSubtract' event add a few nodes like in the screenshot.

               
              Spoiler


              I hope that I helped someone, I saw some people struggling with it.

              One more time, big thanks for Pauly the author of the main tutorial!

              Cheers!

              Comment

              Working...
              X