-
Notifications
You must be signed in to change notification settings - Fork 4
Entity API
To be able to become powerful and wage war, it makes sense to be able to create infrastructure. Dominion inclues an API so you can easily accomplish this.
Currently, this API is mainly used for drawing buildings, though it can also be used to draw other stationary objects such as vehicles and topographical features. All you really need is a isometric image and some very basic Javascript skills.
For performance reasons, it's best to pre-render isometric imagery and load it into the game as an image. To accomplish this, we're going to be using Blender and Photoshop. You can also use your favorite 3D modeling or image editing software, though it's up to you to figure out how to set it up for isometric rendering.
Firstly, you're going to need a model. To keep everything to scale, we're going to be using 1 inch = 1 foot. Here's a great tutorial on how to model things in Blender.
Once you're got your model, you're going to need to set up the camera. Select the camera and press N to bring up its properties. Under Rotation, change X to 54.736º, Y to 0º, and Z to 45º.

Next, click on the Camera tab of the right sidebar. Under Lens, select Orthographic, and change Orthographic Scale to 200.

Under the Render tab, select PNG as the output format and set the color mode to RGBA. This will give the render a transparent background.

For lighting, it's up to you to determine how you want the scene to be lit. For the example entities, Ambient Occlusion was set to 1 and Environment Lighting was set to 0.2. Both options are under the World tab on that same sidebar.

Additionally, a plane can be placed under your model to produce a drop shadow around the base your model. Just make sure that the plane is transparent so it doesn't show up in the render.

Now you can F12 to render your entity.
Once you've saved the render, open it up in Photoshop so it can be resized and positioned properly.