Download

Access motion vectors in material editor

Maybe my search foo is weak but I did not manage to find a way to access the motion vectors used for the motion blur pass or otherwise in the material editor?
Would be nice to do some cool effects with them and especially to test out if limiting vection to reduce the chance of motion sickess for vr locomotion similar to what Eagle flight is doing for example would work.
Is it possible to access it via a custom node?

Ok, found a thread talking about exactly this: https://forums.unrealengine.com/showthread.php?92505-Pixel-Tracking-Methods-Optical-Flow-Methods

Getting a crash, after applying this to a post process volume when trying to read most, but not all, Gbuffer parameters, be it basecolor or something else using the GetScreenSpaceData function.

It does not crash when reading the velocities, but they always seem to return a 0-vector as if they are not enabled, although they should be (at least motion blur visualization shows them to be not zero).

Crash dump to be thorough:


Assertion failed: IsValidRef(GBufferResourcesUniformBuffer) [File:d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\renderer\private\PostProcess/SceneRenderTargets.h] [Line: 489] 



UE4Editor_Core!FDebug::AssertFailed() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\core\private\misc\outputdevice.cpp:440]
UE4Editor_Renderer!FSceneRenderTargets::GetGBufferResourcesUniformBuffer() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\renderer\private\postprocess\scenerendertargets.h:491]
UE4Editor_Renderer!FDeferredPixelShaderParameters::Set<FRHIPixelShader * __ptr64,FRHICommandList>() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\renderer\private\postprocess\scenerendertargets.cpp:2548]
UE4Editor_Renderer!FMaterialShader::SetParameters<FRHIPixelShader * __ptr64>() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\renderer\private\shaderbaseclasses.cpp:319]
UE4Editor_Renderer!FPostProcessMaterialPS::SetParameters() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\renderer\private\postprocess\postprocessmaterial.cpp:100]
UE4Editor_Renderer!FRCPassPostProcessMaterial::Process() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\renderer\private\postprocess\postprocessmaterial.cpp:212]
UE4Editor_Renderer!FRenderingCompositionGraph::RecursivelyProcess() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\renderer\private\postprocess\renderingcompositiongraph.cpp:656]
UE4Editor_Renderer!FRenderingCompositePassContext::Process() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\renderer\private\postprocess\renderingcompositiongraph.cpp:211]
UE4Editor_Renderer!FPostProcessing::Process() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\renderer\private\postprocess\postprocessing.cpp:1981]
UE4Editor_Renderer!FDeferredShadingSceneRenderer::Render() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\renderer\private\deferredshadingrenderer.cpp:1471]
UE4Editor_Renderer!RenderViewFamily_RenderThread() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\renderer\private\scenerendering.cpp:1931]
UE4Editor_Renderer!TGraphTask<`FRendererModule::BeginRenderingViewFamily'::`25'::EURCMacro_FDrawSceneCommand>::ExecuteTask() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\core\public\async	askgraphinterfaces.h:999]
UE4Editor_Core!FNamedTaskThread::ProcessTasksNamedThread() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\core\private\async	askgraph.cpp:932]
UE4Editor_Core!FNamedTaskThread::ProcessTasksUntilQuit() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\core\private\async	askgraph.cpp:679]
UE4Editor_RenderCore!RenderingThreadMain() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\rendercore\private\renderingthread.cpp:319]
UE4Editor_RenderCore!FRenderingThread::Run() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\rendercore\private\renderingthread.cpp:440]
UE4Editor_Core!FRunnableThreadWin::Run() [d:\build\++ue4+release-4.12+compile\sync\engine\source\runtime\core\private\windows\windowsrunnablethread.cpp:74]

As a general question where does this function from and generally where can I look up variables, functions etc related specifically to Unreal.

Still no luck with this.
Tried using the r.BasePassOutputsVelocity(Debug) 1,2,3,4 combinations, but nothing shows up neither in debug and neither in the postprocess material, Motion blur is obviously working though (also tried the “new” with r.MotionBlurNew 1). Any insight from anyone?

So the debug does not work (the visualize motion blur in the dropdown however does) and the shaders always outputs 0,0.

Any update on if this is possible ?