Week 18 – Day 5 – Flow Map

Today I took the mammoth undertaking (I found out later in the day) of attempting to create a flow map in UE4 that would follow behind the lantern on the water, in an attempt to create a wake where the petals would split.

To create this is was essential to have the petals on a separate mesh, so I duplicated the river mesh and places it just above the water. I then created a petal texture, and applied the material to this new mesh. I then added the same World Position Offset of the water to the petals so they would float up and down on the surface of the water.

Then came the ever increasingly difficult issue of trying to split the UVs of the new petal material around where the lanterns. I did this (with a lot of help from Tom), by creating a flow map in photoshop that would mimic the appearance of a wake. To do this I had to create anew texture. The RGB component of this texture was a simple black and white texture with white on one side and black on the other. This was to denote the centre point of the wake, where the gradient was the centre, and white and black were positive and negative. I then had to create an Alpha channel that would act as a mask. This alpha channel was in the shape of the wake.

RGBAlpha

I then brought this into UE, where I used this as a flow map, and used it as the UV coordinates for the petal material. I then applied a panner to the flow map, along with various math nodes to get the righ values (Tom really helped here, math isn’t my strong suit). This resulted in the flow map scrolling through the material, distorting along the grey edges of the alpha of the flow map. So the petals were being pushed to the side, and then gradually fill back in.

This was great, and almost exactly what I needed. The only issue here was that the lantern I had was not moving through the water at a constant speed of direction, so the flow map was not consistent with the lantern. To solve this issue (again, with Tom’s help) I was able to expose the X and Y coordinates of the flow map, by simply appending two parameters, and adding the result to the UV coordinates. This meant that I had paramater control over the position of the flow map.

FlowMap.PNG

 

ParamFlowMapThese parameters could then be controlled in Matinee, so I could choreography the position of the flow map around the boat. I decided to animate the boat exclusively in Matinee also, as it would be easier to match up the flow map and the boat that way. It involved a lot of time, and a lot of iteration to get boat and the flow map to match up, but I eventually got a result I was happy it.

Matinee.png

 

NB – To expose the parameters in Matinee, you have to:

  1. Right click on the Tracks box, and add a “New Empty Group”.
  2. Then you need to select the mesh in the viewport, in this case the river mesh, and in the new group right click and “Actors>Add Selected Actors”.
  3. Then right click on the empty group, and add “New Float Material Parameter Track”.
  4. In the details box, add an element, and select the material in question. Where it says “Param Name”, type in the name of the parameter name exactly as it appears in the material editor, in this case “Flow_X”.
  5. Then add key frames at the times you want. When you’ve added the key frame, right click and “Set Value” and adjust the value until you get what you want. It obviously helps to have the viewport open at the same time.
  6. Then, I made the matinee looping, and apply at start, by enabling “Play on Level Load” in the details box of the game screen.

 

The result of all of this, game the effect of the petals being pushed around the surface of the boat. To visualise this, I disabled opacity, and created a really vibrant colour. As you can see, the petals move around the boat. The result might not be perfect, but it gives a pretty good effect. It may be a little subtle, but I can fix that later, maybe by adding a wake mesh behind the lantern also.

 

____

_____

Sunday:

Lighting Test 2 – Still not right.

Capture.PNG

River Ferns modelled and placed throughout the scene.

HighresScreenshot00009.pngHighresScreenshot00011.png

Week 18 – Day 5 – Flow Map

Week 18 – Day 4 – Project day

Today I applied a light function, with a basic noise panning through it, to the lanterns floating on the water. This gives them a subtle pulsing glow.Untitled-1

I also modelled Bamboo, and used the to fill the background of the scene. This bamboo is relatively expensive, in my opinion, because it has transparency, is very round, and is very dense. So to combat this I will attempt to render the bamboo out later, and use this to fill in the back ground.

I created the Bamboo in Maya by creating a low and high polygon version of a basic bamboo branch. I then duplicated this bamboo, and deformed it in various ways to create some different variation. I then baked and painted the main body of the bamboo in Substance Painter. I created the leaves in Photoshop. I then brought these meshes into UE4 as separate meshes, and used the foliage painting tool to apply them to the scene.

 

Week 18 – Day 4 – Project day