Announcement

Collapse
No announcement yet.

NVIDIA GameWorks Integration

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

    Can I ask if anyone has succesfully built the new Nvidia 4.15 VXGI branch?

    can complete the compilation process, and the editor does work with VXGI, but packaged projects don't work at all and just crash out instantly.

    During the editor compile process in Visual Studio, and during the project packaging, I get errors like the following -

    3>D:\UnrealEngine-VXGI-4.15\UnrealEngine-VXGI-4.15\Engine\Source\ThirdParty\GameWorks\VXGI\include\GFSDK_VXGI.h(1283): warning C4668: 'CONFIGURATION_TYPE_DLL' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'

    3>D:\UnrealEngine-VXGI-4.15\UnrealEngine-VXGI-4.15\Engine\Source\Runtime\RHI\Public\RHI.h(15): warning C4668: 'WITH_GFSDK_SSAO' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'

    There are tons of similiar messages, all referencing VXGI-specific code, this happens on the build of the ShaderCompileWorker.

    I've tried to build several timeson 2 machines without any modifications, same thing each time.

    Any ideas? Is there something new related to the 4.15 header changes that I'm missing?

    Comment


      i'm building it right now and seeing the same warning messages as you.

      will try it out ( also on a packaged a project ) and will give you an update later.

      Comment


        Cheers. For me, everything looked good, the packaging process completed (with the error messages shown above) but the executable doesn't even load splash screen.

        Comment


          so i finished compiling and packaged a project of mine. worked, no crash. but i get some weird shadow mapping problems on some low poly meshes with a directional light source in stationary mode. movable and static works just fine. the mesh is a low poly door, which, when i move closer to it nearly gets black and the shadow sometimes flickers around.

          edit: it seems to have nothing to do with the model being low poly. i changed it to a more subdivided model with no change.
          but the material on it had tesselation enabled. when i disable tesselation, it works fine!?

          anyone with the same problems?
          Last edited by buzzdx; 03-20-2017, 07:29 AM.

          Comment


            Is the VXGI under development ? It has been 0.9 for quite some time, are there any upgrades coming in foreseeable future ?
            https://github.com/iniside/ActionRPGGame - Action RPG Starter kit. Work in Progress. You can use it in whatever way you wish.

            Comment


              i took some pictures of the shadowing problem i described earlier. i'm using the vxgi-4.15 branch which i compiled yesterday.

              settings:

              directional light: stationary
              object: movable

              i used the basic box shape of the engine and applied my material with tessellation enabled on to it.
              i had to scale it a bit, in perfect box form it was not visible.

              but it even happens on perfect boxes as the last pic will show. for the last pic i created a completely new project as i thought maybe the problem
              occured due to me converting a project from base engine version to vxgi one.

              box a little away, everything ok:
              Click image for larger version

Name:	box_ok.jpg
Views:	1
Size:	21.3 KB
ID:	1124950

              box moved closer to camera, artifacts showing up
              Click image for larger version

Name:	box_closer.jpg
Views:	1
Size:	37.3 KB
ID:	1124951

              box right in front of camera, almost fully black
              Click image for larger version

Name:	box_black.jpg
Views:	1
Size:	31.2 KB
ID:	1124952

              one time i was lucky and caught the flicker effect i described:
              Click image for larger version

Name:	box_closest_flicker.jpg
Views:	1
Size:	34.8 KB
ID:	1124954

              and finally a picture of a fresh project created in vxgi version. basic box shape again with a material with tessellation on:
              Click image for larger version

Name:	box_freshproject.jpg
Views:	1
Size:	66.6 KB
ID:	1124956

              i hope someone can help, or if this is a bug, this helps finding and fixing it.

              note that if i disable tessellation in the materials this goes away completely.
              Last edited by buzzdx; 03-20-2017, 09:33 AM.

              Comment


                Click image for larger version

Name:	merge.png
Views:	1
Size:	661.8 KB
ID:	1124959
                After three days of hard work
                I finally successfully merged the two branches VolumetricLighting-4.15 and NvFlowPlugin-4.15
                No Github share, because my git clone is too slow, I take zip directly to merge.
                Flow should be the easiest to merge in several branches, and the whole process only happens to discover the real conflict once.
                Some tips on merge:
                1 find somewhere to learn git and github basic skills
                2 use other small projects to practice your git skills first
                3 use SSD, or even ram disk to improve the merge speed
                4 if git clone is slow, try zip
                5 Other 4.15 compiled version After running setup.bat, the generated file seems to be able to copy directly

                Comment


                  Originally posted by scragnogg View Post
                  Can I ask if anyone has succesfully built the new Nvidia 4.15 VXGI branch?

                  can complete the compilation process, and the editor does work with VXGI, but packaged projects don't work at all and just crash out instantly.

                  During the editor compile process in Visual Studio, and during the project packaging, I get errors like the following -

                  3>D:\UnrealEngine-VXGI-4.15\UnrealEngine-VXGI-4.15\Engine\Source\ThirdParty\GameWorks\VXGI\include\GFSDK_VXGI.h(1283): warning C4668: 'CONFIGURATION_TYPE_DLL' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'

                  3>D:\UnrealEngine-VXGI-4.15\UnrealEngine-VXGI-4.15\Engine\Source\Runtime\RHI\Public\RHI.h(15): warning C4668: 'WITH_GFSDK_SSAO' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'

                  There are tons of similiar messages, all referencing VXGI-specific code, this happens on the build of the ShaderCompileWorker.

                  I've tried to build several timeson 2 machines without any modifications, same thing each time.

                  Any ideas? Is there something new related to the 4.15 header changes that I'm missing?

                  I has the same errors at project package. The solution I find to get ride of the errors and crashes, has to code defend the build's. Some GameWorks dll's and lib's aren't available for 32bits.
                  UE4 has Tools compiled has 32bits for game packaging etc.

                  Example: in the VXGI.Build.cs I changed.
                  Code:
                  // NVCHANGE_BEGIN: Add VXGI
                  using UnrealBuildTool;
                  
                  public class VXGI : ModuleRules
                  {
                  	public VXGI(TargetInfo Target)
                  	{
                  		Type = ModuleType.External;
                  
                          if (Target.Platform == UnrealTargetPlatform.Win64)
                          {
                              Definitions.Add("WITH_GFSDK_VXGI=1");
                          }
                          else
                          {
                              Definitions.Add("WITH_GFSDK_VXGI=0");
                          }
                  
                  		string VXGIDir = UEBuildConfiguration.UEThirdPartySourceDirectory + "GameWorks/VXGI";
                  		PublicIncludePaths.Add(VXGIDir + "/include");
                  
                  		string ArchName = "<unknown>";
                  		string DebugSuffix = "";
                  
                  		if (Target.Configuration == UnrealTargetConfiguration.Debug)
                  			DebugSuffix = "d";
                  
                  		if (Target.Platform == UnrealTargetPlatform.Win64)
                  			ArchName = "x64";
                          /*else if (Target.Platform == UnrealTargetPlatform.Win32)
                  			ArchName = "x86";*/
                  
                          if (Target.Platform == UnrealTargetPlatform.Win64)
                          {
                  		PublicLibraryPaths.Add(VXGIDir + "/lib/" + ArchName);
                  		PublicAdditionalLibraries.Add("GFSDK_VXGI" + DebugSuffix + "_" + ArchName + ".lib");
                  		PublicDelayLoadDLLs.Add("GFSDK_VXGI" + DebugSuffix + "_" + ArchName + ".dll");
                          }
                  	}
                  }
                  // NVCHANGE_END: Add VXGI
                  in the WindowsPlatformMisc.cpp I changed.
                  Code:
                  // NVCHANGE_BEGIN: Add VXGI
                  #if WITH_GFSDK_VXGI
                  
                  #include "WindowsPlatformProcess.h"
                  
                  static void* VXGIDLLHandle = 0;
                  static int32 VXGIDLLHandleRefCount = 0;
                  static FCriticalSection VXGILoadCS;
                  
                  void FWindowsPlatformMisc::LoadVxgiModule()
                  {
                  	if (FPlatformAtomics::InterlockedIncrement(&VXGIDLLHandleRefCount) == 1)
                  	{
                  		VXGILoadCS.Lock();
                  		check(VXGIDLLHandle == 0);
                  		FString VXGIBinariesRoot = TEXT("../ThirdParty/GameWorks/VXGI/");
                  #if UE_BUILD_DEBUG
                  #if PLATFORM_64BITS
                  		FString VXGIPath(VXGIBinariesRoot + TEXT("GFSDK_VXGId_x64.dll"));
                  #else
                  		/*FString VXGIPath(VXGIBinariesRoot + TEXT("GFSDK_VXGId_x86.dll"));*/
                  		FString VXGIPath(VXGIBinariesRoot + TEXT(""));
                  #endif
                  #else
                  #if PLATFORM_64BITS
                  		FString VXGIPath(VXGIBinariesRoot + TEXT("GFSDK_VXGI_x64.dll"));
                  #else
                  		/*FString VXGIPath(VXGIBinariesRoot + TEXT("GFSDK_VXGI_x86.dll"));*/
                  		FString VXGIPath(VXGIBinariesRoot + TEXT(""));
                  #endif
                  #endif
                  		VXGIDLLHandle = FPlatformProcess::GetDllHandle(*VXGIPath);
                  		check(VXGIDLLHandle);
                  		VXGILoadCS.Unlock();
                  	}
                  }
                  
                  void FWindowsPlatformMisc::UnloadVxgiModule()
                  {
                  	if (FPlatformAtomics::InterlockedDecrement(&VXGIDLLHandleRefCount) == 0)
                  	{
                  		VXGILoadCS.Lock();
                  		check(VXGIDLLHandle != 0);
                  		FPlatformProcess::FreeDllHandle(VXGIDLLHandle);
                  		VXGIDLLHandle = 0;
                  		VXGILoadCS.Unlock();
                  	}
                  }
                  
                  #endif
                  // NVCHANGE_END: Add VXGI
                  With this in advance exist more files to change, search for the implementations, and change-it to, only available for 64bits.

                  RHI.Build.cs
                  Code:
                              // NVCHANGE_BEGIN: Add VXGI
                              if ((Target.Platform == UnrealTargetPlatform.Win64) /*|| (Target.Platform == UnrealTargetPlatform.Win32)*/)
                              {
                                  PublicDependencyModuleNames.Add("VXGI");
                              }
                              // NVCHANGE_END: Add VXGI

                  Comment


                    [MENTION=175631]scragnogg[/MENTION]: did you package for 32bit version of windows?
                    as i said my packaged game did not crash, but it was a win64 build.
                    [MENTION=124709]VItorEAFeliciano[/MENTION]: after your changes, what is the expected behaviour? will it not build at all in 32bit mode, or will it skip the gameworks stuff only?
                    and if it skips the gameworks stuff, what is the point of using the vxgi branch then?

                    it seems to me that there is no solution but to stick with 64bit builds if nvidia did not provide 32bit versions of those dlls. at least for now ..

                    please correct me if i'm wrong though.

                    Comment


                      Originally posted by buzzdx View Post
                      [MENTION=175631]scragnogg[/MENTION]: did you package for 32bit version of windows?
                      as i said my packaged game did not crash, but it was a win64 build.
                      [MENTION=124709]VItorEAFeliciano[/MENTION]: after your changes, what is the expected behaviour? will it not build at all in 32bit mode, or will it skip the gameworks stuff only?
                      and if it skips the gameworks stuff, what is the point of using the vxgi branch then?

                      it seems to me that there is no solution but to stick with 64bit builds if nvidia did not provide 32bit versions of those dlls. at least for now ..

                      please correct me if i'm wrong though.
                      Yes, the solution it's to stick with 64bit's build's only, for Gameworks, but at 64bits build's exists UE4 project's (tools like automation tools, unreal header's tools, .net projects, compiled at 32bits level) that are passing header files to known what modules to use.
                      Project packaging and or content cooking, it will pass headers to know what to include in packaged content.
                      Investigate your UE4 solution build's to know what project's are build at 32bits level when building UE4 engine at 64bits build.
                      It looks amazing but there are project's that are only compiled at 32bit level.
                      The expected behaviour, it's to not include nothing that aren't available. Seems (shuffled), but it work.
                      Last edited by KradMoonRa; 03-20-2017, 12:56 PM.

                      Comment


                        i see, thanks for clarifying.

                        i will have a look at the solution files later, too.

                        staying with the 64bit version is not a real problem, at least for me and my project.

                        now i hope someone can confirm the problems i described a few posts above about the shadow mapping artifacts i experienced in vxgi with tessellated materials.

                        Comment


                          Hello,

                          I'm getting a fatal error when I'm trying to open up the UE-Turbulence 4.13
                          I've downloaded a zip and then followed the procedure to install this.

                          Does anyone has a clue what might be causing this problem?
                          I also have flex and here everything works fine

                          Comment


                            Originally posted by buzzdx View Post
                            [MENTION=175631]scragnogg[/MENTION]: did you package for 32bit version of windows?
                            as i said my packaged game did not crash, but it was a win64 build.
                            I packaged for Windows x64. In fact I don't think I've ever even tried a 32-bit build.

                            I did notice this in the CrashContect.runtime-xml file, which again seems to be diretly tied to VXGI :-/

                            <ErrorMessage>Assertion failed: VXGIDLLHandle [File:J:\UEVXGI\Engine\Source\Runtime\Core\Private\Windows\WindowsPlatformMisc.cpp] [Line: 3000] &nl;&nl;</ErrorMessage>

                            Comment


                              Originally posted by dDissAa View Post
                              Hello,

                              I'm getting a fatal error when I'm trying to open up the UE-Turbulence 4.13
                              I've downloaded a zip and then followed the procedure to install this.

                              Does anyone has a clue what might be causing this problem?
                              I also have flex and here everything works fine
                              I have tested Turbulence for UE4.13 and it only work if PhysX and APEX vs2013 lib's and dll's aren't overwritten, it can be compiled with visual studio 2015, but with some work to get-it done right. I have dropped trying to do'it with VS2015.
                              Insights,

                              Can be done with https://github.com/NVIDIAGameWorks/PhysX-3.4 for VS2015, with this compiled taking care that APEX repo lib's and dll's need's to be original to support GPU simulation.

                              With the lib's and dll's can be overwriting, or best, added to new folder in UE4 ThirParty dir's and changed PhysX.Build.cs and APEX.Build.cs and all related to the new directory to take effect.

                              I'm also trying to add Turbulence with UE4.15 with the NVIDIAGameWorks PhysX-3.4.

                              The NVIDIAGameWorks PhysX-3.4 Private repos, can be accessed with an NVIDIA registered user.
                              Last edited by KradMoonRa; 03-20-2017, 03:37 PM.

                              Comment


                                Casting shadows onto other geometry will be added in a future release. Casting shadows from spot lights and point lights will also likely be added in a future release.

                                No support at the moment for rendering a single baked frame of a simulation.

                                The last example appears to be visualizing the smoke component, but the default allocation settings on the flow material only allocate based on temperature. To allocate based on smoke, go to the Flow Material -> Components -> Smoke, and set Alloc Weight to 1.0, and set Alloc Threshold to something like 0.05. You will see similar values on the temperature component.

                                To visualize the active domain of the simulation, type 'flowvis' in the console at runtime.

                                Comment

                                Working...
                                X