Convert Throwing into Shooting

21/5/2020

I make some changes on the throwing function, so that it likes shooting instead of throwing. When apply into our shooting task, the bullet was not going to explode when it collides with the object.

To fix this problem, I add the collusion detection of the bullet. When the bullet collide with object, it will disappear.

And I add the explosion effect when the bullet is collide with other objects.

Apply Throwing Function on Player

15/5/2020

I apply the throwing function on player, and it works with little problem.

Since the path is parent to the character, the sphere will update the throwing direction along to the latest path position. It makes thing comes weird.

I fix the problem by temperately remove the parent relationship between the character and the path when the player release mouse button. The path will parent to the character again only if the sphere is successfully throw out.

Automatically React to Specified Object

1/5/2020

The next step is to build the auto action script to the slime so that it can affect the surrounding object instead of waiting player to trigger it.

I build a simple demo about the function:

  • Slime will inhaling the surrounding object that is marked as ‘Food’
  • The inhaled object will be destroyed after a while

But I find a problem during the development process. The initial rotation of the slime seems not correct, therefore I add an empty game object as a reference to the slime to make the slime can work as expected.

before
after

Grabbing Mega-Fiers Animation Information

21/4/2020

I would like to talk about the follow-up enhancement of the pervious post.

The function I made last time cannot grab the clip information from the children “ObjectPCAnim" script. It means I need to always check what clips is included inside the Mega-Fiers animator manually which is such an inconvenient thing for a programmer.

Therefore, I figure out why it happened and I make a little adjustment on the function to make sure the clip information are always grabbed before using.

before
after

The different between them is just placing under different function.

Apply Slime Animation Depends on Player Action

18/4/2020

I am trying to add the Slime reaction to player’s action in order to create the feel of interacting with the slime.

To achieve it, I have to make sure all part of slime must run the animation at the same time.

The are 3 components inside a slime.

In this test, I add the following customised script called “ObjectPCAnim" to each component so that I can take out the information from Mega-Fiers script and control the current playing clip of Mega-Fiers animator.

After that, I create a new class that helps me to control the above script of each component at one time.

The simple slime action controller is finished. I can apply it on the interaction with player by adding the collision detection.

And I get the following result:

  1. Slime will open its mouth when player is around it
  2. Slime will eat player when player inside its body

Vector Animation Test with Mega-Fiers

7/4/2020

Slime, a shapeless liquid object, is hard to simulate its action by adding bones to the model. In order to make the slime movement looks more natural, we export the animation into .mc file and control the animation in the Unity with the help of Mega-Fiers.

I do some basic testing of Mega-Fiers to see how I can use it to control the slime animation. I split the animation into few clip, so that I can call the desired animation according to the slime action.

HDRP vs LWRP

08/03/2020

Since the time is rush for us to finish the whole project, I have to chase the progress of what I did before. I set a target that is to convert the game project into 3D video game in one week.

First, I change the rendering principle from LWRP to HDRP (High Definition Render Pipeline) which is more suitable for PC game and provide more detail of the model.

Therefore, I spend a day to reset all material and shader graph to suit the need of HDRP.

in-process

Here is the different between LWRP(left) and HDRP(right).

.undefined undefined

Game Task Apply & TextMeshPro Missing Words

05/03/2020

Game Task

I apply two tasks on the game first to test if it is workable.

Task 1: Follow the NPC

It is the simplest on the game. Just following the NPC and then get the recipes. NPC will wait for player if player is not following her.

Task 2: Recover the destroyed data from digital rubbish bin

After player interact with the rubbish bin, player need to finish the task to restore the recipes.

Missing Words on TMP

When I use Chinese word on text, some words will missing.

I had tried few way to solve it but all’s fail. The solution is following:

1. Create a .txt file and paste all words that will be used for the game (or may be just the words that will use this font type)

2. Drag the .txt file created on step 1 into Unity project

3. Call the Font Asset Creator from tool bar: Window>TextMeshPro>Font Asset Creator

4. Set the “Source Font File" to the desired font (.otf/.ttf)

5. Set the “Character File" to .txt file that dragged into unity on step 2

6. Click “Generate Font Atlas"

7. Click Save/Save as…

8. Used the TMP font created on step 7

The problem is solved!

Post Processing & Shader Graph

18/02/2020

Street Lamp

I import the street lamp to test if it can light other other by emission texture only. And I find that it can’t light other object unless I add a lighting inside the street lamp (create a spot light and make it parent to the street lamp).

And then I find out that it is wried to have a strong lighting but without volumetric cone. Therefore, I ask my groupmate to make a cone for me. And I set the material to a shader graph to make a fake volumetric light. I follow this Youtube video to make this shader graph.

volumetric light shader graph
Street lamp with volumetric light, spot light and particle system

I add the post processing element on the camera to explore the function of it. This element can easily change the game atmosphere. But there is some effect will blur the transparent pixel which make the volumetric light of the street lamp less realistic.

Character Clothes

I also want to apply glowing effect on our character’s clothes to make it more futuristic. Therefore, I made a shader graph like this.

shader graph with glowing and hologram effect

And it was crazy when I applied this material on our character.

The problem probably caused by the model. Since the whole object using the same material. If I want to apply the material on the hoodies only, the model should be divided into different part and use different material. After we fixed the model, the result is quite cool.