Jump to content
  • Sign Up

    Welcome to CANOPY.

    Browse the Forums, read articles in the Library, share your work in the Gallery, get the latest in Downloads

    Want more? Subscribe and get all our assets for a fraction of their asset store purchase price!

  • Game Ready Level 2 - Fantasy Kingdom


    Josh

     This article describes how to use the "Game Ready Level 2 - Fantasy Kingdom" package. The "Game Ready Levels" are ready-made scenes created with the Procedural Worlds toolset. The pack is available to our Canopy Pro subscribers - please click here to learn more about our Canopy Pro offer
    You can use those as levels for your games, quick prototyping, inspiration, or as a playground to try other assets out.

    Here are some impressions from the scene:

    963501358_Grab20220301165224w3840h2160x471y113z217r281.thumb.png.029ed2c324abc8d05bfa0a7ac114d9b9.png1220891673_Grab20220301165241w3840h2160x195y112z427r189.thumb.png.562c0ef166804bfc85534f2a0535a0f3.png94393795_Grab20220301165816w3840h2160x13y89z77r126.thumb.png.6ff18cc6846465791c0b9a2152a2e99d.png1197845041_Grab20220301165355w3840h2160x196y26z47r311.thumb.png.a45f0739e787f92dd21d80e69ac4019f.png

       
      And here is a trailer:

     


    This level was built the same way as the first level in the series and the quickstart guide video can be applied the same way to this new scene:+
     


    Render Pipeline Compatibility

    The level is authored and configured for the 3 different standard pipelines: Built-In, URP, HDRP. Please make sure to download the correct version when you first download the level from canopy. The differences between the pipeline specific versions of the pack are that the materials have been adapted to use the correct shader for the respective pipelines, and the lighting and post processing setup has been adjusted to use the features of the pipeline in question. Here is a trailer showcasing the URP / HDRP version:
     


    Installation

    You can download the package as a Canopy Pro subscriber from here:

    Built-In Version
    URP Version (Coming Soon)
    HDRP Version (Coming Soon)

    The download consists of a compressed .zip file. If you open it, you will find an .unitypackage inside. Copy and paste / unpack the .unitypackage from the .zip, then you can install it by

    • double clicking the .unitypackage file
    • dragging and dropping it into the project hierarchy in the unity editor
    • Selecting Assets >Import Package > Custom Package... in the unity editor, and then selecting the .unitypackage file for import.

    The package will create the following file structure in your project:

    Assets\Procedural Worlds\Game Ready Levels\

    • Content Resources - Additional Resources such as Materials, Presets etc. that were created for the scenes
    • Scenes - Contains the actual "Game Ready" scenes, ordered in subfolders
      • FK_Scenes - Scenes based on the Fantasy Kingdom Pack
        • GRL_02 - The scenes from this very pack
    • Scripts - Additional Scripts used in the creation of the scenes, such as VFX or small interactive parts.

    HDRP / URP setup
    When using the HDRP / URP pipeline and your project is not set up to use these pipelines yet, the scene will not display correctly after installation. You would need to assign a pipeline settings asset in the project graphics settings. 
     

    image.png

    You can find pre-configured render pipelines settings assets under:

    Assets/Procedural Worlds/Game Ready Levels/URP Resources (for URP)
    Assets/Procedural Worlds/Game Ready Levels/HDRP Resources (for HDRP)

    For more information about which render pipeline asset to pick, please see the HDRP / URP optimization chapters near the end of this article.


    Using the Scenes

    You can simply open the scenes from the scenes folder and run them to use them. There are 3 different version of the level included in this pack:

    GRL_Scene_Source_02: The complete source scene - this scene is based on an unity terrain and still contains all original tools that were used to create the scene -  Gaia and GeNa spawners, GeNa Road and River splines as part of the scene. This scene will perform the worst when running, but allows for easy editing.

    GRL_Scene_02: This scene has the tools removed, lighting and occlusion culling baked in terms of optimization. Game Objects are still independent objects. This scene will perform better and has less clutter from the Gaia tools. This scene is suitable if you want to work with unity terrain and / or still need independent, non-combined Game Objects.

    GRL_Scene_Optimized_02: This scene has further been optimized to use a mesh instead of an unity terrain. The unity terrain is still in the scene for rendering the vegetation, but does not render the surface anymore. Game Objects were combined in larger meshes to further optimize performance. This scene will show the best performance, but is least flexible in terms of editing / using individual objects.

    It is possible to do edits in the source scene, and then re-apply all the optimizations that were made so you can get the same performance improvements on your edited scene. 
    The following section describes how that workflow would look like.
     

    How to make changes and re-apply optimizations
     

    Start by loading up the source version of the scene so you have all tools and original spawner tools, etc. available, and save the scene as a new scene as to not override the original source scene with your edits.

    Additionally take note that the terrains in the scenes share the terrain data object - this means all scenes including the copy you just made reference the same terrain data object in the project hierarchy.

     

    image.png

    This means if you make a change on the terrain in one scene, this will carry over into other scenes as well - this is standard behavior of Unity if you duplicate a scene with a terrain in it. If you want to avoid this and you want to keep the original source scene intact, you need to make your own copy of the terrain data object, and assign this both in the terrain collider component and the terrain component itself. To do so, you need to put the Inspector in Debug mode, then you can assign the copy / duplicate of the terrain data object.

    image.png


    Then make the changes to your own copy of the source scene. You should be able to use the Gaia / GeNa tools as you are used to from your own projects, and you can also bring new spawners etc. in. 

    After that you can perform the optimization steps outlined in the next few sections.

    1. <Optional> Converting to Mesh Terrain

    Consider if you want to use a mesh terrain instead of native unity terrain - this increases performance, but you will lose the splatmap texturing of the terrain. The terrain mesh export can bake the texturing information to use the unity standard shader, or convert to a vertex color low poly shader which fits well with the synty assets in the scene. To do so, open the Terrain Mesh Exporter from the Gaia Manager:

    image.png

    Then choose the Low Poly Export option....

    image.png

    ....and start the export:

    image.png

    You should now see a low poly style mesh terrain instead of the original unity terrain being rendered in scene view. The original terrain is still in the scene, but deactivated in favor for the exported mesh. The trees on the terrains have been converted to Game Objects, but we recommend to remove those and rather use the trees and grass on the original terrain.
    To do so, you can activate the terrain back, but then deactivate the surface rendering of the unity terrain (Uncheck "Draw" in the terrain inspector settings) - this allows the vegetation to render on top of the exported mesh terrain.

    image.png
     

    2. <Optional> Mesh Combining

    Consider if you want to combine static meshes - this will copy meshes sharing the same material together to save draw calls to improve performance. The downside is that those objects will not be as easy to process as independent objects during runtime anymore, e.g. when doing collision detection.

    To do this mesh combining optimization, you need the PW Toolbox. Open the main window of the toolbox:

    image.png

    Then drop the "GeNa Spawns" Game Object on the Drop Area in the Mesh Combine tool:

    image.png

    Click through the different layer types from "Small" to "Extra Large Objects" and set up the mesh combining cell sizes and other settings according to these screenshots. 

    Small Objects:

    image.png

    Medium Objects:

    image.png

    Large Objects:

    image.png

    Extra Large Objects:

    image.png

    Then with all the settings being set up, click on "Combine Meshes".

    image.png

    The combination process can take a few minutes to complete. You should see the output in a Gameobject called "Optimized" when finished. Make sure you assign the small, medium and large objects to the respective Gaia Layer "PW Small", "PW Medium" and "PW Large". 

    image.png

    By doing so, you can benefit from layer-dependent culling where smaller game objects will be hidden earlier to save performance.

    If you added a lot of Game Objects to the scene which would not be included in the "GeNa Spawns" object, you could consider repeating this for those objects as well.

    4. Light Baking

    To further save performance, you can bake the lighting for the scene.

    Go to the lighting panel under Window / Rendering / Lighting

    image.png

    And assign GRL_02_Optimized_Light_Data as lighting settings object.

    image.png

    Then bake your lighting by clicking "Generate Lighting".

    image.png

    5. Baking Occlusion Culling

    Baking Occlusion Culling helps with the performance in the scene as it evaluates during design time which areas of the scene can be seen from other areas in the scene. This visibility information is then stored with the scene, and can be used during runtime to determine which objects need to be rendered from a certain position in the scene.

    You can bake the occlusion culling via Window / Rendering / Occlusion Culling

    image.png

    We suggest to use the following settings, and you can start the occlusion culling calculations by clicking the Bake button.

    image.png

    Water Reflection Masking: What is it?

    image.png.3a21f0672d6b14ee4f25779eb6d3be30.png

    This is a system that has been built into gaia water system for quite some time. This allows you to create a texture mask to define any areas where the water reflections should be enabled. This helps with optimization to remove water reflections being processed in the black areas of the texture. The mask has baked in information in the Red channel.

    image.png.9986ce576fc4405a11877b8445cd6150.png

    Here you can see where the reflections would be processed in the red area and the black area will be disabled. This is based on the players position on the terrain to this mask since the mask is scaled to the terrain size.

    image.thumb.png.4f8f2b31adcd186590502678f6926de9.png

    The screenshot above shows you where on the terrain this mask will enable water reflections.

    image.png.d7ccf4cf52c101faf1dc03abaef6b4e6.png

    You can preview this by assigning the mask into any Image Mask, assign the texture and setting the Filter Mode to Red Color Channel or which ever color channel you want to use from the texture.

    image.png

    URP specific optimizations

    In the project there are 2 assets GRL_UniversalRenderPipelineAsset and GRL_UniversalRenderPipelineAsset_Optimized. 

    image.png
     

    You can find these assets at Assets/Procedural Worlds/Game Ready Levels/URP Resources 

    The first asset has Screen Space Ambient Occlusion added to the renderer for a boost in quality at the cost of a little performance where as the optimized asset does not have this effect. 

    The optimized asset also has Depth and Opaque Texture disabled and additional lights like point/spot lights do not cast shadows. Also, the directional light shadow resolution is only 2048 where as the un-optimized asset is 4096. These differences save on some performance and offer a much better FPS but at a loss of visual quality. 

     You can assign the asset you prefer to use in the Project > Graphics settings.  

    HDRP specific optimizations

    You can find multiple render pipeline settings assets at Assets/Procedural Worlds/Game Ready Levels/HDRP Resources which have been optimized for different unity versions.

    If you are using unity 2021+ we recommend you assign the HDRenderPipelineAsset PWS HD 12.1.0+ and anything below this version use HDRenderPipelineAsset PWS HD 10.3.2+.

    HDRP is all about high fidelity so can sometimes be tricky to optimize to get good performance. 

    One of the expensive features is Screen Space Global Illumination (SSGI)

    SSGI uses the depth and color buffer of the screen to calculate diffuse light bounces. This can be very costly on lower end GPU and should only be used on higher end hardware. To disable this feature, go to Gaia Runtime/HD Environment Volume/Screen Space Global Illumination component in the volume profile and un-check "Enable".

    image.png

    Here you can see the difference between the 2 effects on and off and their quality impact in the scene. 

    image.png

    image.png

    You can see you lose a bit of the lighting quality having SSGI off but will save you some performance on lower end hardware. 


    User Feedback

    Recommended Comments

    There are no comments to display.


×
×
  • Create New...