NVIDIA GameWorks Integration

No worries… the fix is a hack anyway… I’m not sure if downstream from that there are functions that required for extra detail in the ocean. I have a branch of Waveworks and I can a pull request and see if that also gets their attention.

Great that it also worked for you…

anybody merging flex, flow, vxgi, hair and other branches for 4.16? I would love to have it. Thanks!

Hey, not sure if is the best place to be asking about , but I downloaded the 4.15 VXGI branch, and it compiles fine and all in Visual Studio. However, I want to make an installed build so I can distribute it to my team and also avoid engine recompilation whenever I make changes to my game code. I can get the UAT build process to succeed (using BuildGraph), but the editor crashes instantly when trying to start, and does not show any error messages or crash reports.

I found a minidump that I was able to load up and ran through the call stack after attaching the debugger, and found that it’s from an assertion failure from attempting to load the VXGI dll–likely an invalid path. I followed some steps from a few pages back in thread about removing Win32-related linkage and such since VXGI is obviously not supported for Win32, which is likely what led to problem in the first place…for instance, particular function is where the assertion happens:


#if WITH_GFSDK_VXGI

#include "WindowsPlatformProcess.h"

static void* VXGIDLLHandle = 0;
static int32 VXGIDLLHandleRefCount = 0;
static FCriticalSection VXGILoadCS;

void FWindowsPlatformMisc::LoadVxgiModule()
{
	if (FPlatformAtomics::InterlockedIncrement(&VXGIDLLHandleRefCount) == 1)
	{
		VXGILoadCS.Lock();
		check(VXGIDLLHandle == 0);
		FString VXGIBinariesRoot = FPaths::EngineDir() / TEXT("Binaries/ThirdParty/GameWorks/VXGI/");
#if UE_BUILD_DEBUG
#if PLATFORM_64BITS
		FString VXGIPath(VXGIBinariesRoot + TEXT("GFSDK_VXGId_x64.dll"));
#else
		//FString VXGIPath(VXGIBinariesRoot + TEXT("GFSDK_VXGId_x86.dll"));
		FString VXGIPath(VXGIBinariesRoot + TEXT("GFSDK_VXGId_x64.dll"));
		//FString VXGIPath(VXGIBinariesRoot + TEXT(""));
#endif
#else
#if PLATFORM_64BITS
		FString VXGIPath(VXGIBinariesRoot + TEXT("GFSDK_VXGI_x64.dll"));
#else
		//FString VXGIPath(VXGIBinariesRoot + TEXT("GFSDK_VXGI_x86.dll"));
		FString VXGIPath(VXGIBinariesRoot + TEXT("GFSDK_VXGI_x64.dll"));
		//FString VXGIPath(VXGIBinariesRoot + TEXT(""));
#endif
#endif
		VXGIDLLHandle = FPlatformProcess::GetDllHandle(*VXGIPath);
		check(VXGIDLLHandle);
		VXGILoadCS.Unlock();
	}
}

The thing is: I tried having the 64-bit dll load at all times (as can been seen in the code; the uncommented FString line. Initially, the empty quotes line was used) and it just produces the same problem. What exactly do I do ? I have tried so many things and have rebuilt the engine so many times and I am getting fatigued from waiting for 30-75 minutes for the process to finish each time. Has anyone had any luck making installed builds of the VXGI branch?

Unrelated answer, but I’ll highly recommend using the 4.14.3 VXGI branch if you wanna use VXGI for prod. I assume it comes from the Texture streaming major rework from 4.14 to 4.15 but VXGI hooks into the rendering aren’t working as intended. If you launch any sample with VFX(Matine demo, Shootergame,…), from smoke to particle , water splash effect, all of gets corrupted and the geometry explode all over the place.

I have just made a new 4.15.3 branch available, featuring Flex, Flow, Volumetric Lightning and the latest version of HairWorks from last week with MorphTarget support.
The various documentation and demo sample are also included.

updated link
https://github/MaximeDup/UnrealEngine/tree/4.15.3-Flex-HairWorks-Flow-VolumLight

Seems like neither me or my friend can access your branch, is also without VXGI?

VXGI isn’t ready for production development in its current 4.15 state, in my humble opinion. I would suggest using 4.14.3 if you want to develop with VXGI.

Yes I agree with that, hopefully if it gets released for 4.16 it will have some bug fixes (translucent CPU particles mainly).

D a m n, you made me realize i had it wrong with Github the entire time while sharing private repo. link.

link should work, given you’ve access to Nvidia Repo:
https://github/MaximeDup/UnrealEngine/tree/4.15.3-Flex-HairWorks-Flow-VolumLight

Could anyone confirm the link is working?

Yes it is :slight_smile:

Thanks !

Thanks, bro.

Looks like i forgot to exclude some libraries from github yesterday. If you had downloaded it yesterday and failed to compile i can link you a file with the missing libs in PM.

Otherwise the repository has been updated wit the missing libs.

I know you’ve mentioned VXGI doesn’t work well in 4.15 multiple times. I’m using only the VXAO part of it at the moment, just want to check with you if you have by any already tried merging VXGI with your current “4.15.3 : Flex - HairWorks(MorphTarget support) - Nv Volumetric Light - NvFlow” build? If they can work together, I’ll merge VXGI with your shared build and hope for the best :D. Cheers.

I have a 4.15.1 outdated (flex and flow aren’t up to date in it) which include VXGI, so it’s possible. The small project with Star Citizen ships i talked about a couple post above was made using branch.

User Bluearc actually reached out to me yesterday about the new HairWorks branch that included a couple fixes and the MorphTarget support. Therefore i made 4.15.3 branch yesterday using the most up to date 4.15 branch from Epic Game, and Nvidia branches.
I also wanted some backup on Github in case i want to play around with GameWorks.

I might actually push a seperate branch which include VXGI (and a tesselation fix i submitted to Nvidia github by pull request, but hasn’t been merged).
Also i would assume VXAO is also impacted by the current issues.

Hi!

question] is there a way to migrate fluidworks into UE4 16? or do you have to download a special version of UE4 with fluidworks integrated? I notice i have multiple versions of UE4 taking up 50 gbs of space, one with Flex support one without it. Maybe Nvidia could add Flex features to UE4’s marketplace, for simpler project integration purposes. and then Nvidia could update the features on their marketplace page.

Two things:
First, I found another null pointer reference in WaveWorks branch resulting in “Fatal error” on loading project. To fix it just replace lines 175-187 of file Engine\Source\Runtime\Engine\Private\WaveWorksRender.cpp with code:



float YAxisMultiplier = 1.0f;

if (WaveWorks->ShoreLineDistanceFieldTexture != nullptr) {
	FIntPoint RenderTargetSize(WaveWorks->ShoreLineDistanceFieldTexture->GetSurfaceWidth(), WaveWorks->ShoreLineDistanceFieldTexture->GetSurfaceHeight());
	if (RenderTargetSize.X > RenderTargetSize.Y)
	{
		// if the viewport is wider than it is tall
		YAxisMultiplier = RenderTargetSize.X / (float)RenderTargetSize.Y;
	}
}


I have already made pull request on Nvidia repository.

Second, if anyone is still interested in 4.15.1 then I have created a fork of Nvidia repository with UE 4.15.1 branch having merged:

@LukaszPJWSTK thank you, its working perfectly.

Appears most of Nvidia Flow plugin was not properly uploaded to Github on my merged branch. I’ve just commited the missing files and it should work fine now.
Downloading now to check for myself :stuck_out_tongue:

Guys I need help. I cannot integrate waveworks into UE4. Any step by step guides or videos?