This page provides a step-by-step tutorial for understanding a couple advanced materials workflows in V-Ray for Unreal.

 

 

Introduction


In this tutorial we’ll go over some advanced material workflows including using "Render material from vrscenewith your materials as well as rendering materials created outside Unreal Engine using External Material Libraries(EML). This tutorial is a companion and a followup of the QuickStart for importing vrscenes and we recommend seeing it before continuing with this tutorial.

 


Tutorial Assets


To download the files used in this tutorial, please click on the button below.

 

 

 


Part I - Render material from .vrscene


Step 1. Enabling "Render material from .vrscene"

To use this feature you have to right click on the material in the Content Browser you wish to override at render time and choose “Render material from .vrscene”. Select the FabricBlue and LeatherBlack materials, right click on them and enable the feature for them (1.1). For more details see documentation on Render material from .vrscene. Next click the V-Ray button in the toolbar (1.2) (1.3).

1.1

1.2

1.3

 

Check the final result with and without this features to see the difference (1.4).

 

 

Unreal
.vrscene

1.4

 

For the "Render material from .vrscene" to work you have to make sure that:

  • texture paths in vrscene file are correct and accessible at render time
  • you are enabling this feature on a material that was imported and not created inside Unreal

 

Part II - Render materials using External Material Libraries (EML)


Step 1. Creating materials to be used with EML

First let's create the materials that will be associated with those inside the EML vrscene file. Inside the Content Browser create (1.1) two V-Ray Material Instances and name them FabricRed and LeatherRed (1.2).


1.1

1.2

 

After we have created the materials assign the FabricRed to the two lounge chairs and the LeatherRed to the sofa (1.3).

 

1.3

 

 

Step 2. Enabling rendering materials with EML

To enable the use of EML you have to modify the "vraysettings.json" file located in the Content folder of the V-Ray for Unreal plugin. (Default is C:\Program Files\Epic Games\VersionNumber\Plugins\VRayForUnreal\Content) (2.1). You can open it using text editor like note. There locate the line "#mtl_libraries" : ["Content/mtl_library/mtl_library.vrscene"] and delete the # symbol to enable the EML functionality. Replace Content/mtl_library/mtl_library.vrscene with the path of your vrscene with the material or materials you wish to use at render time (2.2). For more details see documentation on External Material Libraries.


 

2.1

2.2


 

Part III - Rendering the final image


Step 1. Render Image

To render an image from Unreal using V-Ray make sure in the viewport you are looking from the camera (1.1) To render the image click the V-Ray button in the toolbar (1.2) (1.3).


1.1

1.2

1.3


Step 2. Refine the Render inside the VFB

As you can see the render begins filling in over time. Once we get past the earlier passes, we can fine tune the render without the need for external photo editing applications while the render continues to a cleaner and cleaner result.

In the VFB, open up the Show Corrections Control panel by clicking on the icon at the bottom right of the window (2.1). Here you'll be able to fine-tune the render by turning on and manipulating the parameters. Tune down the Highlight Burn in the Exposure tab. Adjust the White Balance to turn down the warmth in the image (2.2).

 

2.1

2.2


Check the final result with and without to see the difference (2.3).


 

Raw
Corrected

2.3

 

Step 3. Save  the Render

Now that the render’s done, from the VFB by click the Save button and select any of these image formats. We’ll select JPG here.

 

3.1

 

 

 

back to top