Post

Visualizzazione dei post con l'etichetta starship

How to prepare a model for 3D printing

Immagine
Today's post won't be about programming or game design, but I'm going to create something related to my game, so I guess it still fits in my game development blog (and I'm so excited with 3D printing, I needed to share it with someone!) For my birthday my family gifted me with a beautiful 3D printer. It's a Prusa I3 Pro, with maximum printable dimensions of 200x200x180mm. A test cube, printed and painted with acrylic colors After a long assembly work and some test prints I wanted something original to print; I thought it would be a good idea to have a miniature of the Player ship of my hexagon project: the model was already made, I just needed to add a stand. This is the model I used in-game; I made most of the details with textures, but since the 3D print will be totally white, it's a good idea to add some details to the model itself, to help later with the painting process. I'm using Blender to make my 3D models. It's a freeware...

Start your engines!

Immagine
Let's move our player ship around the map! I imported the mesh I created in Blender into Unreal; then, as usual, I created a  PlayerShipClass  based on AActor, to manage the behaviour of my ship.  Instead of dragging it in the editor to create my Static Mesh Actor, I'm going to spawn it from code, inside the BeginPlay() method of my PlayerController class: Here I can specify the world position of my mesh, and this will become necessary when we have multiple levels, each with its own map dimensions. Then I set the gameState to 0, meaning that the game will start inside the Player turn, waiting for his input. Let's take a look at the PlayerShipClass constructor, where I'm specifying what mesh to use: As we did with Hexagon tiles, I'm telling the constructor where to find the mesh, assigning it to the Actor and setting its location and scale. Let's compile, and take a look at our glorious spaceship, awaiting for orders at the center of the m...

3D Game assets

Immagine
While working on the basic game concept I decided to take a break and start doing some 3D assets for the final version of the game. The style I'm looking for is not a super realistic, highly detailed one: The game will have a static camera to show all the grid, so the ships will be very small on the screen. So I decided for a low-poly, a bit cartoonish style. First of all, the base shape of the game: the hexagon. Doing this is very simple in Blender: create a cylinder and lower the number of sides to 6. Scale down its height, and you have a perfect hexagon! For the player ship model I started with a simple box; I subdivided and extruded it until I got the basic shape of the ship. Then I added laser weapons on the wings and thrusters on the back (basically modified cylinders). To apply textures to the model, it needs to be UV unwrapped. This means that all the polys have to be "flattened" on a 2D sheet so that the software knows where to apply the...