Tech - Week Nine
- Elliott
- Mar 16, 2015
- 3 min read
The random asset location tool is exactly what it says it is. It’s a tool. One that gives an asset a random location. Well not completely random otherwise it’d be useless. You give a set area for which the tool is to work within and then it will place the assets within that area.
The idea for this came when I saw something similar had been done in one of Ninja Theory’s Hellblade development diary videos. Only seeing it very briefly being used I wanted to see: one if I could recreate a tool that did the same job, but two improve from what I had seen and try and push the capability of a tool like this.
To have the same functionality the tool has to be able to randomly locate, rotate, scale and position a given mesh. That wasn’t particularly difficult to get working… what I wanted though was to give the user the ability to then tweak the location of the assets once they had been placed. Unfortunately it’s not just a case of clicking on the mesh and moving as you would any other placed asset. If the location is set and placed by a blueprint it makes it difficult to then change.

To get around this I instead did the random transforms on a transform variable as these have 3D widgets that can then be interacted with in the editor. Once I get that working it was just a case of getting the meshes transform to mirror that of the transform variables. This not only meant you can do all the randomisation that they had but also then edit it per asset to best fit what you need.

The next bit I needed to get working was to have it so that the meshes will align to what’s underneath them. This is done by doing a linetrace on the Z axis from each location and then repositioning the meshes to the point in which the trace hits an object, thus meaning it will follow the ground as you move them over it.

Moving away for the asset location for a bit, I have also been working on the decal side of the project. Part of the Environment Pack is include a set of decals to help with the dressing of the environment. Given the nature of the environment we wanted to have graffiti as one of the options for the decals.

Before I set about making tones of texture sheets, each one with a single graffiti tag on it to be used for decals I thought it’d be best if we could atlas them all onto one larger texture sheet and then select which one we wanted to use. Much like a flipbook texture but instead each frame is a different piece. Like a flipbook texture I took the part of the logic out of the pre-existing material function and used it to make a material that when driven by a blueprint will allow us to do just that. The blueprint still has work to be done on it as I would like it to be as diverse as possible but it’s base functionality is there and can be used for projecting atlas’d graffiti textures in its current form.

In the week to come I’ll be continuing to work on both blueprints, the ‘Random Asset Location Tool’ and the Decal Tool, as well as creating more decals and hopefully fixing any technical issues that arise in the project.
Comentarios