In the Production phase I already experimented a lot of PBR shaders and Particle Effects. For this phase I will add a Vertex Displacement Shader to the WAU tentacle. I will also add a storyboard to demonstrate the steps I have taken in this event process.
This event is triggered when the player is able to succeed in pulling the shelter tentacle out of the energy source. The WAU gets mad and will slam his losen tentacle on to the rock next to the shelter. This will lead into
This is one of the biggest events. As soon as the player pulls out this tentacle, there is a small electrical "disconnection particle effect" followed by the angry swinging tentacle animation. A huge impact particle effect arises on the rock and broken pieces roll down, creating a barricade in front of the door. The tentacle gets a new shader, since it is not sucking energy anymore. This shader needs to communicate that the tentacle is having a little afterglow: it is still casting little sparks of electricity.
Thanks to the impact particle effect, there was room created for an asset swap: the rock that gets hit, is later on replaced by a more broken rock.
Lots of the visual effects are already in place. The thing I really want to add to this event to make in more believable, is an reaction of the WAU creature tentacle after slaming the rock in pure madness. The tentacle was consuming electricity when he suddenly gets interrupted. After he slams his tentacle on the rock he is, at the moment, completely lifeless. I want to add a stuttering, jiggely shader effect on the tentacle that fades in after he is done with his slash.
The following images show my plan for the complete event.
Before I wanted to dive into making a believable jiggle effect for the Slash Event, I wanted to experiment with the common tentacles (used throughout the whole environment). Vertex Displacement would be the technic to discover. I heard it was really doable, but my tentacles are living a very complex so it turned out to be more difficult. For creating movement without using actual animations the shader is in need of the Normal or Tangent Vector node. They displace vertices of a mesh with a Time node and a Tiling Mask. White areas in the mask create movement and the black parts aren't. All values between white and black determine the smoothness of movement and the intensity can be determined with a Remap node.
The Tentacle ended up having two types of displacement techniques. The areas where the electric fluid is moving through the tentacle has to swell. Since these areas where already determined I could reuse the tiling, mask and speed that I made for this shader. To make the vertices swell I need the Normal Vector node and a Position node. For the jiggle effect a Tangent Vector node was needed, since this is not swelling the mesh but repositioning it completely. For this effect my stripe mask would not be suitable so I added a Gradient Noise node. This is scattering white and black spots all over the UV map, which results in stuttering.
Consuming Tentacles shader
Vertex Displacement is very fun to use in shader graphs but it does require some intelligence. I was a bit lost in space of what was actually happening to my mesh and why. The following gifs below show some failed experiments.
There was something about the tentacle that did not feel right. Switching tiling masks did make a difference because there was something off. The movement of the tentacle was still very static and repetitive. I asked my teacher to help me out and we came to the conclusion that the UV that I use for the tentacles was not tiling (which results in a breaking seem with vertex displacement).
The right picture shows the UV map I have been using and still use for the electric fluid. The tiling mask in the shader graph moves the shader over the UV map from top to bottom. To get the vertex displacement to work correctly I would need a new UV map. In the middle picture you can see a tiling UV map of the tentacle. The result was a completely distorting surface. This happens because the tiling noise mask is able to deform every vertex individually. My teacher came with a fantastic idea to shrink the UVs width to one pixel. Now when a spot on the tiling mask hits the one pixel map it distors the whole mesh at once, which results in a smooth snake-like movement. Exactly what I was looking for. The gif below shows the different results from each UV map.
UV map shrunk to one pixel (result left tentacle)
UV map tiling edges (result center tentacle)
Old UV map, no tiling edges (result right tentacle)
Left gif: wrong UV map and mask
Right gif: correct UV and mask
For the body of the WAU creature and the shimmer sphere in the core I have used the Sine Time node. This gives the result of some sort of breathing, since Sine moves back and forth between the values 0 (black) and 1 (white). For the star tentacles around the body I used the same node structure as for the long tentacles. Behind the body on the top right and left are two tentacles that are entwined around the door of the station and are not doing much, since they are not consuming energy from a source. They are actually just relaxing, but that does not mean they do not move. I added the same kind of breating shader that I used for the body and shimmer sphere. The breathing for the resting tentacles needed to be way more calm than the breathing of the body, since the body is in constant slurping state.
Extreme results
Playing around with the possibilities of vertext displacement is just way to much fun. Therefore could not resist to show two extreme examples.
Final result
WAU Body shader
Star Tentacles shader
Shimmer Core Sphere shader
Calm Tentacles shader
A tentacle with an after-shock should result from it getting disconnected from the energy source. I played around with the Vertex Displacement nodes and figured that the Tangent Vector technique works better than using the Normal Vector nodes.
First gif: extreme jitter, which works in my opinion, but I do not want it to be as intense all the time.
Second gif: with some calm part in between, which makes it more realistic.
Third gif: with some calm part and a bit more variety in the jitter.
Last gif: end result with some more variety,
The differences between the jitter intenisty in the last three gifs had to do with the Mask that is spread over the noise texture.
Second gif mask
Third gif mask
Last gif mask
The after-shock shader has to happen after the slap animation, otherwise it will mess up the animation. In the shader graph above you can see a Remap node inside the Slider Map group. This maks is then layed across the other two blended masks. In the Inspector of Unity I can slide the values of the Remap between 0 (black) and 1 (white). The white map will result in showing the two blended masks and the black map will show nothing. With this slider I can determine if it starts to jiggle or not. See the gif below.
To be able to let the slider slide from 0 to 1 over time I needed a code. It should go from 0 to 1 one in 4 seconds and stay at 1. My teacher together with one of my classmates helped me in writing this code.
I had so much fun making this environment. I could have done way more with the optimization of the scene, but at least I do know what some bottlenecks can be. I have learned a lot and will take it into account for future projects.
In the summer I will go on and dress up the rest of the scene with textures and foliage. The end result of the environment should end up like final render of the Databuffer. Click the link below to see its presentation.