Перейти к содержимому

Как сделать книгу в блендере

  • автор:

Создание в Blender книги из работы «Еще неделя…»

В этой работе мне пришлось делать старую обтрепанную книгу. По многочисленным просьбам я предоставляю вам статью, в которой я коротко и лаконично расскажу как я ее делал в Blender. Многое из описанного подразумевает, что вы на «ты» с блендером, фотошопом и гимпом, так как я не даю объяснений, а лишь описываю шаги работы.

Итак, для начала я нашел у друга старую растрепанную книгу потолще, сфотографировал ее в нейтральном освещении с необходимых ракурсов, а один нашел в инете:

Затем, склеил всё самое необходимое в одну картинку, выровнял цвета, подкорректировал сами текстуры, убрав лишнее. Всё это было осуществлено в GIMP.

Смоделировал из куба простую форму «внутренностей» книги:

Пометил места разреза при развертке и развернул на созданную ранее текстуру свой меш:

Разверка на текстуре

Пришлось повозиться, чтоб положить всё на своё место:

Развертка, правильно разложенная на текстуре

Как делать UV-развертку можно прочитать на blender3d.org.ua. Затем, со включенным отображением текстур, я подразделил (Ctrl+R) меш и немного деформировал торец со страницами и с переплетом, чтоб он был похож на старую книгу со съехавшими друг относительно друга блоками страниц.

Далее я делал переплет. Сначала я искривил разбитую плоскость по дуге (пропорциональное редактирование вам в руки). Снова исказил ее немного, чтоб она не была слишком идеальной. Продублировал объект, растянул — получил вторую часть переплета.

Пришел черед текстур. Создавал я их в Adobe Photoshop, так как именно в этом редакторе я чувствую себя увереннее всего. В гимпе нет некоторых возможностей, использованных мною. Итак, я создал картинку с размером обложки. Вставил туда ранее отфотканную текстуру внутренней страницы (это будут места потертостей), растянул ее, чтоб не было видно лишнего. Мне нужен был практически только её цвет.

Создал новый слой, залил его цветом обложки.

Обложка в Photoshop

Выбрал ластик, взял стандартную кисть, напоминающую что-то разбрызганое. Изменил ее параметры так, чтоб она была более редкой, рисовала со случайным поворотом и размером.

Стер синее там, где у нас на обложке будут потертости. Добавил чуть тени этому слою. В итоге выглядело это так:

Далее, текстуры переплета:
Я создал прямоугольничек цвета обложки, продублировал его слой. При цветах по умолчанию (черный — рисующий, белый — фоновый) к верхнему слою применил фильтр Fibers, поколупавшись в его настройках. Изменил тип наложения в Color Burn, прозрачность поставил в 20%. Добавил полосочки и текст.

Третья текстура сделана практически идентично.

Меш обложки достаточно прост: прямоугольник с некоторыми искажениями, которые видно на финальном рендере.

Затем я наложил текстуры на меши. Обложку я анврапил и подгонял ее к текстуре, переплет сделал с помощью «Projection from view».

Больше всего реалистичности и потрепанности добавляют торчащие листы. Однако, с ними всё максимально просто: это плоскости, подразделенные в нужных местах и искривленные. Кроме того, я удалил у них случайным образом полигоны на краях, дабы они выглядели подертыми. Ну и сгладил получившиеся лесенки.

Текстура на них та же, что я использовал ранее — внутренний лист. Наложение — опять UV, Projection from view.

Я разместил в относительно случайном порядке сделанные страницы и воаля! Открою секрет — там уйма дублей 🙂

Маты у книги не сложные — почти отсутствие блеска и твердость около 30. Естественно, слабенький бамп.

For all the Blender beginners out there, here is a complete step-by-step guide to create a 3D book.

Requirements: Cover image of any book(Front, back and spine as one complete image).

3D book

Software: Blender .

Skill level: Easy (basic knowledge of Blender’s interface and navigation controls required)

Note : Before beginning with the tutorial, make a note of the cover dimensions (Front cover and spine).

Part 1: Modelling the book.

  • Open Blender and select the cube (it will be our model for the book) and press ‘N’ to open the Cube’s properties panel.
  • Change the value of X as the width of the front cover, and Y to the height. The value of Z will be the spine.

Note : The cover size I have chosen is 5.5 X 8.5 with 0.5 as the spine.

Properties panel

  • After entering values, select the cube and press ‘S’ and type 0.5. This is to reduce the book size by half so it fits better in our scene.

Part 2: Wrapping the cover image on the created model

We now have to separate the front, spine and back from cube so we can place our cover image.

    • Press ‘TAB’ to enter into Edit mode.
    • Then hit ‘Z’ to view the model in Wireframe Mode.

    This is what you should be able to see.

    • Now hit ‘CTRL + TAB’ to open mesh selection type.
    • Select ‘Face’ option.

      • Hit ‘5’ to change to orthographic view. Then hit ‘7’ for top view. Select the Top facing side (this will be the front cover).
      • Hit ‘CTRL + 3’ to view the left side, hold shift+right click to select the side which is to be the spine.
      • Then hit ‘CTRL + 7’ for bottom view and Select the face holding shift again.

      You should have the following selection of the mesh.

      • Now hit ‘P’ and select ‘Selection’.

      • We have now separated our original mesh into two(cube and cube 001).
      • Go to the Outliner panel on the top right corner of the window, and rename the cube as Pages and cube 001 as Cover.
      • Leave the book cover mesh selected.

      UV Unwrap mesh to image
      Now we will Unwrap the mesh called Cover so we can place our cover image.
      • Hit ‘TAB’ to go Edit mode again.
      • Hit ‘A’ to select the whole mesh.
      • Then hit ‘U’ and select ‘Unwrap’.

      Applying Material to the cover
      • To do that, select ‘Cover’ mesh.
      • Then change the render engine from ‘Blender Render‘ to ‘Cycles Render‘.

      • Select the mesh ‘Cover’ and click on the Materials symbol in the properties panel on the right.
      • Rename the material as ‘Cover’ and select ‘Diffuse BSDF’ texture.

      • Click the Grey dot next to the Color box and choose ‘Image Texture‘ from the menu.

      • Click on Folder icon and import your cover image file.

      • Once the material is set for the cover, next select the mesh ‘Pages’ from the outliner window.
      • Rename the material to ‘Pages‘.
      • For Surface choose ‘Diffuse BSDF‘ shader option
      • For Color, select an off-white color for the pages.

      Lets look at what we have now:

      • Click on the mesh preview type and select ‘Texture’.

      Now we can see that the cover is wrapped around our mesh, but the position is a bit off. Lets rectify this.

      • Divide the window and open the UV image editor in the second window.
      • Hit ‘TAB’ to go into Edit mode.
      • In the UV editor click on open and select our book cover image as selected below.

      The Editor shows us the the current position of the wrapping.

      • To wrap it properly, we can select individual vertices or edges and move them by hitting ‘G’.

      The image below shows us the correct position of our unwrapping.


      We now have our book ready and wrapped.

      Part 3: Lighting

      Before adding the light source, let us position the book at the center.

      • Hit ‘G’ and align the book with the grid floor.
      • Hit ‘CTRL + S’ and reposition the 3D cursor to the centre.

      • First we will add a floor, hold ‘Shift+A’ and from the mesh menu select ‘Plane‘.
      • Hit ‘S’ and type in ‘10‘.
      • Name the plane as ‘floor’.
      • Add another plane the same way, but increase its size by 3. This will be our single light source.

      The scene we are attempting is fairly basic so we will use just a single light setup.

      • Hit ‘1‘ to go to front view.
      • To position the camera hold ‘Ctrl + Alt + 0’.
      • Select the light source and position it above the floor and book mesh.
      • Select the materials from the properties menu.
      • Hit ‘Use Nodes’ and select ‘Emission’ as the shader and set the strength to ’20’.

      You can experiment with these values.

      Note : Delete the default lamp in the scene by selecting it and then pressing ‘X’.

      The image below shows us the result.

      Part 4: Rendering

      Next we will have to set the render settings.

      • Click on the camera icon and and enter the settings as shown in the images below.
      • Also enter the values for the sampling.

      • I have set the floor material to ‘Glossy’ with a roughness of 0.1. and the world color to an off-white shade.
      • Now hit the ‘Render’ button.
      • You will have the result as shown below.
      • Press ‘F3’ to save the image.

      Thats it !! Now you can play around with different camera angles to get your perfect shot.

      Are you a newbie to WordPress ? Get started by reading this WordPress Guide : 7 Best Practices.

      Как сделать книгу в блендере

      Создание в Blender книги из работы «Еще неделя…»

      В этой работе мне пришлось делать старую обтрепанную книгу. По многочисленным просьбам я предоставляю вам статью, в которой я коротко и лаконично расскажу как я ее делал в Blender. Многое из описанного подразумевает, что вы на «ты» с блендером, фотошопом и гимпом, так как я не даю объяснений, а лишь описываю шаги работы.

      Итак, для начала я нашел у друга старую растрепанную книгу потолще, сфотографировал ее в нейтральном освещении с необходимых ракурсов, а один нашел в инете:

      Затем, склеил всё самое необходимое в одну картинку, выровнял цвета, подкорректировал сами текстуры, убрав лишнее. Всё это было осуществлено в GIMP.

      Смоделировал из куба простую форму «внутренностей» книги:

      Пометил места разреза при развертке и развернул на созданную ранее текстуру свой меш:

      Разверка на текстуре

      Пришлось повозиться, чтоб положить всё на своё место:

      Развертка, правильно разложенная на текстуре

      Как делать UV-развертку можно прочитать на blender3d.org.ua. Затем, со включенным отображением текстур, я подразделил (Ctrl+R) меш и немного деформировал торец со страницами и с переплетом, чтоб он был похож на старую книгу со съехавшими друг относительно друга блоками страниц.

      Далее я делал переплет. Сначала я искривил разбитую плоскость по дуге (пропорциональное редактирование вам в руки). Снова исказил ее немного, чтоб она не была слишком идеальной. Продублировал объект, растянул — получил вторую часть переплета.

      Пришел черед текстур. Создавал я их в Adobe Photoshop, так как именно в этом редакторе я чувствую себя увереннее всего. В гимпе нет некоторых возможностей, использованных мною. Итак, я создал картинку с размером обложки. Вставил туда ранее отфотканную текстуру внутренней страницы (это будут места потертостей), растянул ее, чтоб не было видно лишнего. Мне нужен был практически только её цвет.

      Создал новый слой, залил его цветом обложки.

      Обложка в Photoshop

      Выбрал ластик, взял стандартную кисть, напоминающую что-то разбрызганое. Изменил ее параметры так, чтоб она была более редкой, рисовала со случайным поворотом и размером.

      Стер синее там, где у нас на обложке будут потертости. Добавил чуть тени этому слою. В итоге выглядело это так:

      Далее, текстуры переплета:
      Я создал прямоугольничек цвета обложки, продублировал его слой. При цветах по умолчанию (черный — рисующий, белый — фоновый) к верхнему слою применил фильтр Fibers, поколупавшись в его настройках. Изменил тип наложения в Color Burn, прозрачность поставил в 20%. Добавил полосочки и текст.

      Третья текстура сделана практически идентично.

      Меш обложки достаточно прост: прямоугольник с некоторыми искажениями, которые видно на финальном рендере.

      Затем я наложил текстуры на меши. Обложку я анврапил и подгонял ее к текстуре, переплет сделал с помощью «Projection from view».

      Больше всего реалистичности и потрепанности добавляют торчащие листы. Однако, с ними всё максимально просто: это плоскости, подразделенные в нужных местах и искривленные. Кроме того, я удалил у них случайным образом полигоны на краях, дабы они выглядели подертыми. Ну и сгладил получившиеся лесенки.

      Текстура на них та же, что я использовал ранее — внутренний лист. Наложение — опять UV, Projection from view.

      Я разместил в относительно случайном порядке сделанные страницы и воаля! Открою секрет — там уйма дублей ��

      Маты у книги не сложные — почти отсутствие блеска и твердость около 30. Естественно, слабенький бамп.

      Paper Model

      This add-on generates a flat net of a given mesh. It creates either PDF or SVG files suitable for direct printing and paper modeling. The main goal is a maximal possible automation of the whole process. Common tasks like baking the model’s texture into the output document are also supported.

      Usage

      To avoid eventual issues, switch to Object Mode. Then, select the mesh you want to export so that it is the active one. If you want to get results quickly, just execute this add-on from the File ‣ Export menu. It will ask for a file name and do everything else automatically. All relevant settings are in the bottom left corner. These are described in more detail below.

      If you are unhappy with the generated net, you can edit it manually. For this, you have to execute the Unfold tool first (available Mesh tab in the Properties). Edges that will be cut in order to flatten the mesh must be marked as Edit Mode seams. You can use Clear Seam and Mark Seam tools to organize them as you wish, or use the helper button Clear All Seams in Object Mode to start from scratch. When you export the model, it will use all the given seams and add some more cuts if necessary.

      You can also call the Unfold tool just for a preview of the net. It will list all islands of the produced net in the panel and if you enable so in the tool’s settings, it will also create a UV layout showing the islands. Note that island positions are not calculated in this stage, so that they will all just lay on top of each other. You can use Blender’s Pack Islands tool to arrange them.

      There are a few kinds of topology that are possible in Blender but not in paper reality:

      N-gon faces (everything except triangles) that are not perfectly flat.

      Zero-length edges (two vertices exactly in the same spot and connected by an edge)

      Zero-area faces (typically their vertices lie all in line)

      If any of these cases is detected, the add-on will throw an error message and will not export. The error message guides you how to fix the issues.

      Exporting Textured Meshes

      To export your model with a hand-painted texture, you have to unwrap the model, paint an image and assign it to the model so that it has an effect during render. You can use any tools you like for these tasks. What the add-on does is simply that it uses baking in Textures mode.

      Switch to Object Mode and deselect any objects except the one to be exported. Then execute Export Paper Model and in the File Browser switch the Textures selector to From Materials.

      If you choose to export an SVG file, you get several options how to attach the images. All the options are explained in more detail Properties.

      The resulting texture does not depend on any scene settings except for the given material, and on the other hand, all settings should be intact after doing the export.

      How to Read the Net

      Most of the document’s appearance can be customized during export (see below). However, the default style is supposed to be familiar to paper modelers: dashed lines represent folding outwards, dash-dotted lines inwards (i.e., to form concave shapes). Boundary of each part of the net is rendered in solid lines. Sticking tabs have a grayish fill color to be distinguishable from other parts of the net.

      A label is written on a tab when its target edge might not be clear. Specifically, the label is omitted if the edge will be stuck to the same place as its both neighbors or if one of these is the target itself. The format of labels is island_abbreviation: edge_number . Island abbreviation is written in square brackets under the corresponding island, before to its full-length name. Edge number is written as a triangle arrow next to that target edge, outside the net.

      If Create Tabs is disabled, the same format is used for labels along each of the related edges, inside the net. This method is designed for modeling from hard and/or thick materials, for which sticking tabs are quite pointless. If Create Numbers is disabled, the labels are omitted; this may be necessary for highly detailed models.

      How to Print the Net

      The PDF file can be directly printed almost anywhere. However, things become difficult if you need to change the net by hand.

      If you select the SVG format, you can edit the exported files in a vector graphics editor such as Inkscape. One reason why you may want to do is to pack the islands manually and save paper. Another reason is that the tabs and numbers often make a lot of clutter around the model and it can be helpful to remove some of them by hand.

      If printed document gets cropped around the page borders, it means you should increase the Margin setting during export.

      Placing Marks on the Net

      Edges with a Freestyle Mark ( Edge ‣ Mark Freestyle Edge ) will be highlighted in the net with a user-defined color and drawing style. This is helpful especially when used on flat edges, which would normally not be drawn at all. If you draw a shape with the Knife tool and then mark some of the edges as Freestyle ones, you can make a simple line drawing on the model.

      When used on folding edges, the highlight will be drawn below the folding line. So you will probably have to change the Freestyle Lines drawing style to make it wider and not black, so that the lines stay distinguishable.

      Settings

      Paper Model Islands

      The Paper Model Islands tab in the Mesh tab offers two buttons for calling the Unfold and Export Paper Model tools conveniently. It also offers buttons for marking and clearing seams, depending on the context, and the experimental functionality Limit Island Size.

      Once the Unfold tool is called, the model is split into flattened parts and these are presented in a list called Islands below. The list allows you to change the label of each island. If Create Numbers is enabled during export, abbreviations of these labels will be used to describe which tab should be stuck to which island. After running the Unfold tool, these island labels are recalculated so that as many faces as possible remain under the same label.

      If you select an island and enable the Highlight Selected Island button (and the mesh you unfolded is the active one), the island will be highlighted in orange in the 3D Viewport. Using the slider below, you can change the opacity of the highlight.

      Unfold

      The first option from top is Create UV map. If enabled, a new UV map will be generated to show all the islands. However, their positions are not calculated yet at this time of the export process, so they are all just placed in the bottom left corner. This option is useful when editing the cutting lines by hand. You can use the Unwrap tool and get a similar result.

      The tool has three sliders, which all adjust edge cutting priority (namely: Face Angle Convex, Face Angle Concave, Edge Length). A high value gives an edge with the corresponding property a higher chance to be cut. Because of that, it is usually better to set Edge Length to a negative value, letting long edges stay connected. Randomly modifying these values may often help to reduce the count of islands in the net. For information about the meaning of these values, read the Unfold section in the Technical Details.

      Properties

      When the export is initiated, the add-on silently unfolds the mesh (without marking any seams) and divides all faces into islands, which may take a few seconds for complex meshes. Then, a File Browser is displayed. With SVG format, the file name you choose will get a _page<number>.svg suffix, even if only one page was needed.

      Settings of this exporter are presented in the bottom left corner of the File Browser.

      The Preset menu allows to quickly save and recall all the settings below it, including model scale and color style.

      Model Scale can be used to scale the whole net. If you want to have a model in 1:72 scale, just set this to 72. This is an important option also because the add-on often produces islands bigger than the page.

      By default, this value is set so that even the biggest island fits onto the page. If set to one, the real model will have the same dimensions as the virtual one.

      Has a similar effect as the similar named option of the Unfold tool, but not the same. It will create a new UV map that exactly reflects the placement of all the model’s islands. Unfortunately, islands from all pages are placed on top of each other, and it is quite impossible to tell them apart.

      Document Settings

      Settings closely related to the format of the output document are in the Document Settings subpanel.

      First selector switches between PDF and SVG document formats.

      Another selector below allows you to choose one of the most common paper sizes quickly. If you need something else, choose User Defined and set the dimensions manually.

      Makes it easier to export models in exact scale (if you set the Model Scale slider to 1).

      You can set it to the width of the non-printable border of your printer, in order for the resulting SVG document to be printable without further scaling. However, exporting in-scale models is still difficult, as the add-on does not automatically split oversize islands.

      The next value is DPI, which defines the overall resolution of the net. That is, not only resolution of baked images (if any), but also line thickness.

      Controls if the sticking tabs are created at all. For example, uncheck this if you want to stick the model using tape.

      Adds numbers to some edge pairs that are supposed to be stuck together. These numbers are excluded if the correct destination is easy to guess from the neighboring edges. In more complex models, they may overlap a lot with each other and with the net itself. Disabling this option may help solve such issues. If Create Tabs is disabled, the numbers will be rendered inside of the net.

      Tabs and Text Size

      Sets the maximal width of the sticking tabs around islands. The actual size of each tab is adjusted to be at most half the length of the corresponding edge. In some special cases, tabs are made not to overlap with real faces, but it does not work reliably yet. If Create Tabs is disabled, this slider controls the size of numbers on edges.

      Hidden Edge Angle

      Edges with folding angle below Hidden Edge Angle will not be drawn at all. Increasing this value may produce nicer results when exporting smooth surfaces, such as cylinders: it will spare a lot of unnecessary lines. Decreasing it could possibly help in some special cases.

      The Textures select menu lists options for exporting textured meshes.

      Just creates the net on a white background (this used to be called “Pure Net”). The remaining options invoke texture baking and therefore are noticeable slower.

      Exports the image that is assigned to each of the model’s faces in their active material.

      Full Render, Selected to Active

      Correspond to the respective Bake Type options. They both render all the materials and illumination: Full Render renders the model only, while Selected to Active projects other nearby selected objects onto the model. It may be helpful for creating patterns such as fur or leaves procedurally.

      The Images select menu allows you to choose how to include the baked images in the SVG file. If you want to edit the layout of the net in an SVG editor, choose either Linked or Embedded.

      Creates standalone SVG files, making them bigger but portable.

      Remains mostly for compatibility reasons.

      Colors and Style

      Options related to the drawing style are packed in the Colors and Style subpanel. They should be quite self-explanatory.

      Technical Details

      Unfold

      Firstly, the algorithm assigns every edge a “priority”, depending on its angle and length. Edges with higher priority will more probably be cut apart in the final net. Shorter edges have higher priority (they are easier to glue on) and sharper angles too (that makes the net easier to visually understand).

      Faces form a concave angle if their normals are pointing against each other. Such angles have even a bit higher priority which is supposed to help for typical models. If some face normals are flipped, the algorithm always assumes the angle between them be convex.

      If more than two faces are connected by an edge, two of them are designated as the main ones and all others will have to be glued. The main faces are chosen so that they form the smallest angle possible.

      The actual priority effect of angle versus length may change the resulting net very much. The default values were chosen by trial and error for some basic models, but may be a bad choice for others. If you want to tweak them, the Unfold tool allows you to: they are the tool’s three only settings.

      The cutting algorithm begins with all faces separated and tries to connect them to form bigger islands, ordered by the connecting edge’s priority. If some of the faces of the resulting island would overlap, the operation is canceled and the algorithm continues with another edge. If some vertices or edges end up close enough to each other, they are merged. During this process, each edge is visited exactly once.

      The overlap check is basically the Bentley-Ottmann algorithm for line segment intersection, applied to the boundary of the resulting island. To handle some special cases, the algorithm automatically switches between a slightly quicker and a more robust version of itself. Another check is applied to detect if the boundary crosses itself in just a vertex of the resulting island – such cases have to be tested explicitly as they need not cause any intersecting line segments.

      Positioning the Nets on Pages

      Because the nets are not consisting only of the real faces, but also of the gluing tabs around, they cannot be positioned by the internal Blender tool (Pack Islands). Therefore, a standalone algorithm had to be written.

      For a great simplification of the process, all nets are packed into (smallest possible) bounding rectangles. These are then ordered by size (largest first) and in this order the algorithm tries to position them on a page. The positions tested for the lower left corner are given by an n × n grid resulting from all the corners of islands already positioned. A position is accepted or rejected by checking overlaps with each of the islands’ bounding rectangles.

      When there are any islands left that could not be placed onto the page, a new free page is created.

      This algorithm should work reliably and quite fast. However, it is clearly inefficient if the bounding rectangles contain much free space. Also, the packing depends heavily on the order in which the islands are processed, which is in no way optimal.

      © Copyright : This page is licensed under a CC-BY-SA 4.0 Int. License. Last updated on 09/05/2023.

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *