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.

Dialogue System Development

06/02/2020

I follow an Youtube tutorial to make the base of the dialogue function this week.

If player stay near with the NPC with dialogue (here I use an object to simulate NPC), a text will show up to tell player to interact with the NPC.

If player choose to interact with the NPC, the dialogue box will pop up on the top of the NPC. The dialogue box will keep tracing the NPC position if player still stay around the detection area (Detection area = collider area).

Object Dialogue

Since different object may tell player different hints when player interact with them, I use the NPC dialogue as a blueprint to make the object dialogue class. And I make a few change on my dialogue script.

1. Rotate player towards the object that interacting to

2. Can control if the dialogue will pop up automatically or not

3. Set the dialogue box position on the top of the object or on a fixed point on the screen

4. Highlight the object

*The highlighted effect is made by shader graph and C# script.

  1. Create a shader graph with exposed parameterundefined
  2. Create a material from the shader graph
  3. Create a C# script to get the object texture and then set the texture to the material
  4. Apply the material on the interacting object
  5. Reset the object material to its original one if player is not around it

Unity Graphic Setting

30/01/2020

After setting the model texture, my groupmate told me that I have to set anti aliasing of the model since the model has many aliasing in unity.

I am grateful for that since the online tutorial I watched before (include those I didn’t mentioned in this blog) were never mention about it. I think only the 3D modelling creator can notice this situation. Then I search the way to set anti-aliasing.

The way I found is going Edit>Project Setting in the tool bar, then go “Graphics" in the Project Setting window and set the anti-aliasing. But I can’t find the related setting.

It spend me an hour to figure out the reason.

The graphics setting have to set in the inspector of the rendering principle assets.

As I am using Lightweight rendering principle(LWRP), I need to set it on the LWRP assets instead of Project Setting window.

Game Task: Sliding 2

22/01/2020

I have to give a big thanks to my groupmate’s friend. Actually, he raised the thought of using an array to do this sliding task instead of applying physical function like RigidBody.AddForce and Box Collider.

I use an array to create a virtual chessboard, and mark the place of all obstacles.

part of code

Once the game receives player input, it will check if object collides with obstacle or not. Then set the location and then move the object.

part of code

But it is not enough. If player input during the object moving, it turns out a fun picture.

input ‘up’ and then ‘left’

So, I have to add if statement to check if player is arrived the destination. If yes, check player input. Otherwise, player’s input(s) will be ignored.

Now, the object can move smoothly!

Game Content Design 4

21/01/2020

Today I went to CMC and do FYP with my groupmates. I draw some neon light logo for our game with adobe illustrator.

*Oxin is our “Supplies" name now!

Bus Stop Logo
Oxin Logo

Our groupmate point out that we should add more model to enrich our game city such as
1. Street sign
2. Graffiti
3. Hospital
4. Convenience store
5. Cone-shaped robot for managing transport

Game Task: Circuit

15/01/2020

I started implement second task of our game.

This task is aims to stop all electrons inside the electric board.

black rect: electrons, blue rect: electric board

It is much more easy for me to make it comparing to the last task. I set a random speed and initial position of electrons. And using Vector3.MoveTowards function to make them move.

random position

Although there were some bugs is discovered during the production of this task, those bugs are solved just now. It is a completed task at our game. (But the appearance haven’t finished.)

Game Task: Sliding

08/01/2020

I try to build the first playable task for our game.

The task is aims to moving the desired object to a specific location. Once the player move to a direction, the object will not stop moving until it hits an obstacle.

First, I put the cube as a chessboard.

circle: player/desired object, orange box: goal

And then, I add the code on the object we want to move. But the object will ignore the obstacle and keep moving after player input one movement.

To solve it, I add “Box Collider" to all obstacles. However, it caused a new problem. The object will stop in a weird place where is not supposed to stop the object.

object can not pass though

The problem probably is happened due to the collider size so I try to scale the box collider size. It seems work at first, but the same problem happens on other place.

I try to think if I am using wrong way to move the circle object. At first, I used RigidBody.AddFroce function to move the object. After I got this thought, I change it to Vector3.MoveTowards function. But it still can’t solve the problem.