Step 1: Creating a Box and a Tap
To kick of the project, our first step was to implement a box for the water to fall into and a tap from where the water would flow from. In this step the water consists of multiple blue spheres, very clearly distinguishable from each other.
The box was created using 5 unity cubes, transformed into wall-like objects. One of the walls was set to be invisible so that the action inside would be clearly visible for the camera that was placed outside the box. One could argue that the camera could simply be placed inside the box, however we decided that a better view was given from the outside as the water could go behind the camera otherwise. This placement also gives a better view if we were to implement the possibility to rotate the cube real time.
The tap is an invisible object that is mainly run by a script. The script creates "running water" by, for each time step, creating a burst of spheres that are poured into the cube. This is then repeated until the maximum amount of allowed spheres have been spawned. If the time step is small enough, an illusion of constantly pouring water is achieved.
In the following video the above described can be observed using the following values:
BurstSize: 5
TimeStep: 0.1 s
Observe that we have added a ramp in the video to in a more dynamic matter pour in the water in the cube.
The box was created using 5 unity cubes, transformed into wall-like objects. One of the walls was set to be invisible so that the action inside would be clearly visible for the camera that was placed outside the box. One could argue that the camera could simply be placed inside the box, however we decided that a better view was given from the outside as the water could go behind the camera otherwise. This placement also gives a better view if we were to implement the possibility to rotate the cube real time.
The tap is an invisible object that is mainly run by a script. The script creates "running water" by, for each time step, creating a burst of spheres that are poured into the cube. This is then repeated until the maximum amount of allowed spheres have been spawned. If the time step is small enough, an illusion of constantly pouring water is achieved.
In the following video the above described can be observed using the following values:
BurstSize: 5
TimeStep: 0.1 s
Observe that we have added a ramp in the video to in a more dynamic matter pour in the water in the cube.
Kommentarer
Skicka en kommentar