Download

how to enable heightfiled gi?

i use 4.11.2, the scene is kite demo.
it seems the heightfield gi don’t work.
i add “r.DistanceFieldGI=1” to the consolevariables.ini, when i restart the editor, the editor crash.
my system is win10, my card is 980ti, my drive is 364.72.
is this a bug or i set something wrong?
thanks.

ps, how to set “far shadow cascade count”, i didn’t find this property in direct light component.
thanks.

Hi ChenA,

For DFGI for Heightfields you will need to make sure that in the Project Settings you enable Generate Mesh Distance Fields under the Rendering category. Otherwise enabling DFGI will not work soley by itself. You can find multiple Distance Field turorials here.

Far Shadow Cascade Count is available under the Directional Light’s Cascaded Shadow Maps category in the Detail’s panel. You need to do the advanced rollout (down arrow) to see these. Also, in order for thes to be used you must enable it specifically for the actors in the scene that you want it to affect. This should really only be used for large distance objects. Alternatively, if you’re using Distance Field’s in your project anyway the shadowing generated from the Distance Field can work at further distances with only needing to enable “RayTraced Distance Field Shadows”.

I hope this helps.

Tim

I get the same problem with Windows 10 and nVidia driver 368.81 in 4.12.4. I have generate distance fields enabled, and DFAO works fine. But if I set r.DistanceFieldGI=1 then my graphics driver crashes as soon as the editor loads, and the editor either becomes unresponsive or crashes immediately.

Oh and another issue: DFAO does not respect landscape holes.

That’s a known issue. You can fix this by using the CVar for r.AOGlobalDistanceField 0. This will disable the optimization for distance fields that was done a few releases ago. There may be other things with distance fields that it affects that I’m not aware of at this moment too.

  • Have you changed any other CVars for your project?
  • Does the same thing happen in a new blank project when you enable DFGI and Mesh Distance Fields?
  • Can you also post the logs here from your crash?

It reports a bunch of warnings along the lines of this:
LogDistanceField:Warning: Primitive Cube_19 Cube used 10243 Surfels

Then it just keeps spamming this:
LogD3D11RHI: Timed out while waiting for GPU to catch up. (0.5 s)

I got it to work in a very simple scene, but then discovered that it just doesnt work in VR. I see plenty of bounce light in the viewport and if I play outside of VR, but in VR the underside of everything is pure black.