VR Design Research Labs

Titanic 3D Jigsaw Puzzle.

The ship I use for this project is a Titanic 3D model I found on Sketchfab (“Titanic” (https://skfb.ly/zNSE) by more94 is licensed under Creative Commons Attribution-NonCommercial (http://creativecommons.org/licenses/by-nc/4.0/)​). I decided not to model my own ship as this project involves a lot of different laborious tasks I will have to focus on, as my time is limited. Therefore, to save time and resources, I used some ready-made models for this production.  

I work in Maya and was advised to use a Boolean tool to create jigsaw puzzle pieces of the object I am going to use in my game. 

The ship model (a free one) works fine, however I had to re-assign materials to it, and overcome some difficulties related to how the model was topologized and created. It was not possible to cut the object into pieces as some of the geometries were locked.  

After talking to my tutor about my idea and then watching a tutorial on YouTube, I commenced my work towards having all the jigsaw pieces ready for the next stage of work. 

I used the option Boolean – Difference and as a result created 6 elements of the ships’ base. I then separated the deck into another 4 pieces, added turbines and 4 funnels as single pieces. In total my jigsaw puzzle contains 14 pieces which when put together, create the Titanic 3D model. 

That was the first element I had to export to Unity where I set up a new project. 

The second element was the original model I was using (before cutting it into pieces) – this 3D shape appears after the jigsaw puzzle is completed – it is not active when the game starts, therefore not visible, and only activated after the last jigsaw piece is put in the correct position. 

The last key element for the jigsaw puzzle element in the game is again the Titanic model, but this time a transparent one, almost invisible. It works as a reference for the player so one knows what shape they need to build. The player must drag the piece of the ship into the correct spot within the boundary (transparent Titanic) to assemble the boat. After the piece is dropped into the right position, the jigsaw within the boundary is activated and the player can see the progress of their work. 

When the last element of Titanic is attached; the boundary disappears and the whole big scale Titanic appears.  

This is the mechanism I have implemented in my game. 

Script, part 1.
Script, part 2.
Script, part 3.
Jigsaw puzzle 1.

Having all the 3D elements ready was only half of the success. The second half was the code – the right code, correctly scripted and added to the game.  

The process of completing the jigsaw puzzle is activated via the C# script called “Snap to place – set active.”  

Jigsaw puzzle 2.

Titanic Puzzle pieces prefab contains all 14 elements, and each of them is called a “PuzzleX” where X is a number in sequence from 1 to 14. Each Puzzle has a tag called the same as the puzzle, so the “Puzzle 1” has a Tag called “Puzzle 1” etc.  

Jigsaw pieces within the Titanic boundary – not active as the game starts are untagged, but are defined as Objects, so respectively they are named “Ob.1, Ob.2, Ob.3…, Ob.14”. 

When the object with a specific tag enters the collider, it will trigger the related jigsaw piece. The object will be destroyed, and the related element will be visible. 

The completed Titanic is set to active (true), which means that when all the pieces are put together, the ship becomes visible (as it becomes active in the scene).  

I am going to add fireworks after the player completes assembling the Titanic. It will be a particle system based visual effect with audio added and triggered by the script.  

Jigsaw puzzle 3.

Update :

A short video presenting how assembling the Titanic VR jigsaw puzzle works in practice in my project is available here.

Leave a Reply

Your email address will not be published. Required fields are marked *