Soft Self Shadows with VXGI??

Hey guys

I asked this in the nvidia gameworks thread but i thing it may be better to ask here.

I was trying to get with UE4.10 VXGI soft shadows like the ones you obtain with area lights. The problem is that when using a plane with an emissive material i just obtain a broad shadow for the whole object and not self shadows.

Look for example at this Head from the demos that comes with ZBRUSH.

http://i45.photobucket.com/albums/f86/yolao/ScreenShot_UnrealEngine.jpg

And here are some of my settings
http://i45.photobucket.com/albums/f86/yolao/VXGI_Settings.jpg
http://i45.photobucket.com/albums/f86/yolao/Scalability_Settings.jpg

In comparison here is the same geos in Thea. The renders have self soft shadows which is what i want to have in UE4
http://i45.photobucket.com/albums/f86/yolao/Zbrush_Head_TheaRender.jpg

And here is other with the Plane light bigger making the shadows even softer
http://i45.photobucket.com/albums/f86/yolao/Zbrush_Head_TheaRender_BiggerPlaneLight.jpg

So, is possible in UE4 to have soft self shadows from plane lights (like area lights)?.. for moving objects not static…!!

Thanks

vxgi is very inaccurate compared to Thea ( I suppose you are talking about thea renderer?). Thea is an unbiased raytracer. Don’t expect too much imo!

You would need to increase the voxel density, which will lower performance.

VXGI supports casting light from the emissive channel, try that maybe? You should be able to make an actual emissive plane and have light come off of that, not sure if it would catch shadows perfectly on it though (if you really, really need it to be more accurate you can push the voxel density from 128 to 256, but it does get exponentially more demanding).

If you want soft shadows, your best bet is to use something like distance field shadowing. It’s compatible with VXGI thankfully. Distance fields are just incompatible with skeletal meshes so there’s that to consider if that’s what you intend on using it for.

Thanks guys.

How can i enable that?

In my case the “Number of Cones” in the “Global Post Process Volume” wont pass of 128, i mean, that`s the limit, it wont even allow me to write it because it gets back to 128. Is there a way to unlock that to allow me pass that limit?

In my case i import a geo with no skeletal joints but with several Morph targets with animation every frame, this allow me to import animated deformed meshes since UE4 does not allow alembic or any other cache AFAIK. Will that be supported by the “distance field shadows”?.., i try the “Distance Field Shadows” after i enable the “Generate Mesh Distance Fields” and re started the editor but i don`t see any effect after i enable it in the light settings…? is this just for big environments?

Thanks again guys.:slight_smile:

You’re going about this the wrong way a tiny bit :stuck_out_tongue:

  1. Reset VXGI to its default values. They are a good enough baseline for most cases.

  2. Up the number of cones as you wish but never go beyond 16 unless it’s some kind of extremely weird case.

  3. You can lower ‘tracing step’ to 0.25 but the performance hit will be big. Lower than this and the performance hit will be extreme.

  4. Light your scene with a movable spotlight. Enable VXGI and Distance Field Shadows.

  5. Boost voxel density if desired by lowering VXGI range (open console and tweak with r.VXGI.Range) default is 512. Try 64 or 128

  6. Tweak with VXGI ambient Scale and Bias parameters

Thanks.

“Distance Field Shadows” could have been a great option but it seems it doesn`t work with animated geometry which is what i need.
I try r.VXGI.Range with 64 and also increasing r.VXGI.MapSize to 128 (256 crash UE4, in fact i cannot oppen it) and all that helps having more defined shadows but are still shadows from object to object and not self soft shadows which is what i want…

I will keep doing tests… any other suggestion is welcome.

Just connect something to the emissive channel of a material and assign it to a mesh, like you normally do for emissive. VXGI will handle its light casting. If it’s a small object, you might need to enable VXGI Omni Directional in the material settings.

The number of cones and voxel density aren’t the same. The voxel density is how many voxels are actually in the area, the number of cones determines how accurate the voxels each are. You can currently only change the voxel density through a console command. r.VXGI.Mapsize=128 (with 128 being the default). The next step up is 256, and I think that’s the highest it will go, with the lowest it’ll go at 32.

Adding more cones and voxels though is a pretty bruteforce method of doing things, altering the other VXGI settings first to get the most out of each cone and voxel first like Chesire mentioned is probably best.

Distance fields are precalculated on import, it can’t be deformed by any means aside from world location and rotation without breaking the effect. It’s generally for static objects. You can find out more about it at Distance Field Soft Shadows in Unreal Engine | Unreal Engine 5.3 Documentation

You can fake it…kinda.
Do note the below comes with some strings attached but it could help you out.

  1. Make sure your mesh is set to movable
  2. Adjust mesh shadow settings as in attachment
  3. Adjust Spotlight as shown in attachment

This method should work with just about every type of content.
Also, you’re still able to tweak VXGI settings (especially Ambient) for better looks.

thanks guys. Good info.

Chesire. I just can see small thumbnails of your screen shots, i can not tick them or anything. Can you please post them in other way so i can check your settings.

Right click, then open image in new tab?

Great, thanks. I will check those settings out.

hi
i have a problem with VXGI 4.18 can you help me?please
i downloaded vxgi from this link https://github.com/NvPhysX/UnrealEngine/tree/VXGI-4.18
and build with visual studio .it was very fantastic
every thinks was ok and good working but when i try for render project or teak hi resolution screenshot unreal crashed and i see this masage

Assertion failed: BytesPerPixel [File:L:\UnrealEngine-VXGI-4.18\Engine\Source\Runtime\Windows\D3D11RHI\Private\D3D11RenderTarget.cpp] [Line: 514]

UE4Editor_Core!FDebug::AssertFailed() [l:\unrealengine-vxgi-4.18\engine\source\runtime\core\private\misc\assertionmacros.cpp:414]
UE4Editor_D3D11RHI!ComputeBytesPerPixel() [l:\unrealengine-vxgi-4.18\engine\source\runtime\windows\d3d11rhi\private\d3d11rendertarget.cpp:516]
UE4Editor_D3D11RHI!FD3D11DynamicRHI::ReadSurfaceDataNoMSAARaw() [l:\unrealengine-vxgi-4.18\engine\source\runtime\windows\d3d11rhi\private\d3d11rendertarget.cpp:599]
UE4Editor_D3D11RHI!FD3D11DynamicRHI::RHIReadSurfaceData() [l:\unrealengine-vxgi-4.18\engine\source\runtime\windows\d3d11rhi\private\d3d11rendertarget.cpp:960]
UE4Editor_RHI!FRHICommandListImmediate::ReadSurfaceData() [l:\unrealengine-vxgi-4.18\engine\source\runtime\rhi\public\rhicommandlist.h:4222]
UE4Editor_Engine!TGraphTask<FRenderTarget::ReadPixels'::2’::EURCMacro_ReadSurfaceCommand>::ExecuteTask() [l:\unrealengine-vxgi-4.18\engine\source\runtime\core\public\async askgraphinterfaces.h:784]
UE4Editor_Core!FNamedTaskThread::ProcessTasksNamedThread() [l:\unrealengine-vxgi-4.18\engine\source\runtime\core\private\async askgraph.cpp:651]
UE4Editor_Core!FNamedTaskThread::ProcessTasksUntilQuit() [l:\unrealengine-vxgi-4.18\engine\source\runtime\core\private\async askgraph.cpp:560]
UE4Editor_RenderCore!RenderingThreadMain() [l:\unrealengine-vxgi-4.18\engine\source\runtime\rendercore\private\renderingthread.cpp:327]
UE4Editor_RenderCore!FRenderingThread::Run() [l:\unrealengine-vxgi-4.18\engine\source\runtime\rendercore\private\renderingthread.cpp:461]
UE4Editor_Core!FRunnableThreadWin::Run() [l:\unrealengine-vxgi-4.18\engine\source\runtime\core\private\windows\windowsrunnablethread.cpp:76]