For me it worked at UE4 22.3 the shared fork from Juancahf.
Is it possible to do this or similar in BPs?? No matter how much I try, I don’t fully understand code. And having a piece of my game that I don’t fully understand how it works is something I cannot live with.
How to check in this case is point is covered by fog?
Huge thanks to for this wonderful tutorial!
Is it OK to use it in our projects as is? If not, that’s cool, I’ll write my own based on the concepts here, but I’ve already tested this in a demo project and it works very nicely as written! I don’t want to step on anyone’s toes in terms of copyright, etc.
Question:
In the FogOfWarManager.cpp file, in the definition of the method UpdateTextureRegions, we call the macro ENQUEUE_UNIQUE_RENDER_COMMAND_TWOPARAMETER with the first parameter being “UpdateTextureRegionsData”. That doesn’t seem to be declared/defined anywhere. What is that?
For anyone looking at this part of the code, the macro ENQUEUE_UNIQUE_RENDER_COMMAND_TWOPARAMETER is deprecated in 4.23. Use the following instead:
ENQUEUE_RENDER_COMMAND(FUpdateTextureRegionsData)(
[RegionData = RegionData, bFreeData = bFreeData](FRHICommandListImmediate& RHICmdList)
{
for (uint32 RegionIndex = 0; RegionIndex < RegionData->NumRegions; ++RegionIndex)
{
int32 CurrentFirstMip = RegionData->Texture2DResource->GetCurrentFirstMip();
if (RegionData->MipIndex >= CurrentFirstMip)
{
RHIUpdateTexture2D(
RegionData->Texture2DResource->GetTexture2DRHI(),
RegionData->MipIndex - CurrentFirstMip,
RegionData->Regions[RegionIndex],
RegionData->SrcPitch,
RegionData->SrcData
- RegionData->Regions[RegionIndex].SrcY * RegionData->SrcPitch
- RegionData->Regions[RegionIndex].SrcX * RegionData->SrcBpp
);
}
}
if (bFreeData)
{
FMemory::Free(RegionData->Regions);
FMemory::Free(RegionData->SrcData);
}
delete RegionData;
});
Nice tutorial added to favorites very interesting,
Anyone have an updated link to the project files? The one @Juancahf posted is sadly dead
A long time ago, the tutorial on this thread helped me to get started prototyping in unreal engine. Probably not the easiest project to learn how the engine works, but it was really fun to make the entire thing work and to learn different ways of doing the same thing. Realizing that there is still people interested in the project I am thinking that it could be nice to post my work so I can help others in the same way the author of this thread did.
I don’t want to hijack this thread so I will be making a new one with my solution. My idea is to write a tutorial covering the basics, explaining how it works and the logic behind the many moving parts of the project. I will start the tutorial this weekend and over the course of the following month I will finish the thing.
The idea would be to have something like this:
[EDIT]
I am also posting the old links to the projects:
FOW and FOWFork
But getting them to run is a real pain.
I got it working for UE4 4.26 and I uploaded this on GitHub @** **if you don’t mind since people were asking for updated project links and this is breaking. Everyone, please contribute to the project if you can.
You can download it here and contribute ^
anyone found anything to make this work in multiplayer ?
can you upload a 4.25 version ? the 4.26 wont load correctly
I’m having random flickering lights with 4.26 version, anyone else experiencing it?
Yes, I’m having the same problem. Anyone find a fix?
Hi there!
First of all - many thanks for the solution!
Can anyone explain how can I extend the map size for FOW ? I’ve tried to use it on a small map and faced only with the crash problem which I’ve fixed in C++, but when I switch to a huge map I’ve found some border with the effect on them from actor which reveals fog looks like an overflow…
Did you guys find a fix ?
My fix was to switch to the Journeyman’s MiniMaps plugin.
Hey all, just wanted to say thanks, this thing works great. I’ve got the 4.26 version noted above working well in 4.27 with just a few edits to the #include statements needed.