Author: waynemarsden

Task 2 – Foliage / Procedural Foliage – 2 of 2

For the trees populating my landscape both dense and sparse I used 3 spawners; 1 grass and 2 tree types which referenced 3 foliage types, 2 tree types and 1 grass. These are utilising UE’s current experimental foliage spawner and can be seen in the image below:

trees-3

Here are where I fine tuned the density, placement of my trees. One of the key things I needed to adjust was the ‘Ground Slope Angle’ which I had set to 15 across most of my spawning areas whilst 5/10 was used on a couple.

trees-4

The reason for the above angle / slope placement setting is shown below. I didn’t want the trees placed on the rocky areas which as detailed here was procedurally textured based on slope height / normal direction. This is just a general realism / consistency issue and fits with the aesthetic and narrative of my level.

trees-1

In the final image below you’ll notice close to the valley-esque areas where the roads lead out of town the trees are more tightly packed and overshadowing the roads below whilst the other 2 larger areas are far sparser.

trees-2

Optimisation / Efficiency

The experimental procedural spawner by default borrows techniques utilised by the general foliage painter within UE which help increase efficiency by optimising shadows, lowering light map resolution.

Initially though I was getting some really poor performance with spikes dipping from 60 down to 10/15 FPS and lower dependant on the direction the player faced. I made several adjustments to address this:

  • Lowered the lightmap resolution from 8 to 4 (per tree / foliage instance)
  • Changed the wind quality / settings to be faster and less quality driven
  • Removed collision entirely from these as the player wouldn’t be able to reach these due to blocking volume placement
  • Utilised culling and LOD methods

Results / Performance

Having done this I then rebuilt the lighting and saw drastic and almost flawless performance when in game, spinning the character around and testing all the areas / visible angles towards the landscape trees I was averaging 60 FPS with peaks of upto 90 FPS.

The biggest drop to 30 FPS was only evident in the park where I have higher quality grass foliage and trees which is an absolutely fine and acceptable number albeit it not related to my landscape foliage.

Task 2 – Procedural Landscape Material

Here’s an overview of my procedural landscape material:

foliage-4

The nodes doing the work here are the ‘WorldAlignedBlend and several ‘Lerp’ ones.

WorldAlignedBlend

This node has several input types, the two I have used are:

  • Blend Sharpness
    • How smoothed, blurred or sharp a material is.
  • Blend Bias
    • The priority of your material.

Whilst this may seem straightforward, it actually takes a little bit of tweaking with the values to get this to translate.

Misunderstandings

A common perception of how this node works is that the bias is based on the angle of the slope, but this doesn’t quite ring true. It’s actually based on the normal directions of the material. In some instances, this does line up in such a way that it gives the impression it is based on the angle of said landscape slope.

Essentially, sort the blend values for each material and a set of normals for each material as required and then plug them into their respective material inputs i.e.’Base Color’ and ‘Normal’.

Task 4 – Full Quixel Texturing Process

To see the detailing of my jeep texturing, browse to the lower half of this post. The initial texturing process of my park bench is far more simplified than the one of my jeep but also brought different considerations such as the directional grain of the wood.

Park Bench

So, my bench which was an incredibly simplistic model that didn’t have a metal frame this was initially composed of a single wood material.

ParkBench-8

I’ve seen many threads discussing how to get the directional grain of the wood correct on meshes like this, so I knew how to address this.

In the below image the back grain should be flowing vertically but by simply adding the smart material this was flowing horizontally.

Within Quixel per smart color ID, you can manipulate numerous values and one is texture direction and offset. By changing this I fixed the grain on each segment respectively; the back, the front legs, and the seating.

ParkBench-9

In the below image you can see that due to an initial 1024 diffuse and normal map bake there are issues with bleeding and padding. Below shows a perfect break between UV islands where a gap is created.

Also shown to the left is a duplicate material ready and currently hidden.

ParkBench-10

Whilst this can be fixed in a handful of ways, such as going back to Maya and adjusting the UV’s, padding this can be quite irritating and may take several ‘rule of the loop’s’ to ensure you’ve fixed the issue.

Because of this, I decided to do a workaround that I came up with myself. Chances are more than likely other artists have also realised this workaround, but it works for me and isn’t particularly inefficient whatsoever.

Dynamask Editing

The technique is to add a second identical smart material to the mesh but not to a specific color ID; what this does is guarantees you a blanket material without any gaps.

However, this as you can imagine also doubles on the all your current texture map values and strengthens the look.

What I did was go into the Dynamask editor, advanced painting mode within Quixel. I  then used the’Show Mask’ option shown at the top right in the below image. Following this, I inverted the mask as so the texture has no actual space on my mesh.

ParkBench-11

From here I then made sure my brush was ready to paint white (i.e. actual texture information) and brushed delicately over the below seam.

ParkBench-12

After some considerable tweaking in UE4 itself here is the result in one still point of lighting. For a lower 1024 mesh this is absolutely fine. When I first brought this in it fell victim to the common issue of bringing meshes from DDO to UE4 where the roughness feels completely wrong.

This is due to several possible issues:

  • SRBG needing to be unticked within grayscale maps such as roughness.
  • A need for tweaks within the material itself in UE4.
  • Project settings – auto *TO FIX* needing tweaking / remove.

ParkBench-13-UE4-1


Jeep

This worked better than I could have hoped. From here I then spent time texturing in Quixel. The results of one type of material can be seen below, I’ll be using two completely different themes for my jeeps to keep things varied.

jeep-17

On a Wiley’s jeep seen below, you’ll notice there’s a lot of extra modeling potential. The majority of these cannot be done through means of normal mapping although some parts can, like the rear star or the number at the front. This is something I’ll do once I have the bulk of my level textured.

For now, though I am extremely happy with my first vehicle!

jeep-16

Task 3 – Full Pre-Texturing Process

Below I detail the full texturing process and pre-setup needed to do this to a professional, portfolio level of standard. Because I go into such detail most other textured meshes in my level will be shown in a separate post here as they’ll be going through the same process. The only variation to this will be if I use any alternative techniques or software to texture my assets.

The jeep was the most complex item I had in terms of considerations to model, and as such is the one I chose to go through in detail:

Texturing Preparation

Below I make use of the isolate select option to make things easier to see.

jeep-1

I opted to have a large exterior sewn together to avoid seams on the beveled corner as these could severely impact the look of the model.

jeep-2

To be efficient with my UV space, I decided to stitch together the underside area, shown below, as it made the most sense for my shells. I had to move them in slightly to avoid overlapping the UV’s; as you can see, the actual model has 2 areas covering the axle and I didn’t want these being part of that shell so to avoid stitching those areas I just stitched the top and bottom, and essentially scaled the sides in. The shell looks like it’s fully stitched, but it isn’t.

jeep-3

The grill was quite challenging as UVing beveled shapes, such as this, can be a nightmare. For a while, I was unable to improve the UV’s beyond the image shown:

jeep-4

To get a better unwrap result I cut off the faces running the entirety of the mesh (I didn’t actually notice at first these were part of the initial unwrap). From here I applied some extra unwrapping techniques,  and I eventually got an almost distortion-free unwrap, which shouldn’t be noticeable in the final model:

jeep-5

The tires were a challenge, and a part of my model I had already considered may need revisiting at a later date to change the way I worked the treads in. Since the rest of my jeep is low poly it seems to be a case of two birds, one stone by not only lowering the poly count even further but also smoothing off a standard set of tires and then baking in the tire tread via the use of normals.

For now, though I decided to work with what I had. Basically, I cut out the tread sections and unwrapped the entirety of the rim. This was done on both sides, but the ones on the inside will be less visible/potentially invisible, and as such have been scaled down elsewhere:

jeep-6

Following on, I kept progressing and keeping my texel density in line with the other mesh areas:

jeep-7

Here are the small mechanical objects situated towards the rear of my jeep which essentially support the piping that flows around the top of the jeep. Again, using sensible UV’s, I hide my seams accordingly and stitch the inside together (remembering a pipe will be going through this hole so one seam on the inside will never be noticed):

jeep-8-justificationjeep-9-justification-2

Organisation

I began to organise my UVs based on sections of the car and what I would be deemed important. To the right are objects I would be scaling down considerably; whilst the central area holds my most important parts which would need the majority of the 0-1 UV space.

jeep-10

An example of areas I’ve hid by scaling them down in the texture editor. These are things such as the inside of the wheels, the underside of the jeep, axle and areas you can’t really see at all such as the pipe supports as mentioned above:

jeep-11

Texturing Preparation – Baking

After my initial bake, I saw results as shown below. Concerned, I had to research on various forums and experiment myself to see what was causing this.

jeep-12

Whilst being familiar with the idea of colours bleeding due to things like UV spacing I decided to revisit my UV’s and be more generous with the spacing.

One key issue I had allowing objects to have more resolution and thus warrant additional spacing was that my exterior that I previously decided to have as one large piece forced a loss of space due to the shapes of my other shells.

To combat this, I decided to take a step back and carefully look at my jeep. What I quickly realised was that the tire at the back effectively covers the back middle area of the body, completely. This was an excellent place to hide a seam and allow the vertical height of my main shell to be halved.

The results were fantastic, as you can see below, more space is used and more efficiently:

jeep-13

Whilst this was great I still had no idea if my issue would persist so I attempted something completely new. What I noticed, when baking, was that your target and source meshes can be precisely that – more than one. As this was something never taught and never needed prior I thought it’d be a great opportunity to give this idea a try.

Below you can see I separated all my mesh areas whilst keeping things like both lights together (parts that couldn’t possibly bleed into one another based on UV space/world space). I then grouped them in the outliner which just made organisation and selection so easy to do whilst keeping everything separated.

jeep-14

As you can see it forms a more reliable envelope this way and allows fine tuning of individual envelope areas if you want that extra precision. In my instance, though I wasn’t baking a normal map at this stage so I just ran with 0.1 search values and baked my diffuse:

jeep-15

The texturing stages and results can be found here.

Task 2 – Terrain Heightmap Implementation – 3 of 3

World Machine

Without spending too much time detailing and going off track, with regards to software functionality, World Machine is essentially another go to industry piece of software for terrain generation and creation.

I spent a little while with the trial before realising the cap on my detail was set to 512×512.

WM1.jpg

For my purposes, I was looking for an optimised 4096 landscape. Arguably, I could perhaps make do with a 2048 landscape that would be carefully altered as a background filler alongside level and mesh adjustments; but, I was going to use 4096 and tweak the lighting /lods and only.

My Implemented Solution

Both of the below images will open to full size if clicked. These are basically manual height maps created in Photoshop at a 4096×4096 resolution.

Below you can see the result of the above right image with the heavier white values which translate as an increase within the height map.

manual2

Below you can see a final and more refined height map (the first image linked above on the left). This is also in UE4, and positioned with my map and town show a central view. These images also show my landscape procedural texturing implementation, which I detail separately in a subsequent post that can be found here.

top down-1

At this point, the 4096 looks like a dramatic oversight so, initially I cut off the edges around the corners and sides as shown below.

top down-3

The result below still has a lot of unseen terrain outside of the manually sculpted larger area seen below.

procedural-2

Here is my landscape being close to finished. I’ve kept the actual landscape realistic to the area as discussed in my other landscape technique posts and kept it mostly flat. But no terrain is perfectly flat so,with the help of my procedural landscape, I sculpted in some careful detail:

landscape-progress-1

Here is a quick test of my character on some of the initially sculpted areas (they have since been smoothed somewhat).

procedural-1

Terrain – Heightmap Implementation – 2 of 3

A problem I’d identified, through researching forums and generally learning about height map techniques, occurred whilst my idea of 0 tiling on both the U and V values was a great idea it doesn’t actually translate to a 1:1 ratio. I noticed people suggesting values like 0.001, 0.5 and even 1.5  to hit that 1:1 ratio. However, rather than spending untold amounts of time using a trial and error approaches I decided to opt for another approach.

Whilst looking into other methods, I decided to use the OpenTopography website, and use this approach to generate a second height map attempt.

First things first – selecting a location. Now the extent of how realistic my landscape looks and feels might not seem important at first glance, but having terrain that actually matches the intended area to fill the distance can only be a good thing. With OpenTopography it allows you do just that.

Narrative / Aesthetic

My small military town was initially based on Stars Hollow, a Hollywood set for some hit shows.

‘Stars Hollow was inspired by and is loosely based on the actual village of Washington Depot, Connecticut (located in the middle of the western half of the state, about 45 minutes from both Hartford and New Haven) which writer Amy Sherman-Palladino once traveled through.’

So I decided to first find an area based on the above information.  I believe I found this by searching around Connecticut:

opentopography-connecticut

From here I then simply downloaded the information:

opentopography-connecticut-2

With this information I loaded L3DT Commercial, which is an always free version, and imported this data:

l3dt-heightmap-1

The next series of images show the initially imported file, and how I rescaled this to an appropriate size of 2048 (after my first landscape I decided I would be more than fine with half a 4096).

l3dt-heightmap-2l3dt-heightmap-3l3dt-heightmap-4

As you can see, the detail starts to come alive at this point.

From here, I was ready to bring this into Photoshop and rescale and tweak as necessary, before finally importing this into UE4.

Sadly, the results are somewhat blocky and not believable up close, and due to the blocky look might not even look too great from afar either:

results-1

Despite this, the overall landscape shares a less rocky and mountainous approach to my first, and as this was taken from the real area terrain around where my town would be, this makes sense.

results-2

Although this wasn’t particularly successful, I now had an idea of what I wanted and had also grounded myself in the idea of height maps and the basic fundamentals.

Next up, I decided I would try one of the industry favourites World Machine. If I can’t get what I want in a reasonable set of time I’ll take to Photoshop for a manual approach.

Evaluation / Reflection

Evaluation / Reflection

Landscape Terrain

Efficiency / Optimisation

Ultimately I am quite happy with my landscape, initially I had set the scale too large and tuned it down, but in hindsight I could have approached this with a 2048 landscape especially considering I essentially cut the exterior quads off of my 4096 and then reduced the size by 35% on both the X and Y axis.

Aesthetic / Look & Feel

I kept my landscape smooth, refined and in line with the area surrounding the intended real world area/example I had initially decided on. I did pull one small section up because the reality is every landscape, town and city are all built on earth that isn’t always as smooth as one might think outside of the roads and buildings.

This took some time, and ultimately I felt like I spent too long checking other methods and techniques given my own personal time constraints regardless of ones for the units.

Future Development

Regarding future development in regards to terrain I honestly probably wouldn’t expand much on this because I’ve already considerably tweaked and refined the visible areas. What I will do is remove excess geometry out of visible range once absolutely certain these areas won’t be accessible or part of the player experience.


Procedural Foliage

Efficiency / Optimisation

The settings I’ve used on my distance and filler landscape foliage are very basic and low quality because essentially they just need to fill distance gaps and add that element of depth and believe there is something outside the current player bounds. Initially I was sceptical this would translate well due to having performance issues with earlier foliage used around my park but this has worked wonders, especially with an added culling volume and general LOD’s set on my chosen foliage.

Aesthetic / Look & Feel

These generally look fine, not many areas needing covering really, half of my landscape areas that are visible to the player from the town are rocky meaning grass wouldn’t be growing there for the most part.

Future Development

For now my foliage is taken from the UE Kite Demo and optimised a little for my purpose but for future use I’d make much more simplistic planes of grass composed of several polygons and create clusters of these. This would without doubt add to the performance of my level.


Ongoing Texturing Process

Note: Whilst summarising these below I have gone into great depth on my posts here and here and have been critical of my work passively whilst going through the general process.

Efficiency / Optimisation

After a year of working towards a future in this industry I have applied all my best techniques in both the modelling; ensuring the topology is as close to flawless as possible (from a quad perspective primarily) without any erronoues or non-manifold geometry, that the UV’s and the maps are considered in advance and so on. All of my houses within my scene (of which there are numerous) share 1 single 4096 map for example which will add to overall loading and system performance.

Aesthetic / Look & Feel

I spent considerable time on my warehouse and housing mod packs whilst doing the same on each individual asset textured date. Hopefully this is reflected for the end user.

Future Development

Whilst working towards an end goal project for unit 3 I have a vast amount of assets that need texturing and in some cases re-modelling, tweaking or just fine tuning UV’s so in that case there will be future development from an aesthetic perspective until the end of my HND.

Task 2 – Foliage / Procedural Foliage – 1 of 2

Park Foliage

For my park, I had to spend some time really tweaking the values of my foliage for the grass.

Considerations:

  • Efficiency / optimisation
  • Density
  • Realism; grass+flowers and amount per cluster

To save time manually painting these, shorter grass in a park would have a tendency to just be filled and less patchy. I opted to use the paint brush tool placed under the main foliage tool. This just meant selecting my grass, 2 flower variations, and fine tuning the details for primarily efficiency purposes. With this at an acceptable setting, I simply painted onto each 400×400 mesh floor which made up my park.

foilage-2

Below is a closer look showing sparse flowers mixed in with a very short grass, utilising UE4’s wind effect nodes within the material instance itself.

foilage-3

Procedural Landscape Foliage

I couldn’t simply afford to paintbrush foliage this dense onto my landscape, nor did I particularly want to manually place this on such a large 4096 landscape.

A method we were shown in session, which I had already had a brief look into, would be my next port of call:

Enabling this within the project settings -> ‘General – Experimental’ was the first thing I needed to do.

foilage-1

After some tweaking of the radius settings within the BP’s, I found a density setting I was happy with. These are also decimated in terms of quality as they’re essentially filler to add some form of depth to the landscaped areas.

If more of my landscape was accessible or navigable, then I’d probably paint this manually, as to my knowledge this can’t be dictated by landscape types as per my procedural landscape materials, so it doesn’t save me much time in that regard.

That said I didn’t particularly find it slow as it’s essentially just swiftly placing and duplicating blocking volumes. I found they can be mass built as per the procedural BP which was great.

foliage-6

Trees will require more refining as perSpeed Tree / TreeIt as soon as time constraints allow.