Saturday, December 7, 2019

Foliage VFX: Week 3 Friday

On Friday I added some extra details, like firefly particles that change colour on proximity:
A butterfly particle effect loosely following this tutorial:



By viewing the mesh edges, I could use the UV crop nodes in an instance to correctly scale and place the butterfly texture in the center of the mesh I made in 3ds max, so that the animation vertex painting created within the material editor would then apply correctly to that cropped section of the texture sheet, and the butterfly would bend in the correct area.

I also added a translucency mask to the ground plinth for aesthetic presentation, however it would most likely be too costly and inefficient to have in game, as it essentially turns the entire plinth into an alpha and doesn't allow shadows to be cast onto it:
With Translucency
Without Translucency
Finally, with my remaining time I built lighting (and changed lightmap density), turned some assets into movable objects to receive dynamic lighting instead, messed with the skysphere colours and post processing to achieve the night time look I wanted, then I added some music and sound effects downloaded from here, here and here. I then added them into blueprints to start upon playing the game and upon overlap with the spore particle collisions.



Friday, December 6, 2019

Foliage VFX: Week 3 Thursday

After learning how to make the global material parameter and the grass wind effects in blueprints, I decided to put what I'd learnt to use on some unrelated things: the mushroom growth from before.

I cleaned up my nodes and replaced anything that was previously controlled by the camera proximity with a collection parameter node to be used in a blueprint:
Play Sound at Location added at a later date
I added Vector Variables for the mushroom cap size and the overall mushroom size and used the same method as when I was updating the wind direction, this time affecting the size of the mushrooms, but only on overlap of the particle effect collision from earlier.

After completing this, I then moved onto completing the earlier physics asset tutorial, this time following it to add a light to my mushroom lanterns:

This is where it got a bit more complicated. The tutorial taught me how to attach a light to a socket in the bone, but not how to change the position of it or how to turn it on or off so I had to do some experimenting. I couldn't use the same method as before, because the light intensity wasn't in my parameter collection and didn't have a material to edit with a vector variable. Instead, I tried to use an event tick that was only enabled when the character overlapped with the collision sphere- it didn't work.
After a few more attempts using different methods, I managed to get it to work using a timeline:
By using a timeline, I could set a number to increase or decrease over a certain period of time, of which I could then times by the float intensity that I actually want the light to end up at, which perfectly slots into the set intensity node. I could then set this to only occur upon actor overlap, which was perfect:


Thursday, December 5, 2019

Foliage VFX: Week 3 Wednesday

On Wednesday I finished up the grass wind effect:
I combined the effect from the tutorial with the animated sine effect seen in the G channel of the simple grass wind, which ended up being more complicated than it probably needed to be. In the future I would also avoid using the SimpleGrassWind node and instead simply create the sine wave myself, as it would probably be cheaper than only using a slice of an entire function node.
I also created a Global Material Parameter for the scene so that I could edit several different materials through the blueprints:

After I'd finished this base effect, I created a wind blueprint to add some more variation in movement to the scene:
Play Sound at Location nodes were added later
This was set to slowly change between two different wind directions:

After this had been completed, I set to work on adding a reaction to the player moving around in the grass following this tutorial:
I have thought about the cost of using event tick for the grass, and have tried using a delay to offset the cost, however each time it resulted in the grass looking janky as the frame rate simply wasn't smooth enough. I may go back to it later and try with even smaller numbers however, as any kind of delay would be less costly than using an event tick on its own.

Wednesday, December 4, 2019

Foliage VFX: Week 3 Tuesday

On Tuesday I started to work on the particle effects.
I created a spore cloud in some of the empty space left on my alpha map to pair with some spore particles to burst out of the mushrooms on hit.
For reference, I had watched several spore explosion videos like this and this and wanted to have a similar feel to the mushrooms seen in viva pinata, where despite being a shape that doesn't usually have spore explosions, they still seem to emit spores from underneath the caps.

for the spores, I made a really simple soft circle particle material:
while for the clouds, I followed this tutorial on cropping textures to create a cloud material:
I added both to a particle effect, messing around with the lifetime, size, velocity, colour, opacity, acceleration and rotation to create an effect that loses force and disperses after the initial explosion from the centre.
Finally, I moved onto making a blueprint for it:
it was a simple blueprint that turns the particle effect on upon the character overlapping the collision sphere I had added to it in the viewport:

After this, I began working on the wind effect for the grass, combining this tutorial with the simple grass wind in UE4:
but I still had a long way to go, the grass felt too jittery and the mushrooms still felt too static.



Tuesday, December 3, 2019

Foliage VFX: Week 3 Monday

On Monday I got to start on the fun stuff, the vfx itself!!
I continued following the vine lantern tutorial to create a physics asset with a kinematic top bone, so that it would stay in place and not collapse to the floor, leaving the rest of the bones to dangle in place. I then added weight and linear dampening to each bone so that it wouldn't sway too much or go crazy when in the scene. I couldn't figure out why only some of the bones had properly been imported and not others, but it didn't effect performance too much other than having the kinematic area slightly too long at the top of the vine:
I also worked on getting a basic wind effect in the scene, using UE4's base simple grass wind with a mask. I also made sure to add subsurface to two sided foliage, but had to get creative with nodes as I realised I'd placed a pink flower on the same map as green leaves and couldn't simply slap a vector parameter colour node onto it.
For the mushrooms on the tree, I went into the material editor and adapted this guide to create mushrooms that grow in size based on camera distance:
I had to vertex paint the stalks in UE4 itself as I didn't have the texture budget elsewhere, but it proved to be relatively easy:
I also used the same method to fade in a colour change to the mushrooms inside the lanterns:

After this however, I decided that it wasn't good enough. I didn't want the mushrooms to simply react to the camera distance, I wanted it to have a dynamic response to the character itself. It would still react if the camera was simply rotating closer to it while the character wasn't, and that simply didn't seem immersive enough- I decided to delve into blueprints later to perfect them.

Saturday, November 30, 2019

Foliage VFX: Week 2 Friday

On Friday I brought everything together into the scene:
Before doing this however, I quickly compiled together 2 tiling textures in substance designer, a dirt rock texture and a grass texture:
To save texture space for other things, I had to scrap the AO/MR maps for the grass and add that information in the material editor instead.
In UE4 material editor I then combined the two textures in perpetration for vertex painting. I also added the AO map for the dirt stones into the equation, in place of a height map (to save texture space). I added a contrast filter to it and used it to identify where the gaps between stones were, so that I could gradient out the grass through the cracks for a more realistic/immersive effect:

Friday, November 29, 2019

Foliage VFX: Week 2 Thursday

On Thursday I began texturing everything, starting with the plants in photoshop and ending with the tree and lantern in substance painter, trying to maintain a similar style throughout that matched the two concepts I was referencing:

For the tree I started with a green toned base colour, then added grunge through editing the levels to emphasise the cracks. Over this, I added a warmer brown tone using the curvature map with a levels edit as a bitmap mask, so that the green would still be seen in some sharper areas. Over that, I used a mask editor and a soft brush to paint on even brighter and warmer areas to give the tree more life and colour variation, all the while making sure that none of the other layers were interfering too much with the roughness of the bark. Later, I also added a mask editor to add a purple hue to the cracks and ao to add more depth to the tree.
For the moss, I used a combination of the artistic heavy sponge and blur slope to go over the areas where I had added rough moss details in the sculpt, then going over the mask in a few different hues and values to create variety in the moss colour.
With the lantern metal, I started with a base colour with metalness and a little roughness to represent what the base coat would have been like, then added some dirt/dust roughness over the top and some bumps to make the metal look more worn. I also added edge highlights and dirt occlusion for the areas that would naturally collect dust. After this, I added extra height detail using black and white striped patterns using a mixture of planar projection and tri planar projection so that the lines would meet correctly and loop around, ignoring any seams.
The vines were also fairly straightforward, with me focusing on the base colour, slight surface dust/dirt, edge highlights, occlusion and colour gradients.
For the mushrooms, I focused on following the level of detail as the rest of the foliage and stuck to painting it in with a soft brush rather than generating anything, although I did add some extra details in the spots, where I used a blur slope to add some tiny specks in the gradient of the lid.
I then created another folder with some colour edits for my later vfx in which the mushrooms would change colour when the character is close and exported all of the substance painter files as targas.
For the plants, to follow the style of the concept, I avoided rendering too much detail into the plants and instead focused on lasso tooling in bold colour changes for the edges of the plants and the stalks, with subtle gradients throughout. for this, I mostly used a basic hard round brush with varying levels of flow and pen pressure and a soft brush for gradients.