Skip to content
jmdejong edited this page May 4, 2018 · 19 revisions

Set up infrastructure

The simplest way to start with blender is to browse in our gfx repository and take a building. You can reuse a lot of artwork and create a shiny new one. To copy the gfx repository to your computer or to upload something you should install git, if you use windows you can use tortoisegit.

To upload changes to the repository, you have to register at GitHub and upload your ssh key there, after that your account needs to be added to the authorized users.

That will be done by another team member, so just ask us in the IRC channel. Check this list of admins for folks that can help you.

Our graphics repository

Our graphics git repository:

git clone git@github.com:unknown-horizons/gfx.git

You find information on how to use git in the Git cheatsheet and in our Github How-to.

Getting Started with Modeling (Blender)

Blender can be downloaded here: blender download.

You can find a lot of useful video tutorials here: http://www.blendercookie.com/getting-started-with-blender/

If you are new to blender you should try to make your live a little bit easier, especially if you have a lot of objects else go to the step

Modeling:

  • try to give objects, material, textures and all you use a useful name (like wood, bottle, ...)
  • try to join objects to reduce complexity (for example join "stone 001 to 999" into "wall" by pressing ctrl + J)
  • try to use the "Array modifier" and "Mirror" instead of copying objects
  • you can reuse a lot of stuff out other blender files via "append" in the main menu

Most used commands

command what happens
ctrl+J join objects
ctrl+L select an mesh in edit mode
shift+D add duplicate
alt+D add linked duplicate
...

Rendering

A sample blender file with standard settings can be found here: default_scene_259.blend at orakeldel's gfx. It contains all important settings like light, camera and shadow. The lamps and the camera are parented to an empty ("Empty") which is controlled by a python script.

This script you can use for rendering to export the properly rendered files in UH's directory structure. This slightly changed script can be used for rendering units. Please read the comments in the script. At some places there must variables be set. For example you can define wheter you want to render a frame based or layer based animation or no animation at all (just a single graphic). See the "Parameters to edit:" section in the script.

Rotation and orientation

See Tile size for a description of building size and orientation.

TODO: small tutorial, to create a building

TODO: @ dauerflucher: we can insert the "tile size" (like 1x1 = 64x32px) in the default scene by adding just the correct resolution as camera preset.

Render fire/smoke

1 Create Smoke and/or fire

Blender has some nice "quick effects" like "Quick" Smoke": Go to Object > Quick Effects > Quick Smoke And you get a fire/smoke animation which you can adapt. See for example this video tutorial: https://www.youtube.com/watch?v=jkgrpgTh-tw

2 Render the animation

Now you have to render the animation with the script. Set especially ANIM_COUNT (how many frames will be rendered) and ANIM_STARTFRAME (which frame should be the first rendered frame). To run the script hold the mouse cursor over the text editor and press Alt+P. For a simple fire animation you need around 30 frames.

3 Loop the animation

When you look at the animation, you see a cut when it starts again. So the animation has to be looped:

  • Open a new blendfile (Str+N)
  • Choose the screen layout "Video Editing"
  • Add all images of a directory, e.g. "45": Add > Image
  • Split the whole strip in the middle into 2 pieces (K)
  • Swap the 2 strips and let them overlap each other (so that they overlap for ~ 5 frames)
  • Select both strips and add a "Gamma Cross" effect strip: Add > Effect Strip... > Gamma Cross
  • In the "Default" screen layout set the resolution, frame range and output directory where the rendered images should be saved
  • Click on the "Animation" button to render
  • Repeat all steps for all other rotations (e.g. in the directories "135", "225", ...)

Textures

To get a good transparency of the ground texture you should go in the "Textures" menu in the section "Influence" and set "Dvar" to 0 and "Alpha" to -1.

Also you have to select the RGBA output in the "Scene" menu (camera symbol).

Useful textures can be found here:

Source License Comments
http://opengameart.org different FLOSS licenses everything on here is ready to be used in UH
http://www.burningwell.org CC0 (public domain) everything on here is ready to be used in UH
https://openclipart.org CC0 (public domain) download as svg or png files

Please edit this table if you found something useful.

NOTE: Please keep in mind that you have to use textures with accepted licenses, like public domain or CC-BY-SA 3.0

Animation

There are two options for doing animations: frame-based and layer-based.

Frame-based animation meens that the object(s) are in one layer and animated by using keyframes. Each frame results in one render image.

Layer-based animation means that the object(s) are distributed in several layers. Each layer will result in one rendered image.

Information on Action sets used in UH can be found in Action sets.

Attention: In blender 2.55 and 2.56 the animation data is reworked. To open already existing animations you have to use blender 2.54 or earlier!

Most used commands

  • Path animation --> add Follow Path in "Object constraints" menu (example the mountain mine - runs only in blender 2.54)
  • I --> (in object mode) for insert key frame
  • alt + I --> delete key frame
  • ...

Do you need help? Further questions?

It's generally a good idea to join our IRC channel (#unknown-horizons on freenode) if there are any open questions. In case you do not have IRC clients (e.g. hexchat) at hands, you can use the webchat.

Clone this wiki locally