Support   /   Tutorials   /   Tridify BIM Tools in a Unity 2019 HDRP project

Tridify BIM Tools in a Unity 2019 HDRP project

This tutorial will show how to generate lighting in your Unity High Definition Rendering Pipeline project using Tridify BIM Tools.

  • Version used in this tutorial: Unity 2019.1, High Definition RP package 5.7
  • Note: The settings and values used in this tutorial work in this example scene. You might need to experiment with different settings to better suit your needs.

Create a new Unity Project, select High-Definition RP Template.

Prepare the scene. In the Hierarchy window delete Example Assets, Scene Post-process and Directional Light. Create new Directional Light (menu: GameObject > Light > Directional Light) to simulate sunlight in your scene. Select the light and in the Inspector window set Intensity to 6. Enable shadows (Shadows > Shadow Map) and increase the Shadow Map Resolution to 2048.

Delete ExampleAssets folder in the Assets directory (Project window > Assets).

In Lighting Settings (Menu: Window > Rendering > Lighting Settings) un-tick Baked Global Illumination and make sure Auto Generate is Off. Enable Realtime Global Illumination.

Unity 2019 and current HDRP package versions (5.7, 5.13) have some issues with Procedural Sky. You can use a background colour or, as in this tutorial, Skybox to give the impression of scenery.  Import HDRI image* to the project (Project window, create new folder, menu: Assets > Import New Asset…). Select the image file and in the Inspector change Texture Type to Cube and click Apply.

  • Tip: To find an HDRI image you can use words “360 HDRI” in an online search.

Select Default Post-process (Hierarchy window) and in the Inspector uncheck Exposure.

Select Rendering Settings (Hierarchy window) and uncheck or remove Procedural Sky and Volumetric Fog. Click Add Override and add HDRI Sky. In Visual Environment component change Type to HDRI Sky. In HDRI Sky component enable Hdri Sky and assign your HDR Cubemap to it. Enable Sky Intensity Mode and Exposure. Set its value to 3. In Static Lighting Script component change Static Lighting Sky to HDRISky.

Save the scene.

Import Tridify BIM Tools to the project (menu: Window > Asset Store). How to register and install Tridify BIM Tools: https://www.tridify.com/support/tutorials/

Import your converted model to the project with Tridify BIM Tools (menu: Tools > Tridify > Conversion Projects). Before importing the IFC model, it has to be converted via Tridify’s Cloud Service – simply set up a free account to access: https://convert.tridify.com/#/register

Imported model uses Unity’s built-in render pipeline materials by default. Upgrade your project materials to HDRP-compatible materials (menu: Edit > Render Pipeline > Upgrade Project Materials to High Definition Materials).

All transparent materials, like glass, has to be set as Transparent in Surface Options (Project window > Asset > Floors > Materials, select the material, Inspector window > Surface Options > Surface Type).

Current versions of HDRP do not support translucent shadows and handle f.ex. windows as they are opaque. Use Tridify Search Tool to select all Window objects (Menu: Tools > Tridify > Search Tool: IFC Product Type, type in Window, click Search and Select) and change Cast Shadows (Inspector > Mesh Renderer) to Off. Do the same for all transparent elements in the scene.

Create interior lighting with Tridify Floor Lighting Tool (Menu: Tools > Tridify > Floor Lighting). In Floor Lighting window check that object definitions are correct. If not, the definitions have to be made manually. Create Floor Lighting. More precise instructions in https://www.tridify.com/support/tutorials/creating-floor-lighting-in-unity-with-bim-tool/

You can resize Emissive Lights’ 3d icons in the Scene window (Scene window > Gizmos > 3d Icons).

The Floor Lighting tool creates light planes to the ceilings. Planes use emissive material to emit light. Upgrade the material to HDRP by selecting EmissiveLights material (Project window > Assets > Scenes) and in the Inspector change EmissiveLights Shader to HDRP/Unlit. Change EmissiveLights material’s Emissive Color to white (Emission Inputs > HDR Color box) and increase the Emission Intensity to 6 (HDR Color box).

If you want the light planes to be visible you can leave them as they are. If you want them to emit light but be invisible change EmissiveLights material’s Surface Type to Transparent (Inspector window > Surface Options > Surface Type). Also change material’s Color Alpha (Surface Inputs > Color box) to 0 to make them fully transparent. Emitted light will be visible after lightmaps have been generated.

The Floor Lighting tool also creates Light Probes to add indirect lighting for objects that will be moved around (furniture etc.).

Objects that will not be moved (i. e. buildings) should be included in the lightmapping process for better quality global illumination (GI). Those non-moving objects have to be marked as Static. Select your parent object in the Hierarchy window and mark as Static in the Inspector (right top corner in Inspector window). Change child objects as well.

Before baking lightmaps check that every requested configuration for HDRP is working well. To configure your Unity project is compatible with HDRP open Render Pipeline Wizard (menu: Window > Analysis > Render Pipeline Wizard). If there are any issues you can press Fix All.

Finally we generate lightmaps. In this example we use precomputed realtime GI, that allows us to have bounced light and change it in realtime. Click Generate Lighting. This baking of lightmaps may take between a few minutes to several hours dependant on the size of the model.

If you want to take your project to the next level you can change the materials (https://www.tridify.com/support/tutorials/using-material-replacer/), add furniture, use reflection probes and/or screen space reflections and add new post-processing effects.

By continuing to browse the site you are agreeing to our Terms of Use

How it Works Use Cases Pricing News Support Contact
Log in Sign up for free