fredag 11 augusti 2017

Final demo

We give you the final result of the animated roller coaster!

Vimeo demo of both perspectives side by side.




tisdag 8 augusti 2017

Track details and skybox

In order to give the track a more finished look a base were added at the bottom of each vertical bar under the track, as well as support bars where it seemed fitting. The base model was created in Maya using cylinder and cube primitives with beveled edges, the model can be seen below.

Base for the vertical bars under the track.
In addition to the new details in the track, a skybox asset was added to the camera component, to make the background look a bit nicer. The base models, support bars and skybox used in the scene can be seen below.
Details added to track, more support bars and support bases on the ground.
Skybox.

Terrain and Aesthetics - Finishing Touches

For the surroundings of the scene, we wanted to add terrain for the track to stand on to improve the aesthetics. This was made using Unity's built-in terrain tool.
The scene with added terrain.
We used textures that I had previously made for personal projects. These were originally created by taking pictures of grass and rock which were then cropped into squares. The resulting pictures were then made seamless in GIMP, using the built in "make seamless" function.
The used grass and rock textures.
Normal maps were automatically created for these textures using the website: http://cpetry.github.io/NormalMap-Online/
The normal maps that were auto generated from the website.
We also used a previously created texture to create grass clusters. This texture was made using the following pictures of grass straws.
Cut out grass straws from pictures of grass.
The grass straws in the above picture were copied, scaled, rotated and skewed, which created the following sprite.
The grass cluster sprite.
Using the built-in terrain tool in unity, billboards with this texture was used to decorate the terrain and the grass and rock textures were used to paint the terrain.
The final look with painted terrain and added grass details.

måndag 7 augusti 2017

Textured seats and first person camera.


The seats that were previously UV-mapped got a leather texture added to them. The texture in Unity had its wrap mode on repeat the tiling of the material was adjusted to make the texture an appropriate size in comparison to the model. The texture and material can be seen below, both separately and on the seat.
Leather texture and material.

Textured seat model.
 Additionally, a camera was set up to give the option of letting a viewer see the cart movement in first person mode. This camera was set up through a simple follow script that makes the camera object follow an empty game object (called Camera Follow), which is a child to the front cart. The Camera Follow is placed slightly above the card to simulate the position the head would be in. The camera follows the target using linear interpolation of its own position and the position of the Camera Follow game object. Likewise, the rotation (quaternion) of the camera is also gotten through linear interpolation between the rotation of the camera and its follow target. The speed at which each value is interpolated was adjusted to make the camera follow the carts position and rotation at a good pace. Video of the first person camera (together with the third person perspective of the ride) can be seen at the bottom of the post.

Camera Follow variables.













måndag 24 juli 2017

Final Textures

Now that we have properly mapped UV properties for all of the cart components it was time to create some neat textures for the carts. In lack of other ideas, I chose to decorate our carts with one of the most popular (and oldest) Internet memes: Nyan Cat.

Nyan Cat!
When the UV mappings are finalized within Maya you can choose to export the mappings to a PSD map, which makes it possible to create textures with proper dimensions utilizing Photoshop.
In order to create a seamless texture, it is important to fit the texture images into the UV maps by using some of Photoshop's available manipulator tools, such as perspective and skew.

Down below are some of the most prominent textures created:

Textures for the back carts
Textures for the front cart

 And some textures for the smaller components of the carts can be found below:

Textures for the front cart magnets

Textures for the cart wheels, created by using a seamless plastic-like material

And here is what it looks like when all the external textures are applied in Unity:

External textures of the cart






söndag 23 juli 2017

Cart UV Updates

A UV mapping has been created for the shell of the front cart. The layout of the UV mapping for the back cart was updated as well to be more similar to the front cart's mapping.

The UV mapping for the front cart shell.
The new UV mapping for the back cart

New Track

A new track was created to make a more exciting roller coaster. The track was created by extruding the three rails along a curve. The supports between the rails were added afterward, using an animation snapshot (like the original technique we used) along the same curve.

The new roller coaster model, imported in Unity.
The track was imported into Unity and the carts were added to see how they would move along the new track. This did not work very well, however, as the carts failed to gain any momentum from the steeper fall in the track. To mitigate this, a script was created which gives the carts a target speed. Triggers were then put at different places on the track which changes the target speed.

Triggers on the track that changes the target speed of a cart.
After this, the Animation worked well. While the movement of the carts is still physically based, it is slightly modified at specific key points of the track to get a more natural animation.