UE Blueprint

Automating Material Creation from DataTables

I often receive Excel or Google Sheets containing project data. A common example is the "Exterior Body Colors and names" sheet, which lists vehicle body color names alongside their corresponding HEX and RGB values. Initially, I created these materials manually in Unreal Engine. However, frequent updates to the list made this process time-consuming and prone to errors.

That's where this Editor Utility Blueprint comes in! It automates material generation using a DataTable, streamlining the process and minimizing errors.


Sample Data and Automated Material Creation.

This example showcases a Google Sheet (Excel also works) containing material data. This sheet can be expanded to include additional fields like material parameters and pricing for future use.

The provided Editor Utility Blueprint streamlines the material creation process. It iterates through each row in the spreadsheet, automatically generating materials based on the following data:

Material Name: Extracted from the corresponding cell in the spreadsheet.
Material Color: Extracted from either the HEX or RGB value provided in the spreadsheet.

One interesting challenge involved accurately converting colors from the data table (spreadsheet) to Unreal Engine format. This required calculating the correct math for HEX to RGB and RGB to Unreal Color. To ensure reusability, I created dedicated functions for these conversions.

Initially, there was a slight discrepancy between the generated colors and the values in the spreadsheet. However, with persistence, I identified and resolved the issue. You can see the accurate color conversion in action in the video above.


Blueprint Snapshot 

No Code Website Builder