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.