Demo SIMPLE MESH


Note: since version 3.6.0 the Mesh Editor feature has been made independent and moved to the Tools submenu together with 2Dto3D and Sprite Editor. Furthermore, mesh processing only involves orthographic projection. You may find some images slightly different from the new layout, but the process for creating the meshes remains unchanged.

WITH BACKGROUND CAMERA

You will find this example in 2.5dToolkit/Demo/Demo CATMESH/With background camera/Perspective.

We want to create a mesh from this image:

Create a new scene. You can do it in two different ways.

  • Create a new scene and click [MainMenu/Tools/VB Game Studio/Start 2.5D Toolkit]
  • Click on [MainMenu/Tools/VB Game Studio/Reset 2.5D Toolkit/Reset and create a new scene].
    • Note: this option will not ask you to save the previous scene. All work will be lost.

The GameObject VB25dTK with VBAreaTK as child will be created in the Hierarchy. A new 2.5d Toolkit window will be created. Dock it near the Inspector.

Place side by side Scene View and Game View and enable Gizmos in Game View.

Show Navigation from [MainMenu/Window/AI].

Save scene. Scene name is required as 2.5D Toolkit will use a folder with this name to save some data.

Drag Main Camera into its field.

The default environment type for a Simple Mesh is With background camera so we won’t need to select it.

Drag cat image from 2.5dToolkit/Demo/Demo CATMESH/With background camera/Graphics into Camera background field.

A popup will warn you to set the correct aspect ratio in Game View (we have already set it up) and notify you that the distance/camera size will be set automatically.

This is what you will get:

Select the Draw mesh tab.

Check Use small spot and click New walkable area.

Now you can start drawing following the outline of the cat. Each left click will insert a new vertex and it will be easy to create curved lines.

When you’re done, this will be the result

Now you need to create the mesh.

Select the Mesh tab.

Go into the Hierarchy and click the GameObject VB25dTK to show the children. Then drag VBAreaTK to the Area field.

The Create mesh button will become enabled. You can choose the color of your mesh. Click to create the mesh.

Now you can save the mesh which you will find in the 2.5dTK/Resources/[scene name] folder as .asset and .prefab.

FREEHAND

You will find this example in 2.5dToolkit/Demo/Demo CATMESH/Freehand/Orthographic.

We will draw without using a reference image, copying the subject or inventing it on the spot.

In this example we will work in orthographic projection leaving the default size.

Select Freehand in the Environment dropdown.

A popup will warn you that the default size of 1000 x 1000 will be set. You can change it as you like in the Resolution field and confirming by clicking the Restart using this settings button.

Whether you choose the perspective or orthographic projection you will have the Mesh proportion item available. It will change if you change the FOV or the Size of the camera.

In this example we will work in orthographic projection. We set the new resolution of 500 x 500 and clicked on Restart using this settings getting a size of 2.5. (If you change the resolution always remember to change the resolution in Game View).

We used a Walkable main area to draw the outline of the cat. So, leaving this area selected, we used two NotWalkableAreas to draw the eyes.

Remember that the NotWalkableArea will only be enabled if a Walkable area has been selected. To select any area, simply double click on any edge.

This is our finished drawing:

Now let’s create the mesh like we did in the example before.

And finally let’s see the result in the Resources folder.

vbgamestudio
Author: vbgamestudio