November 13, 2014 by jonmillymiles
Within Unreal Engine 4, as with UDK, there are two types of scenery: basic BSP (Binary Space Partitioning) brushes and static meshes.
BSP brushes are used to create large pieces of architecture but are unwieldy to use well but they allow for the easy use of tiled textures to enable the production of quick and easy structures. They are also used for creating volumes, areas of game space with particular features, for example bodies of water, low gravity or sound effects like the acoustic effects of a cave.
Static meshes are 3D objects created in a 3D design package for example Autodesk 3DS Max, Autodesk Maya, Blender or Modo. They allow the user to create objects that are highly detailed to exacting measurements and then create skins to which textures can be applied. They are much harder to create than BSP brushes, but they are more detailed, less CPU intensive, can have animation applied and can be manipulated to a greater extent by the engine.
As such BSP’s are used for the initial “blocking out” stage of the level while static meshes are the preferred choice for the creation of final objects within a UE4 game.
Here’s a video from the Epic team outlining the workflow for the design of a level. In it you will see them moving from BSP’s to static meshes as they go.
In my previous Level Design module I made the bulk of the scenery with BSP’s primarily due to ease, however with this module I decided to immediately begin with static meshes. This fitted in well with my modular approach as it would make my level design more flexible and would allow for the possibility of using Blueprints to generate architecture using algorithms rather than creating everything by hand.
Initially I created the floor (always a good place to start!!) and did this by generating a box that was 200 x 200 x 20 units. I chose this scale as UE4 now uses 1 unit:1 cm as a scale and I felt that this would be convenient – especially for “snap-together” ease of use. Using these didn’t work well at first as I experienced an undesirable tiled effect, whereas I wanted the meshes to fit together seamlessly.
On examining the meshes closely I discovered that there were discrepancies with the meshes of thousandths of a centimeter, as such the engine was casting shadows. This was done by recreating my meshes and mathematically setting the origin of the mesh so that they all reflected a reference co-ordinate of 0,0,0. This meant that all other sizes would be accurate. Secondly I ensured at all operations carried out on the meshes where they would be required to tile were again mathematically precise. This provided a the required smooth walls that can be seen below.
This process was then applied to all floor and ceiling tiles. This change in design process has enabled me to generate a workflow that naturally ensures compatibility across structural meshes and effective placement programming within Blueprints. Elements of clutter can be referenced from a central point to aid placement accuracy in blueprints.
So, where does all this lead? Quite simply with meshes that tile properly I have built blueprints of rooms and simple corridors that allow me to begin to piece together a level like this:
Just how powerful are blueprints? Take a look at this picture: they are both the same blueprint. I will explain all in my next post.