Announcement

Collapse
No announcement yet.

NVIDIA GameWorks Integration

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    Hi! guys.

    I tested ue4 project made by VXGI-4.18 branch version in https://github.com/NvPhysX/UnrealEngine.

    I met error! I don't know why occured error. help me please.

    It's executed by ue4 4.18.3 original version.

    os : windows 10
    visual studio 2015

    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    Source file name : D3D11Commands.cpp
    error position :

    //--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    void FD3D11DynamicRHI::RHIDrawIndexedPrimitive(FIndexBufferRHIParamRef IndexBufferRHI,uint32 PrimitiveType,int32 BaseVertexIndex,uint32 FirstInstance,uint32 NumVertices,uint32 StartIndex,uint32 NumPrimitives,uint32 NumInstances)
    {
    FD3D11IndexBuffer* IndexBuffer = ResourceCast(IndexBufferRHI);

    // called should make sure the input is valid, this avoid hidden bugs
    ensure(NumPrimitives > 0);

    RHI_DRAW_CALL_STATS(PrimitiveType,NumInstances*NumPrimitives);

    GPUProfilingData.RegisterGPUWork(NumPrimitives * NumInstances, NumVertices * NumInstances);

    CommitGraphicsResourceTables();
    CommitNonComputeShaderConstants();

    // determine 16bit vs 32bit indices
    uint32 SizeFormat = sizeof(DXGI_FORMAT);
    const DXGI_FORMAT Format = (IndexBuffer->GetStride() == sizeof(uint16) ? DXGI_FORMAT_R16_UINT : DXGI_FORMAT_R32_UINT);

    uint32 IndexCount = GetVertexCountForPrimitiveCount(NumPrimitives,PrimitiveType);

    // Verify that we are not trying to read outside the index buffer range
    // test is an optimized version of: StartIndex + IndexCount <= IndexBuffer->GetSize() / IndexBuffer->GetStride()
    checkf((StartIndex + IndexCount) * IndexBuffer->GetStride() <= IndexBuffer->GetSize(),
    TEXT("Start %u, Count %u, Type %u, Buffer Size %u, Buffer stride %u"), StartIndex, IndexCount, PrimitiveType, IndexBuffer->GetSize(), IndexBuffer->GetStride());

    StateCache.SetIndexBuffer(IndexBuffer->Resource, Format, 0);
    VerifyPrimitiveType(PSOPrimitiveType, PrimitiveType); <------------------ error line
    StateCache.SetPrimitiveTopology(GetD3D11PrimitiveType(PrimitiveType,bUsingTessellation));

    if (NumInstances > 1 || FirstInstance != 0)
    {
    Direct3DDeviceIMContext->DrawIndexedInstanced(IndexCount, NumInstances, StartIndex, BaseVertexIndex, FirstInstance);
    }
    else
    {
    Direct3DDeviceIMContext->DrawIndexed(IndexCount,StartIndex,BaseVertexIndex);
    }
    }
    //--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    [Call Stack]

    > UE4Editor-D3D11RHI.dll!FD3D11DynamicRHI::RHIDrawIndexedPrimitive(FRHIIndexBuffer * IndexBufferRHI, unsigned int PrimitiveType, int BaseVertexIndex, unsigned int FirstInstance, unsigned int NumVertices, unsigned int StartIndex, unsigned int NumPrimitives, unsigned int NumInstances) Line 1662 C++
    UE4Editor-Renderer.dll!FMeshDrawingPolicy:rawMesh(FRHICommandList & RHICmdList, const FMeshBatch & Mesh, int BatchElementIndex, const bool bIsInstancedStereo) Line 170 C++
    UE4Editor-Renderer.dll!FShadowDepthDrawingPolicy<0>:rawMesh(FRHICommandList & RHICmdList, const FMeshBatch & Mesh, int BatchElementIndex, const bool bIsInstancedStereo) Line 1280 C++
    UE4Editor-Renderer.dll!DrawMeshElements<0>(FRHICommandList & RHICmdList, FShadowDepthDrawingPolicy<0> & SharedDrawingPolicy, const FShadowStaticMeshElement & State, const FViewInfo & View, FShadowDepthDrawingPolicyContext PolicyContext, const FDrawingPolicyRenderState & DrawRenderState, const FStaticMesh * Mesh) Line 1391 C++
    UE4Editor-Renderer.dll!DrawShadowMeshElements<0>(FRHICommandList & RHICmdList, const FViewInfo & View, const FDrawingPolicyRenderState & DrawRenderState, const FProjectedShadowInfo & ShadowInfo) Line 1420 C++
    UE4Editor-Renderer.dll!FProjectedShadowInfo::RenderDepthInner(FRHICommandList & RHICmdList, FSceneRenderer * SceneRenderer, const FViewInfo * FoundView, TFunctionRef<void __cdecl(FRHICommandList &,bool)> SetShadowRenderTargets, EShadowDepthRenderMode RenderMode) Line 1982 C++
    UE4Editor-Renderer.dll!FProjectedShadowInfo::RenderDepth(FRHICommandList & RHICmdList, FSceneRenderer * SceneRenderer, TFunctionRef<void __cdecl(FRHICommandList &,bool)> SetShadowRenderTargets, EShadowDepthRenderMode RenderMode) Line 2090 C++
    UE4Editor-Renderer.dll!FSceneRenderer::RenderShadowDepthMaps(FRHICommandListImmediate & RHICmdList) Line 2338 C++
    UE4Editor-Renderer.dll!FDeferredShadingSceneRenderer::Render(FRHICommandListImmediate & RHICmdList) Line 883 C++
    UE4Editor-Renderer.dll!RenderViewFamily_RenderThread(FRHICommandListImmediate & RHICmdList, FSceneRenderer * SceneRenderer) Line 2110 C++
    UE4Editor-Renderer.dll!TGraphTask<`FRendererModule::BeginRenderingViewFamily'::`26'::EURCMacro_FDrawSceneCommand>::ExecuteTask(TArray<FBaseGraphTask *,FDefaultAllocator> & NewTasks, ENamedThreads::Type CurrentThread) Line 784 C++
    UE4Editor-Core.dll!FNamedTaskThread::ProcessTasksNamedThread(int QueueIndex, bool bAllowStall) Line 651 C++
    UE4Editor-Core.dll!FNamedTaskThread::ProcessTasksUntilQuit(int QueueIndex) Line 560 C++
    UE4Editor-RenderCore.dll!RenderingThreadMain(FEvent * TaskGraphBoundSyncEvent) Line 327 C++
    UE4Editor-RenderCore.dll!FRenderingThread::Run() Line 478 C++
    UE4Editor-Core.dll!FRunnableThreadWin::Run() Line 76 C++
    UE4Editor-Core.dll!FRunnableThreadWin::GuardedRun() Line 25 C++
    Last edited by 황용수; 03-19-2018, 09:38 AM.

    Leave a comment:


  • replied
    WindyStrife loving your 18.3 build. telling all my friends about it lol
    do you have plans to upgrade it to 4.19?

    Leave a comment:


  • replied
    I think the problem isn't that specular tracing is on, it's that the entire mesh is ignored when only one material slot is translucent.

    In the third picture here: https://forums.unrealengine.com/comm...ration/page287 the Opaque material slots are recognized by VXGI, but one material slot (the top of the table) is ignored. That's the "correct" behavior I would expect.

    In the second picture, the WHOLE mesh is ignored, even though only one material slot should be ignored. Both pictures have specular tracing enabled. And the Opaque materials are identical in both pictures.

    The reflection in the second picture should look like the reflection in the third picture, but it's not. This seems like a bug or at least unexpected behavior. I was wondering if it's user error, like maybe there are some material settings or VXGI settings that would make it behave "correctly"?

    Leave a comment:


  • replied
    Originally posted by DsyD View Post

    Any luck figuring out if this can be fixed? I was hoping it could be done with material or VXGI settings, but no luck so far...

    https://forums.unrealengine.com/comm...51#post1438351
    @DsyD:
    i cheked it, man
    you need disable in Post Process Volume "Enable Specular Tracing"
    OR you if you need you VXGI Specular with SSR(screen space reflections), use console command: "r.VXGI.CombineSpecularWithSSR 1"

    Leave a comment:


  • replied
    Originally posted by WindyStrife View Post

    Can you send my sample project may be i can help you
    Any luck figuring out if this can be fixed? I was hoping it could be done with material or VXGI settings, but no luck so far...

    https://forums.unrealengine.com/comm...51#post1438351

    Leave a comment:


  • replied
    Hello everyone!
    I've question about Flex fluid. Would really appreciate some help.

    Flex works great on large scale fluid simulation, but what if I need to simulate filling of just a cup of beer? Did anyone managed to achieve good results in similar scenes? Preferably without scalling everything up. In my scene Unreal Unit = 1 cm.

    Specifically the problem is how particles start to jitter and jump trough meshes when touching collisions if their physical size (in Flex Container) is set to low values like 1 ~ 2. I've tried to use custom simple collisions as well as complex ones, but the problem still persists. I've also tried to set countless combinations of mass, gravity and whole lot other parameters, but they don't seem to solve the problem. Only thing that helped to some extend is increasing simulation steps, but after some point it fails to do any difference as well.

    That's needed for video, so performance is not first concern. Any advices?

    Leave a comment:


  • replied
    Originally posted by WindyStrife View Post

    I met this error and find out solution for it
    your branch is missing dll files
    What branch do you use???

    i fixed it on lastest commit in my branch (add dll file and fix .gitignore for it)
    https://github.com/windystrife/Unrea...IDIA.GameWorks


    Or you can check file in "..\Engine\Binaries\ThirdParty\HairWorks"
    it needs 2 dll files in it
    if u don't see them
    it's here:
    https://drive.google.com/file/d/1Xlw...ew?usp=sharing
    It worked Thank you

    Leave a comment:


  • replied
    Originally posted by ihavenick View Post

    Hello. I loved your work and get it working on my pc. But it have a little problem. Hairwork assests is broken and not showing (sample).
    I met this error and find out solution for it
    your branch is missing dll files
    What branch do you use???

    i fixed it on lastest commit in my branch (add dll file and fix .gitignore for it)
    https://github.com/windystrife/Unrea...IDIA.GameWorks


    Or you can check file in "..\Engine\Binaries\ThirdParty\HairWorks"
    it needs 2 dll files in it
    if u don't see them
    it's here:
    https://drive.google.com/file/d/1Xlw...ew?usp=sharing
    Last edited by WindyStrife; 03-14-2018, 02:34 PM.

    Leave a comment:


  • replied
    Originally posted by WindyStrife View Post

    VXGI is need very powerful PC, you can reduce settings
    Hello. I loved your work and get it working on my pc. But it have a little problem. Hairwork assests is broken and not showing (sample).

    Leave a comment:


  • replied
    Originally posted by KardoseR View Post
    My VXGI 4.17.2 build is running terribly, from demos i seen this cannot be right. Its running at 5 FPS max when i check "Enable Diffuse Tracing", my scene doesn't even change.

    My pc is low end but i didn't expect to have this kind of performance at all, never get this with LPV.

    AMD FX 6300
    RX 460
    8GB
    VXGI is need very powerful PC, you can reduce settings


    To improve cone tracing performance, edit the PostProcessVolume settings:
    Disable specular tracing
    Set “Diffuse Tracing / Number of Cones” to 4
    Set “Diffuse Tracing / Tracing Sparsity” to 4 (quarter-resolution tracing)
    Enable “Diffuse Tracing / Use Temporal Filtering” (to remove flickering artifacts)

    To improve voxelization performance, set these console variables:
    Set “r.VXGI.MapSize 64” (to improve both voxelization and tracing performance)
    Set “r.VXGI.MultiBounceEnable 0” (to improve voxelization performance)
    Set “r.VXGI.HighQualityEmittanceDownsamplingEnable 0” (to improve voxelization performance)



    -----------------------------------------------------------------------------------------------------------------------------------------------------

    Here's what I've collected so far for performance. It's not much mind you, but it should be a good starting point, and others can chime in with their own tips or already posted information in that 84 page thread (too time consuming to read it all if you haven't been following from the start).

    As Blakblt mention in this post, default settings for VXGI seems to be intended for mimicking the quality of baked lighting. That is good for archviz and smaller more controlled scenes, but can be problematic for others. You need to fiddle with the settings to get the best quality/performance ratio you want. Defaults are in bold.

    Console commands:
    r.VXGI.MapSize 32/64/128/256
    Changes the size of the voxels. Lower (meaning bigger voxels) is better, but increases leaking and inaccuracies. 256 is unusable in most GPUs today. Although Nvidia recommends 64 for better performance, you're likely better of setting this to 32.

    r.VXGI.Range 400
    As it says, changes the range. This has a side effect however. If you increase this range, it also scales the voxel size, it tries to keep voxel count constant so that you don't get bogged down by too many voxels.

    r.VXGI.StackLevels 1/2/3/4/5
    As mentioned by Blakbit in this post, this setting has large impact on performance. VXGI reduces voxel resolution for geometry farther than VXGI Anchor (by default attached to camera). Default setting has 5 levels of different voxel sizes. By reducing stacklevel count, you can increase (or decrease) performance. I recommend reading the linked post for more detailed info. Gist of it is you need to use this setting in-conjunction with mapsize and range settings to find a sweetspot that works for your scene.

    r.VXGI.MultiBounceEnable 0/1
    Enables multibouncing as the name suggests. According to Nvidia overview, it works by using previous frame's irradiance map in the current frame. Nvidia overview here (requires github access) says disabling it increases voxelization performance.

    r.VXGI.HighQualityEmittanceDownsamplingEnable 0/1
    Mentioned in Daniel.Wenograd's post here and the overview above.

    r.VXGI.StoreEmittanceInHdrFormat 0/1
    Mentioned in Daniel.Wenograd's post here. This affects the multibounce. As he states few posts below, this is related to VRAM usage, more info here.


    Post-Process Volume Settings:
    Number of Cones 8
    Self explanatory, reducing this increases performance. Nvidia recommends 4. Going lower than that produces too many artifacts in my opinion.

    Tracing Sparsity 1/2/3/4
    Increasing this reduces the tracing resolution. Nvidia recommends 4.

    Tracing Step 0.01/../0.5/../2
    Increasing this increases performance, but lighting becomes less stable. At max level of 2 you can see quite clearly see the colors change as you move through the world. This is a case by case setting in my opinion. Some scenes might be more tolerant to this than others.

    Use Temporal Filtering On/Off
    Nvidia's overview recommends to turn this on to hide flickering artifacts when using performance settings.

    Enable Specular Tracing On/Off
    While turning this on does increase visual quality (sometimes considerably), you might want to turn it off if you are having performance problems and still rely on UE4's SSR for specular highlights. VXGI is also not that good at doing really reflective surfaces, Nvidia overview mentions you can use "r.VXGI.CombineSpecularWithSSR 1" console command to combine VXGI Specular with SSR. Without this command SSR gets disabled when VXGI Specular is on.

    Unclear performance tips:
    This presentation mentions use of low-detailed meshes for voxelization. I'm not sure if current UE4 implementation supports using LODs for that.


    TL;DR Play with stacklevels, mapsize, and range console variables. Lower tracing quality just enough to find a spot with acceptable level of lighting artifacts. Disable specular if performance still unsatisfactory.

    Leave a comment:

Working...
X