Visualization Gallery Unreal Engine Development Kit

Setting Up a Project for the Visualization Studio



Code Snippets

Jump To:

[00:00] || [01:16] || [02:18] || [02:44] || [02:57] || [03:49] || [10:53] || [11:29] || [11:43] || [12:53] || [14:08] || [18:29] || [24:37] || [29:57] || [30:40] || [31:13] || [31:55]


[00:00]

  • Begin with a C++ Unreal Project (if using an existing Blueprint-only project, it must first be converted to a C++ project).
  • In the content browser, navigate to C++ Classes, and then into the folder with your project’s name.
  • Create a new C++ class with Actor as the Parent Class.
  • Name this “ASplitScreenManager”
  • Copy all of the provided code for ASplitScreenManager.cpp, and replace the default code with it.
  • For ASplitScreenManager.h copy ONLY the line void ApplyEightViewportSettings(); and insert that line directly under AASplitScreenManager();
  • Save the files, and return to the editor.



[01:16]

  • Create another C++ class, being sure to check “Show All Classes”
  • Search for and select GameInstance as the parent class.
  • Name this “VizStudioGameInstance”
  • Like before, copy all of the provided code for VizStudioGameInstance.cpp, and replace the default code.
  • For VizStudioGameInstance.h, only the lines from public: to ULocalPlayer… need to be copied from the provided code and pasted just below GENERATED_BODY() in Visual Studio.



[02:18]

  • Back in the editor, create one more C++ class, and select GameViewportClient as the parent class.
  • Name this “VizStudioGameViewportClient”
  • This requires no additional code.



[02:44]

  • Now create a Blueprint class from ASplitScreenManager.
  • Name this “ASplitScreenManagerBP”
  • This should be placed in your project’s Content folder. Go there now.



[02:57]

  • Now to create a few more Blueprint classes.
  • Create a Pawn class, and name it “VizCameraReceiverPawn”
  • Create a Game Mode Base class, and name it “VizGameMode”
  • Create another Pawn class, and name it “VizParentPawn”
  • Finally, create a Player Controller class, and name it “VizPlayerController”



[03:49]

  • Open up the VizGameMode Blueprint.
  • Follow along with the video to continue setting up the VizGameMode.



[10:53]

  • At this point, be sure that the Possess node inside your collapsed Change First Player To A Parent Pawn node has an execute output running to the collapsed node’s Outputs node.
  • Even if the collapsed nodes appear to be connected from the Event Graph, they will not be if this change is not made.
  • From here, continue following along with the video to set up Panini Projection in the Construction Script.



[11:29]

  • Go to VizGameMode’s Class Defaults, and change the Default Pawn Class to VizCameraReceiverPawn, NOT VizParentPawn
  • Set the HUD class to None
  • With that, the VizGameMode Blueprint is set up.



[11:43]

  • *Technically, this section is optional if you do not plan to move the player in your project, or if you simply do not want vignetting when moving. If that is the case, skip to [14:08].
  • Now, make a new material named Blur_PP.
  • Follow the video closely for steps.



[12:53]

  • It is important to note that the Input names on the Custom node are case sensitive. For example, “uv” can NOT be changed to “UV” without the code needing to be changed.
  • Be sure to replace the default code in the Custom node with the code provided.



[14:08]

  • Open the VizParentPawn Blueprint.
  • *If you do not want movement functionality for your player, all you need for the following section is to follow the setup instructions for Event BeginPlay, and connect a GetActorTransform node to the SpawnActor node’s Spawn Transform pin as seen starting at [16:40].



[18:29]

  • *If you do not want vignetting during player movement, skip ahead to [30:40].



[24:37]

  • You do not need to enter these values yet. At [29:57] a compiler error will require that the nodes be refreshed, and the values will be reset to their defaults. Hold off on entering those values for now.



[29:57]

  • This compiler error is just Unreal not understanding that the old input names in the nodes have been changed. Unfortunately, this does mean that the values will need to be input again after the nodes are refreshed if you entered them earlier.



[30:40]

  • Back in the VizParentPawn’s EventGraph, set up the Possessed Event.



[31:13]

  • Now, open the VizCameraReceiverPawn Blueprint, and follow the video to set up the camera for correct use in the Visualization Studio.



[31:55]

  • Lastly, open the Project Settings, and change the Default GameMode and Game Instance classes to VizGameMode and VizStudioGameInstance, respectively.