Graphical content styleIn order to create a game atmosphere a non-photoreal cartoon setting has been chosen. The character and environment proportions have been deliberately hypertrophied in order to give the gaming process something of a comic and unserious feel.
Location elementsThis location consists of the following elements:
- the character's action area: 5 platforms on which the main game action takes place;
- the background environment, the role of which will be performed by less-detailed ash-colored rocks;
- lava covering most of the scene surface.
- env_stuff.blend - the file with the scene's environment elements which the character is going to move on;
- character_model.blend - the file containing the character's geometry, materials and armature;
- character_animation.blend - the file which has the character's group of objects and animation (including the baked one) linked to it;
- main_scene.blend - the scene which has the environment elements from other files linked to it. It also contains the lava model, collision geometry and the lighting settings;
- example2.blend - the main file, which has the scene elements and the character linked to it (in the future more game elements will be added here).
Making the geometry of the central islands
It's not recommended to apply modifiers (using the Apply button). Enable the Apply Modifiers checkbox in the object settings on the Blend4Web panel instead; as a result the modifiers will be applied to the geometry automatically on export.
Texturing the central islandsNow that the geometry for the main islands has been created, lets move on to texturing and setting up the material for baking. The textures were created using a combination of baking and hand-drawing techniques. Four textures were prepared altogether.
Creating the background rocksThe geometry of rocks was made according to a similar technology although some differences are present. First of all we created a low-poly geometry of the required form. On top of it we added the Bevel modifier with an angle threshold, which added some beveling to the sharpest geometry places, softening the lighting at these places.
Optimizing the location elementsLets start optimizing the elements we have and preparing them for displaying in Blend4Web. First of all we need to combine all the textures of the above-mentioned elements (background rocks and the islands) into a single texture atlas and then re-bake them into a single texture map. To do this lets combine UV maps of all geometry into a single UV map using the Texture Atlas addon.
The Texture Atlas addon can be activated in Blender's settings under the Addons tab (UV category)
It's not necessary to follow the same scale for all elements. It's recommended to allow more space for foreground elements (the islands).
In order to save video memory, the specular map was packed into the alpha channel of the diffuse texture. As a result we got only one file.Lets place all the environment elements into a separate file (i.e. library): env_stuff.blend. For convenience we will put them on different layers. Lets place the mesh bottom for every element into the center of coordinates. For every separate element we'll need a separate group with the same name.