Friday 20 June 2014

Achievement in Construction I - Railings and railing like objects

Today I took a little time to experiment with the construction script, the game will utilise a lot of barriers as a form of cover utilised by the player, these barriers are re-enforced by the war game augmented reality and can be temporarily disabled by players and their weapons.

Immediately it's obvious, creating a large number of barriers for different lengths, the correct length shield re-enforcement and hooking each one up in the blueprint editor is time consuming, especially for a one man team, a big plus of Unreal Engine 4 however is generation of assets using the construction script.

The best way to start off with the barrier, is by creating assets that can be used for their creation, for now I've kept it simple, an end segment and a mid segment, the blueprint takes these and uses them for creation of a larger barrier.

A mid and end segment for a simple railing, for now my
assets are fairly rough, lacking in detail or texturing,
mainly used for the test environment
Once I have these assets the next step is to set-up a blueprint, all of the asset creation is handled through the input panel using some basic properties. As I wanted to keep this construction as modular as possible I kept the input flexible but simple, the input requires a few items.

End/Mid Mesh - Input to select the meshes that end/make up the railing
Segment Length - The length of an individual mid segment
Segment Count - The total number of segments that make up the railing
Textures - Used to set the texture for each segment allowing a little more variety


The inputs are simple, but offer lots of potential variation,
the only real limits being pivot placement must be the same
for generation reasons.
With the inputs complete the next step is to test it out and see if it works, in this case, dropping it in, selecting the correct meshes and tweaking some of the parameters, obviously adjusting the Rail Segment Length causes issues, such as gaps and overlapping meshes, tweaking the Rail Segments however produces the desired effects.

Above, a rail with 6 segments that covers the entirety of the edge, below, the exact same rail with only 3 segments
as shown, it is much shorter, covering a smaller section of the ledge.

Immediately we can see the segments variable correctly adjusts the number of rail segments used, the asset in the above images is the exact same blueprint, with an adjustment to the variable, the mesh updates in real-time within the engine, as soon as the inputs change the engine re-builds the mesh using the construction script within the blueprint.

Now the obvious issue is that this particular rail doesn't look like it offers much protection in the war games, and you'd be right, so the next step is to add shield barricades.

No comments:

Post a Comment