tisdag 4 oktober 2016

Texturing: Seats

UV-mappings were created and optimised to have as few visible seems as possible. A separate mapping was created for the top part of the seat and one for the lower part. The UV-mappings for each part can be seen below:

UV mapping for the lower part of the seat.
UV mapping for the top part of the seat.
The lower part of the seat has small patches of UV faces not connected to the rest of the UV, those parts of the model are not visible. For the top part of the seat the corresponding horizontal box area (just below the separate UV faces in the first picture) of the UV mapping is instead merged with the rest of the UV mappings, creating the convex "ear" shapes in the UV mapping seen in the second picture. This is done to ensure that the seem on the sides of the model are removed, which were otherwise in risk of being seen.

måndag 5 september 2016

Texturing: Revamp

As the UV mapping was finished during last Maya session (see blog post "Texturing") the final cart texture was imported into Unity and a seamless texture was applied. A fully seamless texture, as the one shown down below, gave promising results to the cart model after the UV mapping. However, as soon as we wanted to apply custom textures made by us the results suffered a bit due to not having full control over the UVs created, and the positioning of the mappings.

Example of a seamless texture with no text properties.
So I was forced to take precautions by revisiting the Maya files and create more clean textures that were easier to have custom textures and perhaps texts applied to them. Even pieces with correct size attributes were created. The final results and UV mappings are shown in the pictures below.


Complete UV mapping of the cart shell.
Complete UV mapping of the wheel suspension, applied to all four.

Complete UV mapping of the cart wheels, applied to all 16. Smaller wheels (located above the big wheels) were also separately UV mapped.




torsdag 7 juli 2016

Texturing

In order to be able to apply nice textures to the cart models in Unity, there are some necessary steps to take. If any texture was applied to the finished models, without these steps taken, the texture would appear as "smeared" upon the whole rigid model - creating an uneven and pixelated surface to the model.

To eliminate this issue, we will use UV mapping tools within Maya that create pixel mappings on the faces of the 3D models. The cart models will have their surfaces split into suitable face partitions. The key here is to make sure to include all the face elements of a model, or risk getting an uneven surface mapping that will most likely affect the texture quality later on in Unity.

Cart model after UV mapping applied.
Once the surface has been divided into smaller face parts throughout the 3D model it is time to move on to the next step: checking the quality of the created texture mapping. Luckily, Maya has a neat feature called "checkered tiles" that will display a checker board with various colors, functioning as a generic texture. With this tool it is now easy to spot any uneven splits, size issues, or any other kind of unevenness to edit prior to exporting the texture-ready model. With the checkered tiles mode activated, each face part can easily be moved to a specific checker board for checking consistency with the rest of the model faces.

Checkered tiles mode activated, with each face part visible in the window.

Animations!

A first animation of the roller coaster has now been made using the physics of the Unity engine.
Some small tricks went into making this. During the first attempt to make this animation, some simple collision was put on the wheels of the cart while also using the mesh of the track as its own collision. The cart got stuck constantly so it didn't work out well.

For the current animation, the track has been given a slightly simpler collision mesh by removing the middle part of the original meshin maya.

The track mesh without the center part of the track in Maya.
This was then used as the collision for the track's GameObject in Unity

The track in Unity. The green highlight is the object's collision.
Continuing, The carts' collisions had to work well with this. In order to not have any edges that easily could get caught on the smaller edges of the track, the carts got four spheres as their colliders. Sphere collision is also very fast to calculate which could make the performance better. Two spheres above the rails and two are below the rails of the track to make sure that the cart neither jumps off nor falls through the track. The spheres are all in between the track's two collision rails, making it impossible to go off the track.

Cart and track in Unity with their collisions highlighted in green.
Finally, several carts were connected using spring joints and all present physics materials were given a friction of 0. A force was then added to the carts to accelerate them and a small force was kept on the carts so they wouldn't lose their momentum. This gave the following result:

Animation of the roller coaster using Unity physics.

måndag 4 juli 2016

Cart undercarriage and alternative cart design

The undercarriage was modeled to look similar to the cart found in the design template. The undercarriage consists of four connections between the cart and the track, where each connection has of six wheels that surround the rail in three directions; above, outwards and below. There is also a shock absorber mounted below the head of the cart.

Our cart design template. (source: http://www.coastergallery.com/2009/LaR60.html)
The model for the "wheel" was created by extruding faces from a square primitive until we got the sought after shape that lets the six wheels align correctly with the rail of the track.

Model design for the rail connections of the cart.
The four wheels were places under the cart, attached to the rest of the undercarriage (a simple cube) that also features the shock absorber. The absorber consists of two cylinders, each with a small line indentation around the middle of the cylinder for looks. 

The undercarriage of the cart.
A second design for the cart was also created. It is a variation of the cart that will be at the head of the roller coaster, and will not feature the aerodynamic head. It was created by copying the rear part of the cart and placing it in the front, resizing its width so that both rows of chairs have the same amount of legroom and distance to the handlebars. In order to flip the copied rear half of the cart, we scaled it negatively in the appropriate axis. This changes the normals for the surface, so in order for any future textures to show up on the right side of the surface the normals of half the model were reversed. The final look for both carts can be seen below.

Front and rear cart models.


måndag 20 juni 2016

Track Model Progress

Some more work on the roller coaster track has been made in Maya. It was made continuous by connecting all the separate models. This created the following model.
It looked ok, but not perfect. As one can see in the image, the track seems a bit crooked or jagged. This happened because the track piece we used was too long on its own. Manually fixing the crookedness would take a very long time, therefore a smaller piece was created which only was big enough to have one pair of beams going between the three cylinder shapes.
Using this new piece, a new track was created through another animation snapshot. Then the track was made continuous by connecting the pieces with curved "bridges". The track now no longer has any gaps and looks much smoother.

söndag 12 juni 2016

Further Cart model Progress

Further work has been done on the cart model in Maya. The handlebars for each row in the cart was made with a simple cylinder form that makes up the soft foam grip, connected to a curved pipe that was created from a CV curve. The pipe was modified to fit well into the model and to make sure that the handlebar is placed a reasonable distance from the seats. 
The handlebar for the cart
The seats were created from two cube primitives, one for the horizontal seat area (seen in green in the figure) and one for the back of the seat (seen in white in the figure). Subdivisions were first added to the cubes in order to modify the basic shape as we wanted and then the Smooth functionality in Maya were used on the low polygon count model to add even more divisions to the model, making the edges and corners look smooth.

The basic polygon model for the seats in the cart, together with a smooth version of the same model.

Two rows of two seats each, four in total, were added to the cart. We decided to place the front handlebar on the inside of the cart (in contrast to the cart template shown in the first blog-post). This is the current design and progress on the cart model.
Current cart model

The next part of the cart is to create the the undercarriage and frame that will connect the card to the track.

torsdag 2 juni 2016

Progress in Maya


As we have finalized the design of the rail segment and determined the foundation of the cart, we have started to implement the models in Maya.

The rail system in its entirety was created with an animation around a CV curve, where the included meshes are created by utilizing animation snapshots. All the segments will be properly combined at a later stage, to achieve a continuous roller coaster track, which can later be exported and used in Unity.
Main foundation of the rail tracks

The cart image found on the internet was imported into Maya and used as a template to work with when we created our cart model. The cart model's current stage can be seen below, as well as the rail tracks.

Current cart (rough model)

Initial track modelling and cart design


Today's focus has been shifted towards modelling the main tracks. We have tried various implementations of sub-track constructions that could be considered to be interesting from a roller coaster rider's perspective. The underlying purpose with this is to include constructions of the tracks that makes the gravitation and main force more challenging to implement; such constructions could be an elevation in the track or loops. The rails of the main track design is based on a real existing roller coaster, 'Jetline', which could be found in the Gröna Lund amusement park here in Stockholm. We believe that this rail design would suffice for our roller coaster implementation.

As for the roller coaster cart itself, we decided early on to base the cart design on a cart existing in reality. We could of course design our own cart from scratch but it does not really give our modelling process any goals to achieve; when is the cart design considered to be done? To help with this, we found a real cart model to utilize as a founding template (see image down below). The image is of high quality and the cart design is complex enough for this project.
Our cart design template. (source: http://www.coastergallery.com/2009/LaR60.html)
Rails of the 'Jetline' roller coaster, found in Gröna Lund, Stockholm. (source: http://farm8.staticflickr.com/7449/15948648393_96503efc2a_b.jpg)