NVIDIA GameWorks Integration

@ - It was on my test map.
I believe it is not your recent revision - I see I downloaded it on 30th of April.
I have forward shading disabled, but project was initially set for mobile but then I’ve changed a lot of settings to be sure VXGI will show up (for some reason I had problem with that) so maybe it was some random rendering setting.

““Originally posted by **** View Post
. is your hairworks okay? i mean. Hairs are not showing in rendered video. But in viewport i can see them allright.”” Question was .

I’m really sorry. Building whole city is hell of a work! i got lost in my work.
I rendered video using sequencer. In majaladon or other demos or rendering just fine. But in my level they’re not showing up. For a second. I thought it was bounds scale problem. But i guess not.

I noticed that Nvidia pushed 4.18 and 4.19 versions of Volumetric Lighting into github:
https://github/NvPhysX/UnrealEng…cLighting-4.18
https://github/NvPhysX/UnrealEng…cLighting-4.19

I’ve merged Nvidia’s 4.19 VL into:
)
Now repo contains Blast + Flow + HairWorks 1.4 + HBAO+ 4 + TXAA 3 + Volumetric Lighting + VXGI 2. I’ve removed the previous additional 4.19 merge with VL (from 4.17) as it’s pointless to keep two identical branches up-to-date.

There were some fixes for TXAA after that date so you might want to try newer version. Also note the mention above, if you need to update, use the 4.19-GameWorks branch instead as it contains now the same tech as old -VL branch.

@ - Sure, thanks for info.

Hey can someone please help me with Nvidia volumetric lighting? I have the engine built fine, no problems there, Just can’t get good settings with accurate beams! Does anyone know any settings for an effect similar to fallout 4? Any help would be greatly appreciated!!! Thanks :slight_smile:

So with r.VXGI.range being removed and replaced with r.VXGI.MapSizeX (any Y,Z)… Performance kinda stinks. What I mean is, to get lighting in a respectable range, you have to crank that up. As soon as you have a map size of 128 or higher, poof, there go your frame rates. I’ve juggled between various settings combos with r.VXGI.MapSize and r.VXGI.VoxelSize. With a respectable frame rate of ~60 in a basic scene with a single directional light blasting through windows (demo scene from volumetric lighting), I’m using a map size of 64 and a voxel size of 64. Lighting only seems effective at around 40 meters. It goes dark beyond that.

Are there any magic numbers to tweak that won’t effect performance too much? I know I’m dreaming, but hoping I’m just missing/forgetting something! That quality is acceptable with those current settings for an interactive game scenario, but I’d like to lower the voxel size a bit. Of course, when you do that, the distance of lighting drops drastically. I’m afraid of raising diffuse tracing intensity, because it might blow out other things in the PBR pipeline. I’d rather not have to change the typical way of authoring assets.

[edit]

Derp on my part- even if one cranks up the diffuse indirect lighting intensity, it has no effect on lighting distance.

Also, I came across thread over at Nvidia:
https://devtalk.nvidia/default/topic/1031155/general-graphics-programming/vxgi-fallback-diffuse-ambient-color/

Is it possible to wrangle up in a material?

Let me clarify the meaning of these parameters and how they relate to the old r.VXGI.Range.
r.VXGI.VoxelSize is the size of the smallest voxels, in world units. Increasing that will directly increase the range, and slightly degrade performance because more objects now fall into the voxelized region.
r.VXGI.MapSize{X,Y,Z} is the number of voxels on each side of every voxel clip-map volume. It also directly affects the range, but increasing MapSize will make performance much worse (as you observe) as the GPU has to deal with more voxels. Increasing all of MapSizeX,Y,Z by a factor of 2 multiplies the total number of voxels by a factor of 8.
r.VXGI.Range (which is gone) was just a product of MapSize and VoxelSize.
r.VXGI.StackLevels controls the number of clip-map levels (or cascades) in the voxel volume, so setting it 1 higher makes the distance 2x longer; the and default value for StackLevels is 5.

Total world distance covered by VXGI can be calculated as MapSize * VoxelSize * pow(2, StackLevels-1).

Regarding that “fallback color” topic you mentioned: it’s possible to use that in a post-process material. But in 2.0, the confidence value is stored in FScreenSpaceData.VxgiConfidence, instead of VxgiDiffuse.a.

As always, thanks a ton . I’ve tinkered even more various settings, and found a happy middle ground. As far as the nabbing the confidence value and using that in post-processing- is that easily accessible or does it require shader developing and C++ code?

[edit]

Another question I’ve been meaning to ask… Flow and VXGI, sitting in a tree, k-i-s-s-i-n-g. Is there any way to get emissive materials and the like to play with Flow systems, as well as getting a Flow system to contribute to emission? I have some smoke for example, that would be to have lit from emissives or area lights. On that same note, I have some fire that would be (more) amazing if it were contributing light to the scene.

I’m thinking I could “hack” something together, using lighting channels, but am very curious if there is any other solutions possible, or if sort of things is on the roadmap (hint hint, nudge nudge).

Thanks again!

Hi! everyone…

I have a trouble…

Now i am testing nvidia waveworks.

When i tested in Editor, it was successful.
but i packaged program, it was crash.

I think it was relative with shader, because i met error message.


LoginId:
EpicAccountId:

Assertion failed: (Index >= 0) & (Index < ArrayNum) [File:F:\UnrealEngine-4.18.3-release\Engine\Source\Runtime\Core\Public\Containers/Array.h] [Line: 610] Array index out of bounds: 0 from an array of size 0

Wave_Win64_DebugGame!FDebug::AssertFailed() [f:\unrealengine-4.18.3-release\engine\source\runtime\core\private\misc\assertionmacros.cpp:414]
Wave_Win64_DebugGame!TBasePassWaveWorksDrawingPolicy<FUniformLightMapPolicy>::ConfigureQuardTreeInputMapping() [f:\unrealengine-4.18.3-release\engine\source\runtime\renderer\private\basepassrendering.h:1420]
Wave_Win64_DebugGame!TBasePassWaveWorksDrawingPolicy<FUniformLightMapPolicy>::TBasePassWaveWorksDrawingPolicy<FUniformLightMapPolicy>() [f:\unrealengine-4.18.3-release\engine\source\runtime\renderer\private\basepassrendering.h:1515]
Wave_Win64_DebugGame!FDrawTranslucentMeshAction::Process<FUniformLightMapPolicy>() [f:\unrealengine-4.18.3-release\engine\source\runtime\renderer\private ranslucentrendering.cpp:491]
Wave_Win64_DebugGame!ProcessBasePassMesh<FDrawTranslucentMeshAction>() [f:\unrealengine-4.18.3-release\engine\source\runtime\renderer\private\basepassrendering.h:2080]
Wave_Win64_DebugGame!FTranslucencyDrawingPolicyFactory::DrawWaveWorksMesh() [f:\unrealengine-4.18.3-release\engine\source\runtime\renderer\private ranslucentrendering.cpp:718]
Wave_Win64_DebugGame!FTranslucencyDrawingPolicyFactory::DrawDynamicWaveWorksMesh() [f:\unrealengine-4.18.3-release\engine\source\runtime\renderer\private ranslucentrendering.cpp:795]
Wave_Win64_DebugGame!FTranslucentPrimSet::RenderWaveWorksPrimitive() [f:\unrealengine-4.18.3-release\engine\source\runtime\renderer\private ranslucentrendering.cpp:1106]
Wave_Win64_DebugGame!FTranslucentPrimSet::DrawWaveWorksPrimitives() [f:\unrealengine-4.18.3-release\engine\source\runtime\renderer\private ranslucentrendering.cpp:1003]
Wave_Win64_DebugGame!FDeferredShadingSceneRenderer::RenderWaveWorks() [f:\unrealengine-4.18.3-release\engine\source\runtime\renderer\private ranslucentrendering.cpp:1771]
Wave_Win64_DebugGame!FDeferredShadingSceneRenderer::Render() [f:\unrealengine-4.18.3-release\engine\source\runtime\renderer\private\deferredshadingrenderer.cpp:1260]
Wave_Win64_DebugGame!UpdateSceneCaptureContentDeferred_RenderThread() [f:\unrealengine-4.18.3-release\engine\source\runtime\renderer\private\scenecapturerendering.cpp:267]
Wave_Win64_DebugGame!UpdateSceneCaptureContent_RenderThread() [f:\unrealengine-4.18.3-release\engine\source\runtime\renderer\private\scenecapturerendering.cpp:309]
Wave_Win64_DebugGame!TGraphTask<TEnqueueUniqueRenderCommandType<FScene::UpdateSceneCaptureContents'::12’::CaptureCommandName,<lambda_2f5b22162577ad8db4efab9192d8d401> > >::ExecuteTask() [f:\unrealengine-4.18.3-release\engine\source\runtime\core\public\async askgraphinterfaces.h:787]
Wave_Win64_DebugGame!FNamedTaskThread::ProcessTasksNamedThread() [f:\unrealengine-4.18.3-release\engine\source\runtime\core\private\async askgraph.cpp:651]
Wave_Win64_DebugGame!FNamedTaskThread::ProcessTasksUntilQuit() [f:\unrealengine-4.18.3-release\engine\source\runtime\core\private\async askgraph.cpp:560]
Wave_Win64_DebugGame!RenderingThreadMain() [f:\unrealengine-4.18.3-release\engine\source\runtime\rendercore\private\renderingthread.cpp:327]
Wave_Win64_DebugGame!FRenderingThread::Run() [f:\unrealengine-4.18.3-release\engine\source\runtime\rendercore\private\renderingthread.cpp:461]
Wave_Win64_DebugGame!FRunnableThreadWin::Run() [f:\unrealengine-4.18.3-release\engine\source\runtime\core\private\windows\windowsrunnablethread.cpp:76]

I don’t know solution. Pleas help me.

I have updated my repository with UE 4.19.2 branch including:

  • WaveWorks
  • Flow
  • Blast
  • TXAA
  • Volumetric Lighting
  • VXGI 2
  • HairWorks

You can get it from : https://github/lukaszPJATK/UnrealEngine
There is also an easy setup guide.

nice i will try wavework package…hope it work…

engine version : 4.18.3 + waveworks
os windows 10

I tested waveworks project.

I packaged project and run program, but it crashed.

I found message about oceanMaterial.asset in build log

-> Failed to compile Material for platform PCD3D_SM4, Default Material will be used in game.

projects run successfully in editor mode.

How can i remove warning message?

Wavework package successfully, but when i run it crashed like 4.18.3

Hoping the 4.19 flex comes out week!

After your question, I discovered that the Confidence texture is not exposed to the post-processing materials, unlike the others (VxgiDiffuse etc.). So now that’s fixed, and you can access that by using a SceneTexture node / VxgiConfidence.

Regarding Flow: it would certainly be nice if smoke and fire could interact with VXGI, but currently they can’t. Not sure about making smoke illuminated by VXGI emitters, that can probably be done with custom tracing shaders; but making fire emit indirect light requires adding a into VXGI to inject light from another voxel volume, used by Flow. That’s currently not implemented.

Judging by the first line of the error report,

it looks like you have an array in your code that isn’t properly initialised, so I would go to that file (Line 610) and check it out.
That’s my best guess, anyway.

I have do something for it.
I find the problem.The reason it crashed is that Array index out of bounds.
At file \Engine\Source\Runtime\Renderer\Private\BasePassRendering.h”
The function ConfigureWaveWorksInputMapping()and ConfigureWaveWorksInputMapping ();
Actually these function has the same problem.It is that *WaveWorksShaderParams-> ShaderInputMappings *is empty.

And then I try to find where it init at. After a period of time debugging, at last I find the reason of ShaderInputMappings being empty is
It can not get WaveworksResource in file:
\Engine\Source\Runtime\Engine\Private\Components\WaveWorksComponent.cpp”**
The fouction*** UWaveWorksComponent::CalcBounds();***
And The function UWaveWorks::GetWaveWorksResource() in file:
\Engine\Source\Runtime\Engine\Private\WaveWorks.cpp”

// GetWaveWorksResource()
class FWaveWorksResource UWaveWorks::GetWaveWorksResource()*
{
*** FWaveWorksResource* Result = NULL;***
*** if( WaveWorksResource && WaveWorksResource->IsInitialized() )***
*** {***
*** Result = (FWaveWorksResource*)WaveWorksResource;***
*** }***
*** return Result;***
}
I try to set breakpoints at function,there was something interesting.
It is amazing that the return of function(WaveWorksResource->IsInitialized()) is different when it run with editor and no-editor.

So I try to find the reason of it. Then I find it init at file :
\Engine\Source\Runtime\Engine\Private\WaveWorks.cpp”
In function :*** UWaveWorks::UpdateResource()***

// UWaveWorks::UpdateResource()
void UWaveWorks::UpdateResource()
{
*** // Release the existing texture resource.***
*** ReleaseResource();***

*** //Dedicated servers have no texture internals***
*** if (FApp::CanEverRender() && !HasAnyFlags(RF_ClassDefaultObject))***
*** {***
*** // Create a new texture resource.***
*** WaveWorksResource = new FWaveWorksResource();***
*** BeginInitResource(WaveWorksResource);***
*** }***
}
At last I know why the return of WaveWorksResource->IsInitialized() is false.
When it run with editor,after function ***BeginInitResource(WaveWorksResource) ***beginning, render theard will run before ***UWaveWorksComponent::CalcBounds() ***beginning.
But when it run without editor, after function ***BeginInitResource(WaveWorksResource) ***beginning, render theard will run after ***UWaveWorksComponent::CalcBounds() ***beginning.
So without editor,when ***UWaveWorksComponent::CalcBounds() *beginning, WaveWorksResource’s render theard have not started.So the return of WaveWorksResource->IsInitialized() is false.

Yesterday,I find that it also crashed with editor when you use a new WaveworksAsset.
I think the problem of it is Serialization.You can do test: Create a new waveworksasset and use it in a waveworkscomponent.Your editor will crashed and the erro log is the same.

Whoa- it’s super annoying when people quote giant posts (much appreciated when forums frown on and enforce in rules). Also, throw the code stuff you posted in code formatting. It’s good to do with error log stuff, or really anything code related. Makes it much easier for us all to read and help out, without getting a headache :wink:

@ Hi again, today I wanted to try on the VXGI branch and I followed the Intel’s guide to activate it. (https://software.intel/en-us/art…n-apis-for-ue4) So I Installed latest SDK and Nvidia Driver. I added “-” to end of editor shortcut. When I start the engine Firstly it crashes and asks me to enable r.ShaderDevelopmentMode in ConsoleVariables.ini. I enabled it and tried again but in time it shows another warning. I attached the ss of warning. If I click yes I have the same warning again and again and Initializing percent doesn’t make any progress. What can be the problem? Have you tried on the branch? I saw some people who are using the editor with

Well, VXGI does not support , at least not yet.

The specific error suggests that it tries to compile the GBufferAccessShader (VXGI / UE interop on G-buffer data) but fails due to some HLSL-isms that are used there, like explicit binding point assignment. If anyone cares, I can try to disable compiling those shaders, along with any other VXGI activity, on unsupported platforms.