Skip to content

Commit 748de4c

Browse files
Scottacus64freezy
authored andcommitted
Backglass Tutorial First Draft
1 parent aad7e19 commit 748de4c

21 files changed

+153
-3
lines changed

VisualPinball.Unity/Documentation~/creators-guide/toc.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
href: xref:tutorial_playfield_3b
5050
- name: Import Into Unity
5151
href: xref:tutorial_playfield_4
52-
52+
5353
- name: Create Realistic Looking Plastics
5454
href: xref:tutorial_plastics
5555
items:
@@ -62,6 +62,17 @@
6262
- name: Import Into Unity
6363
href: xref:tutorial_plastics_4
6464

65+
- name: Create a Backglass
66+
href: xref:tutorial_backglass
67+
items:
68+
- name: Prepare Artwork
69+
href: xref:tutorial_backglass_1
70+
- name: Create Mesh
71+
href: xref:tutorial_backglass_2
72+
- name: Import into Unity
73+
href: xref:tutorial_backglass_3
74+
75+
6576
- name: Manual
6677
href: manual/manual.md
6778
items:

VisualPinball.Unity/Documentation~/creators-guide/tutorials/index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ description: Visual Pinball for Unity - Tutorials
77
# Tutorials
88

99
- [Create a Playfield](xref:tutorial_playfield)
10-
- [Create Realistic Looking Plastics](xref:tutorial_plastics)
10+
- [Create Realistic Looking Plastics](xref:tutorial_plastics)
11+
- [Create a Backglass](xref:tutorial_backglass)
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
uid: tutorial_backglass_1
3+
title: Realistic Looking Backglass - Create Artwork
4+
description: How to edit art in Photoshop
5+
---
6+
7+
# Finding Artwork
8+
9+
Perhaps the most challenging aspect to making a working backglass is finding good artwork. The best possible art is a direct scan of the backglass but that is not always possible. There are backglass images that can be found online but it takes a fair amount of time to clean these up and remove any artifact from them.
10+
11+
# Editing the Color Layer
12+
13+
Once you have your artwork secured save the color layer as a png file with the areas for the score reels and credit reel set as transparent. Be sure to size the backglass image to the size of the original backlgass.
14+
15+
![Color Edit](FullColorBG.jpg)
16+
17+
# Editing the Thickness Mask layer
18+
19+
To block the passage of light through the backglass we need to make a thickness map layer. This layer consists of pure white (255,255,255) for the areas that are opaque and pure black (0,0,0) for the areas that are transparent. If you have a scan of the backglass this is easy to set up. If you don't have a scan then you'll have to find a font that matches the original and layout all of the mask artwork. Once you are done, save this as a png as well
20+
21+
![Thickness Mask Edit](ThicknessMap.jpg)
22+
23+
You're now ready to [create the meshes](xref:tutorial_backglass_2).
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
uid: tutorial_backglass_2
3+
title: Realistic Looking Backglass - Create Mesh
4+
description: How to create a Backglass mesh in Blender
5+
---
6+
7+
# Create Mesh
8+
9+
We're now going to import edit a cube and unwrap it to fit the backglass artwork.
10+
11+
## Step 1: Edit the Cube
12+
13+
Open Blender, choose File/New/General and select the cube that is native to this scene while in Object Mode. Under the Scene setting in the lower right change the units to "Imperial" and set the length to "Inches". At the upper right of the window pull out the menu there and type in the exact dimensions of your backglass.
14+
15+
![Editing the Cube](BlenderObject.jpg)
16+
17+
## Step 2: Scale the Backglass
18+
19+
Once you've set the dimensions of the backglass zoom in on it and while still in "Object Mode" select Object/Apply/Scale. This will set the scale to 1:1:1 which will lock in your edit of the backglass.
20+
21+
![Set the Scale](BlenderScale.jpg)
22+
23+
## Step 3: Import the artwork
24+
25+
To start the process of unwrapping the object that we just made we first must bring in the artwork that we created in "Prepare Artwork". To do that select "UV Editing" and in the left screen choose Image/Open and navigate to the Color Artwork that you made in Step 1.
26+
27+
![Bring in the Artwork](BlenderBringInImage.jpg)
28+
29+
## Step 4: Unwrap the Front surface
30+
31+
To be able to use the object that you've just created we need to create a UV map for it. For this to work we only need to "unwrap" the front face of the backglass and make sure that it fits the artwork that we created earlier. In the "Edit Mode" window on the right, press Number Pad 5 and Number Pad 7 to switch to an orthographic top-down view of the backglass. Choose the "faces" option at the top right of this screen and select the front face of the backglass. In the top Menu of the right screen choose UV/Project From View (Bounds). You should see an unwrapped face appear in the left screen that lines up with the artwork that you made. If the edges don't line up, choose "edges" in the left screen, click on the edge that needs to be moved and hit "G" while hovering over that edge. This will select the edge and allow you to move it to the correct location. Note that you do not need to "click" to move the edge.
32+
33+
![Unwrap the Backglass Front Face](ProjectFromView.jpg)
34+
35+
## Step 5: Export from Blender
36+
37+
The hard work is now done! Choose File/Export and save the file as an fbx.
38+
39+
![Export the Backglass](BlenderExportfbx.jpg)
40+
41+
You're now ready to [import into Unity](xref:tutorial_backglass_3).
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
uid: tutorial_backglass_3
3+
title: Realistic backglass - Import Into Unity
4+
description: How setup your backglass in Unity
5+
---
6+
7+
# Import Into Unity
8+
9+
## Step 1: Import the FBX
10+
11+
Open your scene in Unity and navigate to where your table stores its Materials, Meshes and textures. Drag and drop your backglass mesh into "Meshes" and your images into "Textures"
12+
13+
> [!note]
14+
> We recommend storing models at `Assets/<Table Name>/Models`, and texture at `Assets/<Table Name>/Textures`. In this example the Tropic Fun backglass is being created in another table for demonstrative purposes.
15+
16+
![Navigate to Table Folders](BringMeshAndpngsIntoUnity.jpg)
17+
18+
## Step 2: Add a Mesh Filter
19+
20+
In the Hierarchy window add a new element by right clicking and choosing "create empty". In this case we named it "Backglass". Right click in the "Inspector" window and search for "Mesh Filter" and add this to the inspector window. With the Mesh Filter highlighted search for the Blender backglass mesh that you made. Grab the "cube" mesh from this and drag-drop it into the "mesh" slot in the mesh filter. If the cube cannot be moved, select the top level (in this case TropicFun BG), right click and select "unpack".
21+
22+
![Add Mesh Filter](ChooseCubeFromtfAsMesh.jpg)
23+
24+
## Step 2: Add a Mesh Renderer
25+
26+
Next right click in the "Inspector" window, search for "Mesh Renderer" and add this to the inspector window.
27+
28+
![Add Mesh Renderer](AddMeshFilterAndMeshRenderer.jpg)
29+
30+
## Step 4: Add a Translite Material
31+
32+
Navigate to the "Translite" material and drag and drop this into the "Materials Element" box of the Mesh Renderer.
33+
34+
![Add Translite Material](ChooseTranslightAsTheMaterial.jpg)
35+
36+
## Step 5: Set up the Masks
37+
38+
Under the Surface Inputs of the Translite material drag and drop the color backglass png into the "Base Map" slot and the black & white thickness map png into the "Thickness Map" slot.
39+
40+
## Step 6: Hooray You are Done!
41+
42+
Congratulations! You have now made a backglass that will transmit light through the color overlay and block light in any of the masked area. You can test it out by putting a light source behind the backglass and move it around.
43+
44+
![Finished Backglass](SetUpMasks.jpg)
45+
46+
If you came across an error or have a better way of achieving this, don't hesitate to click on the *Improve this Doc* button on the top right side ([documentation](https://github.com/freezy/VisualPinball.Engine/wiki/Documentation)).
290 KB
Loading
401 KB
Loading
366 KB
Loading
349 KB
Loading
280 KB
Loading

0 commit comments

Comments
 (0)