NVIDIA GameWorks Integration

You can go inside flashlight Blueprint and Look for all the Light components and enable VXGI in all of them.
As for materials, I opened all the materials and enable VXGI one by one and Sometimes VXGI doesn’t update automatically, you may have to disable/Enable PostProcess Volume.
I am still not getting the right results with daylight “Room” Scene with a single directional light source. Still trying to figure that out.

Thanks,

Can I ask how you are getting the reflections to work?
With r.VXGI.SpecularTracingEnable disabled, I get screenspace reflections - but that only works for high gloss surfaces.
With r.VXGI.SpecularTracingEnable on, I find that reflective surfaces will only reflect direct light:

https://dl.dropboxusercontent/u/247271563/vxgi_reflection.jpg

All attempts to use reflection captures or environment maps with specular tracing just gave me completely black reflections…

Hmmm, not sure why that is happening. comment from one of the engineers might be relevant: “we compute VXGI Specular Tracing only for pixels that contain a specular material.”

Turning on vxgi specular replaces ssr and environmental reflections.
I tried to bypass in the code under ScreenSpaceReflections.cpp by changing return false to return true but it still doesn’t fix it:


bool DoScreenSpaceReflections(const FViewInfo& View)
{
	// NVCHANGE_BEGIN: Add VXGI
#if WITH_GFSDK_VXGI
	if (View.FinalPostProcessSettings.VxgiSpecularTracingEnabled)
	{
		return true;
	}
#endif
	// NVCHANGE_END: Add VXGI

I have a request: it would be good if we could be allowed to choose which materials can use SSR and which materials can use vxgi specular. I’m sure there’s some way of implementing within the deferred pipeline.

I managed to get point light shadows working by adding in the following into bool FDeferredShadingSceneRenderer::RenderOnePassPointLightShadows class in ShadowRendering.cpp:


	// NVCHANGE_BEGIN: Add VXGI
	#if WITH_GFSDK_VXGI
	if (bVxgiPerformEmittanceVoxelization && bVxgiUseDiffuseMaterials && ProjectedShadowInfo != 0)
	{
		SCOPE_CYCLE_COUNTER(STAT_VxgiVoxelizeEmittanceFromDiffuseMaterialsShadowed);
		SCOPED_DRAW_EVENT(RHICmdList, VXGIVoxelizeEmittanceFromDiffuseMaterialsShadowed);

		RenderForVxgiVoxelization(VXGI::RenderMeshFilter::ALL_MESHES, LightSceneInfo, ProjectedShadowInfo);
	}
	#endif
	// NVCHANGE_END: Add VXGI

So it renders the vxgi with shadows for point lights but for some reason doesn’t inject the shadow information into the voxelization process. Not sure what its doing differently from spotlight shadows.

Point light shadow r.VXGI.DebugMode 3:

Spotlight shadow r.VXGI.DebugMode 3:

[edit] I figured out why it isn’t voxelizing the point light shadows - its because that is done separately to the other shadows. The voxelization code needs to read from the point light shadow cubemap texture.

will only work with multiple indirect bounces (at least 2 bounces).

It should be pretty straightforward to do . Just need to revoxelize the scene again after the first bounce.
In my opengl vctgi engine, I have an initial voxelization pass, that runs only for the first frame, to inject some light into the scene (even for only one object is enough). Then a second voxelization pass which runs once every frame where I perform a cone tracing feedback loop (i.e. cone trace the initial 3d texture; add direct light; then overwrite the original values in the 3d texture) to get recursive bounces (unlimited). Then in the third pass, I cone trace the 3d texture to composite with all other deferred .

[edit] So I just discovered that you only need a single voxelization pass to get unlimited bounces. There are two cone tracing passes, one in the forward shading voxelization pass to sample the 3D texture and the second pass in deferred shading to sample the same 3D texture for outputting to the screen (which is already used for the single bounce implementation).

I believe I can do for vxgi in ue4 but I just need to figure out how to access the voxel storage (which I am assuming is a bunch of cascaded 3D textures) then write the cone tracing code in the voxelization shader. The problem is I think these textures are hidden in the GameWorks library and I can’t find a way to access them.

Just finished compiling and building VXGI… guys, I have a Nvidia 450 GTS and I get 30 FPS with cornell box, unlike with LPV that drops to 14 FPS with any luck and doesn’t look as good as VXGI, unless a lot of finetuning is done, I’ll upload tomorrow screens of my project with VXGI!

And one more thing: THANK YOU GUYS! YOU ROCK!

You need to login to you GitHub account that is conneted to your UE 4 Subscription.
GitHub Setup

Check out the Account Page for you Unreal Engine Account.
2b11c7b3a42b39879092a56606c7922b.png

Got a question, will things like flex/waveworks work on android/ios? Even at a very bad quality.

Just a basic red material to try on… it’s sooooooo lovely!

We are working on it, but because most mobile devices do not have robust GPUs it will be some time before these technologies are deployed widely on mobile platforms.

Is the point light movable?

Well actually I just meant soemthing liek a proof of concept.

Also, because I think topic was’t continued, I can’t get over 16800 particles in my fluid, although I’ve got a pretty powerful card (780ti) , so, is there any way to get higher?

Question: is there a way to trigger VXGI enable console command automatically? I added it in the consolevariables.ini, but nothing happens.

Edit: Solve it! Add the = when assigning the value. Stupid me

Sure. You have to increase the particle limit on the flex container, then increase the particle lifetime on the emitter.

Hello guys. Is there any to get all of stuff in one engine?

Sadly, not. I tried already, rising the particle count to 1000000 didnt change anything, and rising it to 10000000 makes it eat my ram out (it eates +4 GB in a sec, and then starts lagging terribly, however the particle count doesnt change, although it makes the engine unusable).

EDIT: When sayign that it eats my RAM out I mean that it uses way mroe than usuall.

EDIT2: Note that my I can’t go over in particle count is something around 16380.

will we get flameworks?

When I try to build, after a while it says it is unable to produce d3d11rhi.dll. Anyone know why?

I have a 780 with the latest driver, most recent zip from github and I built ShaderCompilerWorker for good measure.

When you ran setup, did you overwrite the nvapi libs? choose ‘no’ in the command prompt, and it should build UE4 from the solution without error.

Thanks,