top of page

Random Mesh Generator for Unreal Engine


Product Type: Digital Asset

Use Case: Digital Asset Generation, Level Design, Prototyping

Game Engine: Unreal Engine 4 / Unreal Engine 5



The product generates random assets from a collection. The script is a modification of Matt Aspland's workflow. In this version, the random meshes are generated using the construction script as opposed to an event as well as the addition of a material randomization feature for each of the meshes.


To download the product for free, click here.



SETUP & USAGE GUIDELINES


OPENING THE PROJECT


Start by unpacking the compressed .zip file and open the UE project file. You will be greeted by the following scene.



The RandomMeshGen contains instances of the blueprint which update when alterations are made to the asset's transform values or when it is duplicated.


PRODUCT FEATURES


The product is a Blueprint Actor containing a script that randomizes the asset spawned when the actor is imported into the scene, duplicated or when its transform properties are updated. The following visual depicts the node setup for the blueprint as seen in Matt Aspland's tutorial.



While this Blueprint generates the desired effect of spawning random assets from an array, the respective assets must be created as Blueprint Actors themselves with a script that randomizes their materials. The following can be seen within the Construction Script Editor window of the asset's Blueprint Actor.



1 - Import the asset into the Blueprint Actor.


2 - Get the asset's reference and connect it to the Set Material node.


3 - Create a variable and set it to the type, Material Interface - Array. Name the variable appropriately.


4 - Get the variable's reference and connect it to ta Random node. Connect its output pin to the the Material input of the Set Material node.


5 - Add as many Array Elements as you like depending on the number of materials you want the asset to cycle through.


Press Compile and Save. Repeat the above steps for other assets.



ADDITIONAL RESOURCES


bottom of page