- Exposure: public
- UE Version: 4.23
This blueprint sample is a group of methods (with Call-In-Editor ones) that are used to generate pretty easily all the required assets (Textures, Materials, and an Actor convertible to a final mesh) impostors able to copy rectangled-shape elements. This is part of a project I've worked on, "Lights Orb".
The game Artistic Direction was firstly based on modular assets, able to generate buildings made from a lot of instanced meshes.This system was very useful to quickly produce different buildings, but wans't really performance-friendly, especially for far-away buildings that didn't need to be very high resolution.
This is why I created this "Buildinf's Impostors" creation process. The idea is to capture all the faces of the building (back, front, left, right and up) in order to generate textures and materials for each face. Then, an Actor is generated, copying the base building's dimensions, and the created materials are applied on them in order to get the final copy of the base building. By using the "Make Static Mesh" editor utility, we can make it a final static mesh, usable anywhere in the game.
This method was very efficient and allowed us to put a lot of impostors in the level's surroundings in order to fill them and prevent them from feeling too empty.
This system uses two blueprints :
- The Capturer : A blueprint used to capture the faces of the building (tooling blueprint).
- The Building Impostor : A blueprint used to copy the faces of the base building, by copying dimensions and receiving the captured materials (instantiated blueprint that can now be converted as a static mesh). An important notion about this system is that, in order to generate textures with power of 2 dimensions, void will be capture above each building's face.
Here is the list of the most important methods of that system :
- CopyBuildingSetUp : The Capturer copies the base building's dimensions and location to place the Capturer and set up the capture dimensions.
- MakeImpostor : The Capturer captures each one of the base building's faces, creating the textures and materials, then spawns a Building Impostor and sets it up, calling the Set Up Faces Method. This
- GetBackCaptureCameraParameters : This is one of the methods that is used to calculate the capture parameters (there is one different for each face, but pretty similar in principle).
- SetUpFaces : This method, called on the generated impostor, takes the building's dimensions and generated materials to copy completely the base building.