NVIDIA GameWorks Integration

Removed Hairworks but still got packaging issues. Nvflow has been updated to the latest version. I made short video of what is possible to do with 4.16 pre-release build.
Mixing Epic Game 4.16 volumetric fog and lights with nvidia volumetric lights. Using Flex, Flow, etc…

v=KFu_Ke6R78w

Because you either are not logged into github or you havent linked your github account to your epic one:

https://www.unrealengine/ue4-on-github

hey guys, another vxgi: https://gyazo/4104062b944ccb5561dac815732f0b17 does anyone know how to “fix” or is it also one of 4.15 exclusive bugs

. or anyone can guide me that material painting on the landscape can be done on which branch before I download any branch. Unfortunately, i can’t do that in VXGI 4.13 and 4.14

Again, you’ve no idea how much i would love to use VXGI on 4.15/4.16, as it’s the only affordable/free real-time GI we can have as Indie developper while multi-million dollar game company use advanced enlighten UE4 integration for real time GI. It’s looking stunning and the performance are really good if properly tuned.
It’s a big deal for a lot of people, but to be clear, i’m not sure VXGI is a priority for Nvidia right now, if you want the full , full Vxgi experience in every scenario, you should stick to 4.14.3, no doubt about that.
If my game project wasn’t relying on some newly added i would still develop my game in 4.14.3.

I remember looking into your and failing to reproduce it in 4.14 if i remember properly.

What do you mean by that?

Guys, can I have some help? I’ve tried implementing waveworks but it just wont work. I have made a video of what I did, including errors at the end. Important timestamps are in the description:watch?v=ldEe518jGsg
Thanks-
MG

ETA on 4.16 releases besides flow?

Thanks!

Hi,

The first error it´s libs compiled and linked to the vs 2015, and can´t find the linkage function exported because for Windows it’s VS 2015. The Second error the UHT refuses to compile because shader compiler project failed and it’s an requisite first.
My advices it’s change to,
get Visual Studio 2015 for UE4 and libraries compatibility, and project packaging. Install .
get Build Tools 2015 Update 3 The release is also available via a standalone Build Tools 2015 Update 3 installer. Install .
get Windows SDK 8.1 Windows SDK 8.1 if not full instaled in your system.
get Windows SDK 10 for new upcomings changes, install if you want.

My advice it’s You extract Waveworks zip file run setup.bat, and again extract Waveworks zip file and overwrite the last extracted folder, and not run the setup.bat after .

Seems Flex 4.16 is available now.

I have a problem with the substance plugin and vxgi (since 4.13)
I have been able to compile it, when i launch UE4 i do get the plugin in the plugin menu and i’m able to use it and import substance material…but none of the parameters are working anymore.

I feel like i’am the only one ever disapointed about problem and i really wonder why…because Substance+VXGI both at the same time would be quite a dream to me!

Question.

Is NVflow just a plugin? do I need to still compile the engine source?

Thanks

Still need to compile engine source. Minimal engine modifications are made to expose interfaces the plugin needs.

Flex and Flow both work wonderfully on 4.16 and package without any.

Thanks for also getting Flex for 4.16 out quickly. I see that Volumetric Lighting is also available for 4.16 now but I’m not sure I will use that now that UE4 has its own stuff for in 4.16.

Wow is great that we can now have both Nvidia Volumetric Lighting and actual UE stock Volumetric Lighting, Nvidia for actual shafts, UE for volumetric particle material.

Hello,

I just tried to use the FleX 4.16 build from their official repository (/tree/FleX-4.16.0).
However, it seems I’m doing something wrong since I get those errors during my build on the UE4.sln:

I’ve followed those steps so far:

Anyone got the same? Or am I missing something?

Many thanks in advance!
-Reelie

that’s a UE4 bug,

In D3D12StateCachePrivate.h Line 716

: D3D12_STATE_CACHE_INLINE void FD3D12StateCacheBase::SetPipelineState(FD3D12PipelineState* PSO)
change to
: D3D12_STATE_CACHE_INLINE void SetPipelineState(FD3D12PipelineState* PSO)

and I think you good to go.

Hey,

Engine\Source\Runtime\Renderer\Private\ShadowRendering.cpp in function: void FProjectedShadowInfo::SetupProjectionStencilMask

From line 797
to line 825

the

#if WITH_FLEX
#else
#endif //Flex

It produce error if not with flex, and the function gets broken because the terminate brackets gets removed from the for or if, really dono what You trying to achieve .



		// if rendering modulated shadows mask out subject mesh elements to prevent self shadowing.
		if (bMobileModulatedProjections && !CVarEnableModulatedSelfShadow.GetValueOnRenderThread())
		{
			DrawRenderState.SetDepthStencilState(
				TStaticDepthStencilState<
				false, CF_DepthNearOrEqual,
				true, CF_Always, SO_Keep, SO_Keep, SO_Replace,
				true, CF_Always, SO_Keep, SO_Keep, SO_Replace,
				0xff, 0xff
				>::GetRHI());
			DrawRenderState.SetStencilRef(0);

			FDepthDrawingPolicyFactory::ContextType Context(DDM_AllOccluders, false);
			for (int32 MeshBatchIndex = 0; MeshBatchIndex < DynamicSubjectMeshElements.Num(); MeshBatchIndex++)
			{
				const FMeshBatchAndRelevance& MeshBatchAndRelevance = DynamicSubjectMeshElements[MeshBatchIndex];
#if WITH_FLEX
		if (!MeshBatchAndRelevance.PrimitiveSceneProxy->IsFlexFluidSurface())
		{
				const FMeshBatch& MeshBatch = *MeshBatchAndRelevance.Mesh;
				FDepthDrawingPolicyFactory::DrawDynamicMesh(RHICmdList, *View, Context, MeshBatch, true, DrawRenderState, MeshBatchAndRelevance.PrimitiveSceneProxy, MeshBatch.BatchHitProxyId);
			}

			for (int32 ElementIndex = 0; ElementIndex < StaticSubjectMeshElements.Num(); ++ElementIndex)
			{
				const FStaticMesh& StaticMesh = *StaticSubjectMeshElements[ElementIndex].Mesh;
				FDepthDrawingPolicyFactory::DrawStaticMesh(
					RHICmdList,
					*View,
					FDepthDrawingPolicyFactory::ContextType(DDM_AllOccluders, false),
					StaticMesh,
					StaticMesh.bRequiresPerElementVisibility ? View->StaticMeshBatchVisibility[StaticMesh.Id] : ((1ull << StaticMesh.Elements.Num()) - 1),
					true,
					DrawRenderState,
					StaticMesh.PrimitiveSceneInfo->Proxy,
					StaticMesh.BatchHitProxyId,
					false
				);
			}
		}
#else
		const FMeshBatch& MeshBatch = *MeshBatchAndRelevance.Mesh;
		FShadowDepthDrawingPolicyFactory::DrawDynamicMesh(RHICmdList, *FoundView, Context, MeshBatch, false, true, MeshBatchAndRelevance.PrimitiveSceneProxy, MeshBatch.BatchHitProxyId);
#endif
	}
	}


Can be changed to , and can achieve what You mean in the code?



		// if rendering modulated shadows mask out subject mesh elements to prevent self shadowing.
		if (bMobileModulatedProjections && !CVarEnableModulatedSelfShadow.GetValueOnRenderThread())
		{
			DrawRenderState.SetDepthStencilState(
				TStaticDepthStencilState<
				false, CF_DepthNearOrEqual,
				true, CF_Always, SO_Keep, SO_Keep, SO_Replace,
				true, CF_Always, SO_Keep, SO_Keep, SO_Replace,
				0xff, 0xff
				>::GetRHI());
			DrawRenderState.SetStencilRef(0);

			FDepthDrawingPolicyFactory::ContextType Context(DDM_AllOccluders, false);

			for (int32 MeshBatchIndex = 0; MeshBatchIndex < DynamicSubjectMeshElements.Num(); MeshBatchIndex++)
			{

				const FMeshBatchAndRelevance& MeshBatchAndRelevance = DynamicSubjectMeshElements[MeshBatchIndex];

				const FMeshBatch& MeshBatch = *MeshBatchAndRelevance.Mesh;

				// // // // // // // // // // // // // //
				// 		NVCHANGE_BEGIN: Add  Flex
				// // // // // // // // // // // // // //
#if WITH_FLEX
				if (!MeshBatchAndRelevance.PrimitiveSceneProxy->IsFlexFluidSurface())
				{
					FDepthDrawingPolicyFactory::DrawDynamicMesh(RHICmdList, *View, Context, MeshBatch, true, DrawRenderState, MeshBatchAndRelevance.PrimitiveSceneProxy, MeshBatch.BatchHitProxyId);
				}
#else
				FDepthDrawingPolicyFactory::DrawDynamicMesh(RHICmdList, *View, Context, MeshBatch, true, DrawRenderState, MeshBatchAndRelevance.PrimitiveSceneProxy, MeshBatch.BatchHitProxyId);
#endif
				// // // // // // // // // // // // // //
				// 		NVCHANGE_END: Add Flex
				// // // // // // // // // // // // // //

			}

			for (int32 ElementIndex = 0; ElementIndex < StaticSubjectMeshElements.Num(); ++ElementIndex)
			{
				const FStaticMesh& StaticMesh = *StaticSubjectMeshElements[ElementIndex].Mesh;
				FDepthDrawingPolicyFactory::DrawStaticMesh(
					RHICmdList,
					*View,
					FDepthDrawingPolicyFactory::ContextType(DDM_AllOccluders, false),
					StaticMesh,
					StaticMesh.bRequiresPerElementVisibility ? View->StaticMeshBatchVisibility[StaticMesh.Id] : ((1ull << StaticMesh.Elements.Num()) - 1),
					true,
					DrawRenderState,
					StaticMesh.PrimitiveSceneInfo->Proxy,
					StaticMesh.BatchHitProxyId,
					false
				);
			}
		}


Great! It was the solution. Many thanks!
-Reelie