
Robotics is interesting because it is a synthesis of many areas - programming, construction, mathematics, physics, and there is also modeling. In that year, on the Day of Astronautics, we made a
small post about modeling the Vostok-1 spacecraft using OpenSCAD, this time - we will continue the tradition and try it out in practice - Blender. Skill modeling - will not be superfluous.
Blender is a cross-platform, free system for 3D modeling (+ animation), and it is also possible to “render” models in it.
')
Creating 3D models, especially spaceships, is not an easy task, and it can take months. But we will use ready-made 3D models of the Vostok-1 spacecraft (we will tell where they are), and create a simple 3D scene.
Vostok-1 ship models
First, let us tell you about the source of the models - they are posted on
github - their author, Slavutinsky Victor - created them for FlightGear flight simulator, many thanks for his work.
Install Blender
With the installation of Blender, there should be no problems, the distribution kit for your OS is downloaded from the
official page - it is unpacked and launched.
Import AC3D to Blender
Model FlightGear model files in AC3D format (* .ac) - we need to import them into Blender. For this, there is the
Blender-AC3D plugin .
Installing plugins is to copy the folder to the folder with plugins, I needed to copy the folder “io_scene_ac3d” to the folder of my distribution “blender-2.76b-linux-glibc211-x86_64 / 2.76 / scripts / addons /”. After that, you need to activate the plugin. To do this (after restarting Blender), select the “File” menu - “User Preferences ...” - on the “Addons” tab, type ac3d in the search field - and our plugin is displayed, put the “little stick” opposite it From this point on, the plug-in becomes available (if we want it to always be connected, click on the “Save User Setting” button).
Now we can import models in the * .ac format - select “File - Import - AC3D”.
East-1 models
Models are located in the
Models folder, in the appropriate (speaking) sub-folders:
Controlhandle
Effects
Exhausts
Gashandle
Illuminators
LeftPanel
LeftSwitchPanel
Mainpanel
Parachutes
Rightpanel
RightSwitchPanel
Seat
Spacecraft
Vzor
For example, this is the result of rendering the LeftPanel / Vostok-1-Left-Panel.ac file in Blender:

Or MainPanel / Vostok-1-Main-Panel.ac:

There, Vostok-1 is modeled completely, from the rocket, to the descent vehicle, and the cosmonaut's cabin.
Over time, to simplify the work - all files will be transferred to Blender format, and
Vostok-1-blender will be placed here.
Scene
The test scene that was used to render our image is posted on
github (Vostok-1-scene.blend file), and after opening it you will see

Process of creation
To create a scene you need 3 elements:
- 3d object
- background picture
- lighting
The 3d object of our spacecraft Vostok-1 can be taken immediately in the Blender format (Vostok-1.blend file
there ). The background image was imported using the “Import Images as Planes” plugin (by default it is turned off, it must be found in the Add-ons list - and activated). The corresponding function appears:

In this case, the picture becomes a “panel” object with which it is convenient to work and place on the 3d stage.
Basic operations
Briefly touch the basic action when working with scenes in Blender (for the most beginners).
Firstly, this is orientation in space - to do this, press the middle mouse button, and the viewpoint moves.
Working with objects: selecting an object - the right mouse button (but everyone advises to remake it on the left).
With the selected object - you can perform actions:
- move [g]
- rotation [R]
- scaling [S]
As a rule, this is done through the keyboard - the corresponding keys are pressed - and the model goes into acc. mode. You can specify the data to move, rotation - immediately on the keyboard by selecting acc. axis (x, y, z).
For example, if you open the scene by default - the cube will be immediately selected there (this can be seen at the bottom left, where the axes are also visible), and clicking on the keyboard, successively following the gy 3 Enter keys, we will shift it along the Y axis by 3 cells. And this ry 45 Enter combination will rotate it around the y axis by 45 degrees:

Next, a convenient function is to work in object coordinates - to do this, double-click on the axis name - the axis will be visually highlighted, either in the global coordinate system or local, for example, rotate around the z axis (cube) by 45 degrees: “rzz 45 Enter” :

Browsing plans
With the help of keys on the right digital panel you can switch views - 0,1,2,3 ...
0 is the view from the camera, what will be rendered (the frame that zone of the scene that will be captured is displayed by a frame):

Render
To start the render - press the F12 key - Blender will start drawing the scene using
Cycles Render . Esc - stop. F3 - save the result (pictures).
The quality of rendering depends on the number of Samples - the more of them - the more realistic the scene will be, but the longer it will take place the rendering.
This key element is configured in the Render block - this is the Camera icon - on the right in the toolbar:

and there is an opportunity to choose from the drop-down list “Preview” or “Final”, or manually set the value “Samples Render” - I rendered at a value of 200. For quality results - increase the value.
Items
All elements on the stage make up a hierarchy, and you can see it in the upper right window:

We see what we have:
- Camera - using the camera we get the picture
- Sun is a source of lighting - which will create the effect of the Sun on our 3D model.
- Sun.001 - this is the source of light - which creates the effect of the reflection of light from the Earth
- Vostok-1 is the parent object for our model of the ship Vostok-1
- earth_from_space is a panel with a texture of a picture of the Earth - to get the effect of being in space
Lighting
The main source of light on our stage is the sun. To change the parameters - select this element in the hierarchy of elements, and click on the toolbar on the "Sun" icon:

Here you can change - the size of the "Sun" - "Size" - the smaller - the smaller the angular size of the light source. And also Strength - determines the power of light.
Changing these parameters - you can change the level of illumination of the model by the Sun.
We also have background lighting, this is configured on the “World” tab (Earth icon):

And clicking on Color:

We see that in our example the background lighting is set at - 0.005
Rotate 3D models
To work with a model, we select the Vostok-1 element on the hierarchy of elements, and we can move or rotate (for example, to change different angles of incidence of light), we do this with the help of keyboard commands: “R”, then the axis - (“x”, “ y ”,“ z ”) - around which we want to rotate (press twice - if it is an axis relative to the object) - and then moving the mouse - we can see the changes immediately -“ Enter ”- to confirm the changes or“ Esc ”to cancel.
ExperimentsOf course, this is just a simple scene, but even here you can vary different parameters, and see what happens.
ThanksOnce again, I would like to thank Viktor Slavutinsky for his titanic work on 3D modeling Vostok-1. Just thanks to
Michael Shablin - who supported me in this endeavor, and took the time to my questions.
FartherOf course - this is only a small part of Blender's capabilities, animation, work with textures, work with video, sound, etc. are not considered
Russian-language resources for self-study of Blender: