PDA

View Full Version : Modelling Mini-Tut - Modelling HESCO v2


Rhino
2017-06-04, 22:15
Quick tut to explain how to make the new HESCO v2.

For the new v2 HESCO we now represent two main types of HESCO instead of just one. These are:
MIL1 HESCO (http://i.imgur.com/cf5AKIS.jpg): 1.3m x 1m x 1m (height x width x length of a single block, this also being the main type seen in the old HESCO)
MIL7 HESCO (http://www.xuanke-huixin.com/img/image/20151115/20151115220749_9269.jpg): 2.2m x 2m x 2m (New High HESCO mainly for use in Main Base Defence, since it takes up fewer tris and lightmap space than stacks of MIL1 HESCO)
http://i.imgur.com/8OrvMhl.jpg


MIL1 HESCO (http://i.imgur.com/cf5AKIS.jpg)
Info: Same version represented in the old HESCO but modelled in a slightly diffrent size to allow for better grid snapping.
Block Size: 1.3m x 1m x 1m (height x width x length)
Block Segments: 1 x 3 x 3 (height x width x length)
http://i.imgur.com/s8IFa4R.jpg


MIL7 HESCO (http://www.xuanke-huixin.com/img/image/20151115/20151115220749_9269.jpg)
Info: New larger version mainly for use in Main Base Defence, since it takes up fewer tris and lightmap space than stacks of MIL1 HESCO, but can be used for FOBs etc too, just not so common for them in r/l than MIL1.
Block Size: 2.2m x 2m x 2m (height x width x length)
Block Segments: 1 x 4 x 4 (height x width x length)
http://i.imgur.com/x0WfYJt.jpg



Blocking Out
Firstly after you have determined what type of HESCO your making (MIL1 or MIL7), you then need to also determine the length your making. For this my main example, I will be making a 64m length of MIL1, but will also be showing some examples of making MIL7 where it differs from the MIL1 example.

First thing to do is block out a box of the length of HESCO your making, ensuring it fits in with the block sizes above, then multiply the block sizes by the amount of segments, in my case, 1.3m x 1 Height Segment which = 1 Height Segment, 1m x 3 Width Segments which = 3 Width Segments and 64m x 3 Length Segments which = 192 Width Segments:
http://i.imgur.com/kg9Rn7J.jpg


UVing

Next step is to UV the mesh, which may seem odd at this stage, before we start to manipulate and mess up the models, but its because of that reason we want to UV it now, as its super easy to UV in its basic block form, where it will be much harder later and any changes we make during the manipulation and messing up of the mess, we don't want applied to the UV either.
But before we start UVing, convert the mesh into an edible poly and delete the base, as well as set the remaining faces to the MatID we are using, in my case 1, then apply the material and the UVW Unwrap modifier.

First I'm going to Unwrap UV channel 1, select all the faces then apply Flatten Mapping to the selection with the following settings:
http://i.imgur.com/XUNg6XU.jpg
http://i.imgur.com/MXgIkgl.jpg

Then going to weld up all the bits:
http://i.imgur.com/OlQDb2f.jpg

Then I'm going to select all the face UVs and copy them, adding another UVW Unwrap modifier to the mesh and switching it to channel 9 (Lightmap UVs) selecting all the faces in that UV window and then paste the channel 1 UVs to channel 9. While they aren't totally setup the way we want for the LM UVs, they are a good base to work from that will save time overall (more so the case when UVing other types of models but still worth doing for even this).
http://i.imgur.com/56RNA86.jpg

Then adding another UVW Unwrap modifier, setting for Channel 2 (Detail Textures) and pasting the same CH1 UVs to CH2.
http://i.imgur.com/ZqyIW88.jpg


Now we have our base UVs setup on each channel we can start to play with them a little more to fit each channel better. First for the Ch2, Detail texture UV we need to scale it down a lot to be around the size we need. Now the texture map is a 1:2 ratio texture (1024x2048), which means we need to 1/2 its height first of all as if we apply the texture map we can see its streched in its current 1:1 ratio setup:
http://i.imgur.com/7UfAbXP.jpg

Go into the grid/snap settings and set the "Percent Snap" to 50%
http://i.imgur.com/64rmn2r.jpg

Then with % Snapping enabled, in UV Freeform mode drag its height down until it is 1/2 its current height:
http://i.imgur.com/ObSshzQ.jpg

Now the UV is at the correct ratio to the texture sheet, we now need to scale it down to the proper size to match the texture.

Now we have 64 blocks of MIL1 in our 64m length of HESCO, and our texture sheet has two blocks of MIL1 per horizontal tile, which means we need 32 tiles to cover all of the length, + another tile to cover the end textures.

First put the bottom left of your UV in the bottom left of the UV with no tiling, using this UV helper texture which highlights the edges of all the textures on the palette (Shaping[/SIZE]

Now that the UVs are done we can start shaping our HESCO to look at little more natrual.

There are lots of ways to shape them but probably the best way to shape them is with the FFD Box modifier, setting it to be twice that of how many blocks you have for MIL1 +1, or three times as many for MIL7 +1, so you have FFD control points for the outside and middle of each block. So for my 64m long MIL1 HESCO which has 64 blocks in length by 1 wide, I need 129 by 3 segments (by 2 for height) like so:



And then you can select every block's middle control point and move them out easily by 100mm like so:
http://i.imgur.com/gGD6MHA.jpg
http://i.imgur.com/suiBRXO.jpg
http://i.imgur.com/xr9WURb.jpg

If doing "Flat Ends" however you should only move the end points out by 20mm, just to help make sure there is a good join when the mapper snaps multiple sections together on the grid:
http://i.imgur.com/esUrP6x.jpg


Smoothing

Now we've got the basic HESCO shape, next step is smoothing. Unlike the old HESCO we are not going to have each block have its own smoothing group as to have the normals work properly, we want the thing fully smoothed with only the sides and top being on seprate SGs.

First select all faces, clear all SGs:
http://i.imgur.com/rfiHENv.jpg

Then select all the sides and give them all SG1:
http://i.imgur.com/Ll37qU7.jpg

Then invert the selection to select only the top faces and give them SG2:
http://i.imgur.com/gE94bFr.jpg

Now while the smoothing may look a little harsh on the ends, it wont be so bad ingame/editor and the normals will look a lot better, otherwise, you will have obvious seams between each block where the linking wirework are, and will look pretty messy. This also means fewer complied vertices having only two SGs.
http://i.imgur.com/qmtACcH.jpg


If however doing "Flat Ends" for the mapper to be able to snap multiple sections together on the grid, you should give these flat ends their own SG.
http://i.imgur.com/icM8z5z.jpg



Noise

Finally, so each block isn't totally uniform we are going to add some noise to the mesh to mess the up and make each one somewhat unique in shape :D

For the first noise pass, add a Noise modifier to your mesh, put in a random seed and for this one we are only going to affect the X and Y axsis, but not any Z (vertical) axis noise, since this will affect the entire model including the base which we want to keep flat.
Give the X and Y around a 50mm strength value, checking Fractal noise and giving it a roughness of around 0.5 with 6 iterations:
http://i.imgur.com/QlcKPBw.jpg

Next add an editable poly modifier on and select only the inner top 4 verts of each block, then apply soft selection with around a 1m falloff range and other settings you can leave at default but can mess with the settings to suit your needs.
http://i.imgur.com/uBY23Rl.jpg

Then add anouther Noise Modifier on that will just affect the Z, vertical axis and with a strength of around 100mm, with Fractal noise with a roughness again of around 0.5 and around 6 iterations:
http://i.imgur.com/6YmJ3by.jpg


Lastly, on the end corners, you may notice a bit of texture distortion like so:
http://i.imgur.com/tlCcW4n.jpg

This is simply fixed by adding an edge front the corner to the central vertex like so:
http://i.imgur.com/ro23Oto.jpg



LODs

LOD1 is very simple for MIL1 HESCO, just select the middle edge of every block, ring them and collapse them, to form this, pretty much 1/2 the tri count:
http://i.imgur.com/xHIRnzp.jpg
http://i.imgur.com/QR1TOWs.jpg

LOD2 is basically just a box so just remove all the inner edges:
http://i.imgur.com/cQORfUJ.jpg
http://i.imgur.com/sTaREC9.jpg
http://i.imgur.com/CrP8BhV.jpg

And then assign Material ID 2 to all the faces, which is the HESCO lod texture, which is the same as the main texture, just without the normal map.
http://i.imgur.com/FEmeuHT.jpg



Collsion Meshes

col0 (decal) and col2 (player) are basically a clone of LOD1, with then just applying the gravel material to the top and the sandbag material to the sides:
http://i.imgur.com/AhNKeQ7.jpg

col1 (physics) is basically a clone of LOD2 with the same material setup.
http://i.imgur.com/AO4pZDs.jpg

col3 (AI) is a clone of col1, but with the bottom face capped and only the sandbag material applied to it:
http://i.imgur.com/UDmaA5C.jpg
http://i.imgur.com/3vYnr7v.jpg

Finally once you've made all your cols you should apply an optimize modifier to them with a Face Threshold of around 2 to keep them matching the orignal meshes mostly, but to remove any unessary tris at the same time. This can't be done for LODs as it screws up the UVs.
http://i.imgur.com/Li1RqnD.jpg




Lightmap UV Packing

Now that the models are 100% done its time to pack the Lightmap (LM) UVs.

Select all the LODs and apply a ch9 multi-object unwrap UV to it:
http://i.imgur.com/o44DfIJ.jpg

Then scale down the UVs to be the height of a single tile, but keeping the propotions the same:
http://i.imgur.com/A9m560G.jpg

Now we know the length of our HESCO is 64m, + an extra 2m for the extra end bits sticking off. The height of our HESCO is 1.3m and the width is 1m. Now since we have two sides UVs, being 1.3m high and one top UV being 1m high, that means we have a combined UV height of 3.6m (1.3+1.3+1). As such our UV currently is 66m by 3.6m, which means our length is around 18 times bigger than its height. So we need to scale down our width to be 5.5%. So snap the UV to 5.5% of its wirth will put it in side the box:
http://i.imgur.com/bc6jUbh.jpg
http://i.imgur.com/DMGy7VO.jpg

Now 16:1 ratio is the closest we can get when dealing with the power of two sizes, and as such, a 1024x64 LM size sounds good for this, which is around 16px / meter. Pixel Map helpers: http://files.realitymod.com/resources/Pixel_Maps.zip (http://files.realitymod.com/resources/HESCO_v2_UV_Helper.png]right click, save as to download then use):
http://files.realitymod.com/resources/HESCO_v2_UV_Helper.png
http://i.imgur.com/6tZItOL.jpg

Above we determined we need 33 tiles to cover everything but since 0 tiles actually = 1 tile, we need to set a number of tiles we want to 32:
http://i.imgur.com/QUV0vPk.jpg

Then keeping the UV ratio the same (hold down ctrl) and with % snapping now off, scale down the UVs from top right to bottom left to the edge of the tiling like so:
http://i.imgur.com/xsHCdMQ.jpg

Now as you can see it currently doesn't fit perfectly since the texture for each block is 512x512px (1:1) and our block is 1.3m x 1m.

But before we get into fixing that lets first detach the top sides, rotate 180 (don't flip) and match them with the bottom:
http://i.imgur.com/Ni8uh18.jpg
http://i.imgur.com/mwJh2pM.jpg
http://i.imgur.com/ujoHlF3.jpg

And then let us also break off the top faces from the bottom:
http://i.imgur.com/zL7Wx9g.jpg

Now selecting the side UVs in vert mode (best to use "Select Element" mode, then with selecting one vert of each element you will select them all) we can then drag down the top (while holding shift to only affect the vertical axis) to match the top of the side UVs with the texture, using the UV Helper texture as a guide by putting the UV edge right on top:
http://i.imgur.com/NOoONR4.jpg
http://i.imgur.com/TmtFpgm.jpg

Then selecting the top sides, just position them over their textures correctly, making any minor corrections that might be needed to put them on top of the edges of the UV helper texture:
http://i.imgur.com/iFWJxgW.jpg
http://i.imgur.com/PFyp7jS.jpg
http://i.imgur.com/bsGHDPT.jpg

Now because this is a pretty long bit of HESCO, it actually just exceeds the maximum amount of tiles for a static mesh in BF2, which is 16 tiles (-1 if you count that 0 tiles actually = 1 tile in the UVW window, so 15 tiles in there), as you can see here (in SS I thought it was 32 but its 16 as corrected below, just not in the screens):
http://i.imgur.com/I1aGxGu.jpg

Now there are two options here. The first is to break up the UVs into small chunks and have them overlapping each other, the second, since our UV currently starts at 0 to 32, we can actually move our UV to be in the negative UV area, since the tile limit is in fact from 16, -16 to +16, +16.

So selecting all our UVs, switch to offset mode in the bottom left of the window and then type in "-8" into the U box, which will then move all our UVs -8 tiles, and all will be inside the tile limits :D
http://i.imgur.com/giDU2yn.jpg
http://i.imgur.com/ahQygD2.jpg


With our Ch2, detail texture UVs are done, we can now add another UVW Unwrap modifier and fix up the colour texture UVs in channel 1 :D
http://i.imgur.com/uXbyFN0.jpg

Now I'm not going to give any exact tile amounts for the "dirt_c.dds" since all this texture is for is to add variation in colour and generally, make the main detail texture look less repetitive and add variation, and having each HESCO model use the same tile settings etc will only make them look more uniform to each other which is the opposite of what we want to achieve here.

So instead of scaling down to an exact amount, scale down (keeping the UVs aspect ratio by holding ctrl, this is a 1:1 ratio texture so the UVs we did before are in the correct ratio already) until the textures look about the right scale on the model:
http://i.imgur.com/mReJAFf.jpg

Here, however, we can already see quite a bit of repetitiveness so to help cut down on that, rotate the UVs a little so that they don't use the same area of texture each tile:
http://i.imgur.com/7YLZQhp.jpg

Now the rotation amount, scale and position of each model you do you want to ideally keep as unique as possible between each model so none look the same, just avoid using 90 or 45 deg rotations, or anything to close to them otherwise you will start to see a common pattern in the colour texture.



[SIZE="6)
http://i.imgur.com/3GtzZWv.jpg

Next we want to break the diffrent sides up as they can easily have quite different lighting, but keeping them close to their original join and keeping them same px apart, in this case 2px:
http://i.imgur.com/uOPFhRk.jpg
http://i.imgur.com/cSCZtdQ.jpg
http://i.imgur.com/hQmNQae.jpg

Finally, stretch out the UVs to use the maximum space, but 1px in from the border to avoid the LM bleeding into surrounding textures:
http://i.imgur.com/vofgeW4.jpg
http://i.imgur.com/lnVFFHV.jpg

And again ensure everything is 2px+ apart (done 4px for the end bits sinde one isn't a direct stich to the other)
http://i.imgur.com/eEEgZqk.jpg

Set the UVs then make tweaks for each LOD's UVs to be lower sizes, for my example LOD1 is 512x32 and LOD2 is 256x16:
http://i.imgur.com/osoCkT9.jpg
http://i.imgur.com/324CH4P.jpg
http://i.imgur.com/PqIistZ.jpg

Finally, mark down the LM sizes in a .txt file for mappers to use if using 3DsMax LMs like so:
hesco_mil1_64m 1024*64 512*32 256*16

Outlawz7
2017-06-05, 02:00
http://i.imgur.com/E9QCpmi.jpg

I added a noise modifier with those exact same settings and it barely changed the model until I changed scale to 1 instead of 100. Why is Y your vertical axis, its Z on my end.

Rhino
2017-06-13, 09:39
Updated OP for HESCO v2 :D

@Outlawz, ye, mixed up Y and Z since the editor has Y as its vertical axis, Max is Z hehe. Fixed in the update. Dunno what the scale issue is thou, possibly down to your scene settings?