Unreal Engine 4.25
Creating HDRI environment backgruond and lighting* in UE4:
Lighting using a panoramic HDRI background is also referred to as IBL – Image Based Lighting.
* The example HDRIs in this post are from www.hdrihaven.com
- Import HDRI environment file.
The file must be saved as a *.hdr file and not *.exr because AFAIK that’s the only way UE4 will recognize it as an HDRI environment and encode it as a Texture Cube (cube map)
- Enable the HDRIBackdrop plugin:
Go to Edit > Plugins
Type “HDRI” in the search field to locate HDRIBackdrop and enable it.
* You’l have to restart the UE Editor before using the plugin
- Drag a Lights > HDRI Backdrop object to your level:
- In the HDRIBackdrop details, select the wanted Cubemap:
- > Set the HDRIBackdrop‘s Intensity (self explanatory..).
> Rotate the HDRIBackdrop around its Z axis to set the environment’s direction.
> Set the HDRIBackdrop‘s Size.
* Make it larger than your whole scene,
And if Use Camera Projection is unchecked make it also large enough so that noticeable objects in the HDRI image will be distant enough as to not move incorrectly when you strife.
* When Use Camera Projection is activated the Size property has no effect.
> If Use Camera Projection is unchecked, set the Projection Center Z value to define the background image height below which it is projected as a flat ground.
> Lighting Distance Factor defines ground projection area that will appear to receive shadows from your scene objects.
* Set this attribute to 0 in-order to turn off the ground projection shadow.
> Use Camera Projection:
Activate this option to get a traditional infinitely far background with no flat ground surface projection.
- Sun & Sky link
- UE4 Architectural Glazing
3ds max 2020 | V-Ray Next | Unreal Engine 4.25
This post details basic steps and tips for exporting models from 3ds max & V-Ray to Unreal Engine using the Datasmith plugin.
The Datasmith plugin from Epic Games is revolutionary in the relatively painless workflow it enables for exporting 3ds max & V-Ray architectural scenes into Unreal Engine.
Bear in mind however, that Datasmith‘s streamlined workflow can’t always free us from the need to meticulously prepare models as game assets by the book (UV unwrapping, texture baking, mesh and material unifying etc.) (especially if we need very high game performance).
That being said, the Datasmith plugin has definitely revolutionized the process of importing assets into Unreal, making it mush more convenient and accessible.
Download and Install the Datasmith exporter plugin compatible with your modeling software and Unreal Engine version:
In 3ds max & V-Ray:
- Make sure all materials are VRayMtl type (these get interpreted relatively accurately by Datasmith)
- Make sure all material textures are properly located so the Datasmith exporter ill be able to export them properly.
- In Rendering > Exposure Control:
Make sure Exposure control is disabled.
If the Exposure Control will be active it will be exported to the Datasmith file, and when imported to Your Unreal Level/Map a “Global_Exposure” actor will be created with the same exposure settings.
Sounds good, right? So what’s the problem?
The problem with this is that these exposure setting will usually be compatible with photo-metric light sources like a VRaySun for example, but when imported to Unreal, the VRaySun does not keep its photo-metric intensity. (in my tests it got 10lx intensity on import). the result is that the imported exposure settings cause the level to be displayed completely dark.
Of-course you can simply delete the “Global_Exposure” actor after import, but honestly, I always forget its there, and start looking for a reason why would everything be black for no apparent reason…
* If your familiar with photo-metric units, you can set the VRaySun to its correct intensity of about 100000lx, and also adjust other light sources intensity to be compatible with the exposure setting.
- Select all of the models objects intended for export,
And File > Export > Export Selected:
* If you choose File > Export > Export you’l still have an option to export only selected objects..
- In the File Export window,
Select the export location, name the exported file,
And in the File type drop-down select Unreal Datasmith:
- In the Datasmith Export Options dialog,
Set export options, and click OK.
* Here you select whether to export only selected object or all objects (again)
- Depending on the way you prepared your model,
You may get warning messages after the export has finished:
Traditionally, models intended for use in a game engine should be very carefully prepared with completely unwrapped texture UV coordinates and no overlapping or redundant geometry UV space.
Data-smith allows for a significantly forgiving and streamlined (and friendly) workflow but still warns for problem it locates.
In many cases these warnings will not have an actual effect (especially if Lightmap UV’s are generated by Unreal on import), but take into account that if you do encounter material/lighting issues down the road, these warnings may be related.
- Note that the Datasmith exporter created both a Datasmith (*.udatasmith) file, and a corresponding folder containing assets.
It’s important to keep both these items in their relative locations:
In Unreal Editor:
- Go to Edit > Plugins to open the Plugins Manager:
- In the Plugins Manager search field, type “Datasmith” to find the Datasmith Importer plugin in the list, and make sure Enabled checked for it.
* Depending on the project template you started with, it may already be enabled.
* If the plugin wasn’t enabled, the Unreal Editor will prompt you to restart it.
- In the Unreal project Content, create a folder to which the now assets will be imported:
* You can also do this later in the import stage
- In the main toolbar, Click the Datasmith button to import your model:
- Locate the the *.udatasmith file you exported earlier, double click it or select it and press Open:
- In the Choose Location… dialog that opens,
Select the folder to which you want to import the assets:
* If you didn’t create a folder prior to this stage you can right click and create one now.
- The Datasmith Import Options dialog lets you set import options:
* This can be a good time to raise the Lightmap resolution for the models if needed.
- Wait for the new imported shaders (materials) to compile..
- The new assets will automatically be placed into the active Map\Level in the Editor.
All of the imported actors will be automatically parented to an empty actor names the same as the imported Datasmith file.
In the Outliner window, locate the imported parent actor, and transform it in-order to transform all of the imported assets together:
* If your map’s display turns completely dark or otherwise weird on import, locate the “Global_Exposure” actor that was imported and delete (you can of-course set new exposure setting or adjust the light settings to be compatible)
- Unreal – Architectural glass material
- Unreal – Camera animation
Unreal Engine 4.18
- Create a new material, and double click it to edit it.
- In the Details panel, under Material, set Blend Mode to Translucent.
- In the Details panel, under Translucency, set Lighting Mode to Surface Translucency Volume.
- Set Base Color to White.
- Set Metallic to 1.
- Set Roughness to 0.
- Create a Fresnel node and connect it to the Opacity input.
- In the Fresnel node, set Base Reflect Fraction to control reflection amount in perpendicular surface viewing angle (front).
* Note that its connected to Opacity, but since the material is basically a flat mirror, when it’s not purely transparent it will be reflective.
- In the Fresnel node, set Exponent to control the reflection amount falloff curve from perpendicular surface viewing angle (front) to parallel surface viewing angle (sides).
* Higher values will create a steep falloff curve, resulting in less reflection in most viewing angles.