55
edits
Phanchris5 (talk | contribs) No edit summary |
Phanchris5 (talk | contribs) No edit summary |
||
(9 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
Name: Huy Cuong Phan<br /> | Name: Huy Cuong Phan<br /> | ||
Matriculation number: 124851''<br /> | Matriculation number: 124851''<br /> | ||
Video: https://vimeo.com/804419602 | |||
== '''Overview''' == | == '''Overview''' == | ||
Line 57: | Line 58: | ||
|} | |} | ||
But I still | But I still wanted to choose something that is connected to the Silent Hill universe rather than a typical human body part. I made the decision to employ the spooky wicked nurse creature that is lying down in the Silent Hill game and used Blender to break her model into separated limbs. Here was the initial effort: | ||
[[File:fogworld13.png|800px]] | [[File:fogworld13.png|800px]] | ||
Then I painted some trees and grass to make it looks like a swamp | Then I painted some trees and grass to make it looks like a swamp | ||
[[File:fogworld14.png|800px]] | [[File:fogworld14.png|800px]] | ||
[[File:fogworld15.png|800px]] | |||
Here is the final result for the second scene with some volume fog by using URP. | Here is the final result for the second scene with some volume fog by using URP. | ||
[[File:fogworld16.png|400px]] | |||
''' The chasing creature ''' | |||
The chasing creature | |||
In order to give the beast in this scenario some interaction, I made it chase the main character whenever he enters the swamp. | In order to give the beast in this scenario some interaction, I made it chase the main character whenever he enters the swamp. | ||
[[File:fogworld17.png|800px]] | |||
[[File: | The monster is large and empty of materials when I imported it into Unity, so I had to manually extract and remap the material. | ||
[[File:fogworld18.png|800px]] | |||
The monster | |||
[[File: | |||
I then used the Box Collider component in an empty Game Object to build a collider area that would trigger the creature to start chasing it. | I then used the Box Collider component in an empty Game Object to build a collider area that would trigger the creature to start chasing it. | ||
[[File:fogworld19.png|800px]] | |||
[[File: | |||
Of course, we also need to write a script for the creature to follow the character. | Of course, we also need to write a script for the creature to follow the character. | ||
// Reference to the monster game object | |||
public GameObject monster; | |||
// Reference to the character game object | |||
public GameObject target; | |||
// Speed of the monster | |||
public float speed = 5f; | |||
// Rotation speed of the monster | |||
public float rotationSpeed = 0.1f; | |||
private void Start() | |||
{ | |||
UpdateRigidbodyConstraints(); | |||
} | |||
private void UpdateRigidbodyConstraints() | |||
{ | |||
Rigidbody rb = monster.GetComponent<Rigidbody>(); | |||
rb.constraints = RigidbodyConstraints.FreezePositionY | RigidbodyConstraints.FreezeRotationX | RigidbodyConstraints.FreezeRotationZ; | |||
rb.constraints = RigidbodyConstraints.FreezeAll; | |||
} | |||
private void OnTriggerEnter(Collider other) | |||
{ | |||
// Check if the collider that entered the trigger is the character | |||
if (other.gameObject == target) | |||
{ | |||
// Start chasing the character | |||
StartCoroutine(ChaseTarget()); | |||
} | |||
} | |||
private void OnTriggerExit(Collider other) | |||
{ | |||
// Check if the collider that exited the trigger is the character | |||
if (other.gameObject == target) | |||
{ | |||
// Stop chasing the character | |||
StopAllCoroutines(); | |||
} | |||
} | |||
private IEnumerator ChaseTarget() | |||
{ | |||
// Continuously chase the target while the monster is within the trigger | |||
while (monster.activeInHierarchy) | |||
{ | |||
// Rotate the monster to face the target | |||
Quaternion targetRotation = Quaternion.LookRotation(target.transform.position - monster.transform.position); | |||
monster.transform.rotation = Quaternion.Slerp(monster.transform.rotation, targetRotation, rotationSpeed); | |||
// Move the monster towards the target | |||
monster.transform.position = Vector3.MoveTowards(monster.transform.position, target.transform.position, speed * Time.deltaTime); | |||
yield return null; | |||
} | |||
} | |||
[[File: | [[File:fogworld21.png|800px]] | ||
Now the creature will chase the character whenever he steps into the prepared collider area. | Now the creature will chase the character whenever he steps into the prepared collider area. | ||
[[File:fogworld22.png|400px]] | |||
== '''Scene 3: The Other World''' == | |||
Scene 3: The Other World | |||
As it came to the final scene, I had considerable trouble imagining a rusty world that must be both frightening and beautiful. I had to find numerous different models of abandoned cities and replace their original materials with rusty ones. The lighting became another issue. Because I want to create a gloomy and terrifying atmosphere, everything appears extremely dark, which makes it challenging to distinguish the building's materials properly. The image below was taken before to baking lighting. | As it came to the final scene, I had considerable trouble imagining a rusty world that must be both frightening and beautiful. I had to find numerous different models of abandoned cities and replace their original materials with rusty ones. The lighting became another issue. Because I want to create a gloomy and terrifying atmosphere, everything appears extremely dark, which makes it challenging to distinguish the building's materials properly. The image below was taken before to baking lighting. | ||
[[File:fogworld23.png|800px]] | |||
[[File: | I carefully positioned each model such that it appeared to be a maze-like wrecked metropolis. I had to turn off the lights in order to make the models and the object plainly visible. | ||
[[File:fogworld24.png|800px]] | |||
I carefully positioned each model such that it appeared to be a maze-like wrecked metropolis. I had to turn off the lights in order to make the models and the object plainly | |||
visible. | |||
[[File: | |||
In order to fill in some of the empty space in the scenario and because a horror game wouldn't be complete without any hideous creatures, I used some humanoid creatures. The image below appears to be a location used for ceremonial prayer by creatures for the main character. | In order to fill in some of the empty space in the scenario and because a horror game wouldn't be complete without any hideous creatures, I used some humanoid creatures. The image below appears to be a location used for ceremonial prayer by creatures for the main character. | ||
[[File:fogworld25.png|800px]] | |||
''' The praying “Pyramid Head” ''' | |||
The praying “Pyramid Head” | |||
It would be good to include Pyramid Head, a well-known monster from the Silent Hill video game, in my game. Even though I had downloaded a very incredible 3D model on the internet, I encountered some difficulties when I tried to animate him on the Maximo. | It would be good to include Pyramid Head, a well-known monster from the Silent Hill video game, in my game. Even though I had downloaded a very incredible 3D model on the internet, I encountered some difficulties when I tried to animate him on the Maximo. | ||
[[File:fogworld26.png|800px]] | |||
[[File:fogworld27.png|800px]] | |||
[[File: | Although I could plainly see all of his limbs except for his weapon, it turned out that if I used the "Sword movement" animation, his sword would become distorted. The "Pray" animation, fortunately, functions wonderfully for me, so I simply downloaded and imported it into my project. | ||
[[File:fogworld28.png|800px]] | |||
[[File:fogworld29.png|800px]] | |||
[[File: | ''' The dissolved texture effect ''' | ||
<br> | |||
When a character enters Silent Hill's "Other World," the wall and the items in the immediate vicinity gradually change into rusty, unsettling things. | |||
[[File:fogworld30.png|800px]] | |||
If we want to create the illusion that the texture has been peeled away from the original texture, this effect appears really challenging. I used Lerp noise and Noise texture as instructed in this tutorial [[https://www.youtube.com/watch?v=2wMNpvsn7AY&t=809s&ab_channel=Abalanche]] to produce a decent outcome for my project. | |||
[[File: | Here are all the nodes I utilized in my project, but I don't know why after Unity was restarted, all of my node connections vanished. A similar bug was also reported by several people on Unity forum. | ||
[[File:fogworld32.png|400px]] | |||
<br> | |||
The model we wish to utilize must then be attached to this shader material, which I did by substituting my previous material for the city buildings. I have multiple materials that use this shader, a Box collider to start the effect, and a script, as you can see in my Inspector window. The simplest way to start the dissolve effect when the character enters the collider is to use a box collider to initiate an event. | |||
<br> [[File:fogworld33.png|200px]] <br> | |||
My friend advised me to use another plugin (DOTween) to launch the script to trigger this effect. | |||
[[File:fogworld34.png|200px]] | |||
<br> | |||
public class RustCollider : MonoBehaviour | |||
{ | |||
public float transitionTime; | |||
private float rust_amount=0; | |||
private void OnTriggerEnter(Collider other) | |||
{ | |||
rust_amount = 0; | |||
DOTween.To(() => rust_amount, x => rust_amount = x, 1, transitionTime) | |||
.OnUpdate(() => { | |||
Debug.Log("rust=" +rust_amount); | |||
Shader.SetGlobalFloat("rust_amount", rust_amount); | |||
}); | |||
} | |||
private void OnTriggerExit(Collider other) | |||
{ | |||
rust_amount = 1; | |||
DOTween.To(() => rust_amount, x => rust_amount = x, 0, transitionTime) | |||
.OnUpdate(() => { | |||
Debug.Log("rust=" + rust_amount); | |||
Shader.SetGlobalFloat("rust_amount", rust_amount); | |||
}); | |||
} | |||
My friend told me that by employing the DOTween plugin will enable us to create this kind of straightforward animation with less effort. The time variable will automatically flip between states of 1 and 0. | |||
== '''Self-evaluation''' == | |||
Self-evaluation | |||
Overall, I think my Unity project has been a valuable learning experience for me, but there are areas where I feel I could have done better. | Overall, I think my Unity project has been a valuable learning experience for me, but there are areas where I feel I could have done better. | ||
Line 166: | Line 195: | ||
- Modelling 3D objects and creating textures was a challenging task for me, and I regret not having enough time to go through some tutorials to improve my skills in this area. In future projects, I will make sure to allocate more time to 3D modelling and texture design to improve the visual quality of my game. | - Modelling 3D objects and creating textures was a challenging task for me, and I regret not having enough time to go through some tutorials to improve my skills in this area. In future projects, I will make sure to allocate more time to 3D modelling and texture design to improve the visual quality of my game. | ||
One of the key areas where I learned a lot was in designing game levels, including-<br /> | - One of the key areas where I learned a lot was in designing game levels, including-<br /> | ||
planting trees, sculpting terrain, and using skyboxes. However, I recognize that I need to study more on environment composition to create more engaging and immersive game levels in the future. | planting trees, sculpting terrain, and using skyboxes. However, I recognize that I need to study more on environment composition to create more engaging and immersive game levels in the future. | ||
Line 173: | Line 202: | ||
- One fun aspect of the project was learning how to do color grading in<br /> | - One fun aspect of the project was learning how to do color grading in<br /> | ||
Post-processing, which felt similar to using Lightroom or Photoshop. This is an area where I feel more comfortable and confident, and I will continue to explore more advanced techniques in color grading in future projects. | Post-processing, which felt similar to using Lightroom or Photoshop. This is an area where I feel more comfortable and confident, and I will continue to explore more advanced techniques in color grading in future projects. | ||
< | <br> | ||
Finally, I wish I had more time to learn C# and improve my scripting skills to create | |||
more complex interactions and animations in the game. This is an area where I plan to invest more time in the future to improve the overall quality of my games. | |||
<br> | |||
Overall, while there were areas where I faced challenges and wish I could have done better, I am proud of what I accomplished in this Unity project and look forward to continuing to improve my skills in future projects. | Overall, while there were areas where I faced challenges and wish I could have done better, I am proud of what I accomplished in this Unity project and look forward to continuing to improve my skills in future projects. | ||
edits