Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
3D Environment Design with Blender
3D Environment Design with Blender

3D Environment Design with Blender: Enhance your modeling, texturing, and lighting skills to create realistic 3D scenes

By Abdelilah Hamdani , Carlos Barreto
$35.99 $24.99
Book Jan 2023 344 pages 1st Edition
eBook
$35.99 $24.99
Print
$44.99
Subscription
$15.99 Monthly
eBook
$35.99 $24.99
Print
$44.99
Subscription
$15.99 Monthly

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Buy Now

Product Details


Publication date : Jan 31, 2023
Length 344 pages
Edition : 1st Edition
Language : English
ISBN-13 : 9781803235851
Vendor :
Blender Foundation
Category :
Concepts :
Table of content icon View table of contents Preview book icon Preview Book

3D Environment Design with Blender

Most Common Modeling Mistakes That Prevent You from Achieving Photorealism

Have you ever tried to create a photorealistic scene in Blender? Are you looking for a step-by-step formula to help you achieve photorealism in Blender? Do you find yourself stuck getting the right settings? If so, you’re not alone.

In this chapter, we’re going to break down the three modeling mistakes that most 3D designers make that prevent them from achieving photorealism in Blender.

Modeling represents the foundation for what’s coming next: texturing, UV mapping, lighting, compositing, and rendering. Getting the foundation wrong will make all your efforts be in vain, so the goal of this chapter is to help you get the modeling foundation right.

The first mistake is relying on only your eyes to estimate the scale of objects you’re modeling. When it comes to photorealism, getting the right scale plays a crucial role. So, we’ll be discussing the Blender unit system and how to perform research to get the right, realistic measurements of objects before modeling them.

The second mistake is related to scale matching: most designers immediately dive into creating a 3D scene based on a real reference without doing any scale matching. This makes it really hard to get the same camera settings, such as position, rotation, and focal length, that an actual photographer would use. This results in an unmatched result to the reference you’re working with. To overcome this issue, we will learn to use fSpy, a tool that allows you to replicate the camera settings adopted by a photographer (focal length, camera position, and rotation) when taking a picture of an actual image and export it into Blender. We will explore how the fSpy interface works, how to use it, and how to install the fSpy add-on into Blender and import fSpy project files.

The third mistake is modeling without the bevel modifier on. By the end of this chapter, you will understand the importance of using the bevel modifier when modeling and the role it plays in achieving photorealism. You will also understand the different beveling settings and how they work inside Blender.

In this chapter, we’ll be covering the following topics:

  • The importance of using a real-world scale
  • Learning scale matching using the fSpy program
  • The importance of using the bevel modifier when modeling

Technical requirements

This chapter requires a Mac or PC capable of running Blender Version 3.0 or above.

You can download the resources for this chapter from GitHub at https://github.com/PacktPublishing/3D-Environment-Design-with-Blender/tree/main/chapter-1

The importance of using a real-world scale

When creating complex scenes in Blender, it’s easy to fall into the trap of eyeballing the scale of objects when modeling them, without taking the right measurements. This can lead to multiple problems that will prevent you later on from achieving a photorealistic and eye-pleasing result.

We think our eyes are accurate – “I know how large this window is, it’s this size”; however, we’re really bad at estimating measurements simply because we give more emphasis to the things that we pay attention to and neglect the parts we deem unimportant.

This then affects the photorealistic aspect of your scene: you end up wondering what is wrong with your scene. Something just looks off and you don’t know what it is. You start messing around with the materials and the lighting, and maybe those are perfect but then you realize the foundation was wrong. So, it is important to get this modeling foundation right.

So, the solution is to always use a real-world scale.

Let’s say you’re designing a wood cabin; the first thing you need to do is research on Google: What is the height of a log cabin?.

Figure 1.1 – Google search for the height of a log cabin

Figure 1.1 – Google search for the height of a log cabin

So, now we understand that a wood cabin must not exceed 3 meters in height, so everything between 2 and 3 meters should be reasonable. With the apex roof included, another meter is added.

Since we must not exceed 30 m2, we can give a dimension of 5 m wide and 6 m long (5 m × 6 m = 30 m2.).

Next, we will check the Blender unit scale:

  1. Go to Scene Properties.
  2. Click on the Units tab.
  3. Then choose the Unit System measurement that suits you.
Figure 1.2 – Blender scene properties units system

Figure 1.2 – Blender scene properties units system

Choosing Metric will measure the length in meters and mass in kilograms, unlike Imperial, which will measure the length in feet and mass in pounds. This is the right way to set real-world measurements in Blender.

Another good reason to always use a real-world scale is because of how physics simulation works in Blender. Physics in Blender, such as gravity, rigid body, and mass, relies on real measurements to work properly.

To emphasize this even more, let’s create a sphere; by default, the sphere will be 2 meters in diameter. Next, we go to Physics Properties, and we click on Rigid Body while making sure the sphere is selected. Under the Settings tab, you’ll see that Mass is set to 1 kg by default. This means that the 2-meter diameter sphere you’ve just created has a weight of 1 kg.

Figure 1.3 – Blender physics properties

Figure 1.3 – Blender physics properties

Now, if you press the spacebar, the physics simulation will start. Our sphere will fall down due to gravitational force. If we change the scale of our sphere to something around 0.2 meters and give it a weight of 4.5 kg, our sphere will behave exactly like a bowling ball. Similarly, if we scale down our sphere diameter to 5 cm and a weight of 170 g, our ball will act like a billiard ball.

The bottom line is, always use a real-world scale: it’s crucial for achieving photorealistic results that match reality.

Now that we have seen the importance of using real-scale measurements when modeling, let’s learn scale matching. It’s an awesome trick that allows us to get almost the exact camera settings from an image reference, so that we can then easily recreate the scene in Blender.

Learning scale matching using fSpy

Next, let’s learn scale matching. To put things in perspective, let’s say you have a real reference that you want to replicate as a 3D scene. You can load it as a camera background, and start modeling it, but soon enough, you will encounter a big challenge, which is to match the same position, rotation, and focal length of the camera that took the shot.

You can see in this example the difficulties in matching the same log cabin reference:

Figure 1.4 – Wood cabin model not matching the reference

Figure 1.4 – Wood cabin model not matching the reference

Our objective is to place the modeled cube exactly on top of the cabin reference (the red lines must be on top of the green lines). The corners must match each other in order to have true camera matching; doing it by eye won’t cut it, so we need to do it the right way.

Luckily, we have fSpy, which is a free open source software program that allows us to estimate the camera parameters from an image reference and import it into Blender.

The way it works is as follows: you import the reference image whose camera settings you want to match, and you choose the number of vanishing points; you will find this feature on the top left side panel of the fSpy program.

Figure 1.5 – Vanishing point axes in the fSpy interface

Figure 1.5 – Vanishing point axes in the fSpy interface

Basically, the number vanishing points depends on the type of reference you’re using:

  • One vanishing point: This means that your reference has a point where all lines meet. If you follow any parallel lines in the reference, they will end up meeting at one point.
Figure 1.6 – Example of one vanishing point reference

Figure 1.6 – Example of one vanishing point reference

  • Two vanishing points: You can use two vanishing points in case there are two kinds of parallel lines in your reference, with each side seemingly slowly fading away into distance; they will meet at a certain point in the distance. An example would be something like this:
 Figure 1.7 – Example of two vanishing points

Figure 1.7 – Example of two vanishing points

The camera parameters are as follows: focal length, rotation, and position of the camera.

In our case, we will be using a wood cabin reference that has two vanishing points; you can tell this by following the wood lines on both the front and side faces of the cabin. You can download this image from GitHub at https://github.com/PacktPublishing/3D-Environment-Design-with-Blender/blob/main/Wood%20Cabin%20Reference.jpeg

Figure 1.8 – Wood cabin reference

Figure 1.8 – Wood cabin reference

Alright, now let’s start using fSpy.

Downloading fSpy

First, let’s download fSpy. You can google fSpy or use this official website link: https://www.fspy.io.

Once on the webpage, we will do the following:

  1. Click the green Download button.
Figure 1.9 – fSpy download button

Figure 1.9 – fSpy download button

You will be directed to GitHub.

  1. Under Assets, we will be downloading the fSpy-1.0.3-ia32-win.zip file, which is 47.2MB Unzip it, and double click on the fSpy icon.
  2. Inside the program interface, on the top bar, go to File -> Open Image.
  3. Choose the image reference shown in Figure 1.8.

If done right, this is what you will get:

Figure 1.10 – Wood cabin reference loaded into fSpy

Figure 1.10 – Wood cabin reference loaded into fSpy

After downloading fSpy, put our image reference into it and set the x and z axes to match our reference lines. Now, it’s time to understand the fSpy interface and how we can manipulate it to get the best results.

Breaking down the fSpy tools

Alright, let’s get to work on using the fSPy tools:

  1. Make sure you’re using two vanishing points; you will find this feature on the top left side panel (see Figure 1.5).
  2. Make the image reference clear, then on the left side, down below, uncheck the Dim image box.
  3. On the left panel, switch the y axis to the z axis to get the vertical proportion of your reference.
  4. Align the x and z axes with the most obvious lines in our reference.

In our case, we can rely on the wood lines and roof. Make sure the lines you choose are far away from each other; this will allow the fSpy to caliber the scene much better.

The final result should be as follows:

Figure 1.11 – fSpy vanishing point axes aligned with the reference lines

Figure 1.11 – fSpy vanishing point axes aligned with the reference lines

Sometimes the focal length generated by fSpy won’t be accurate, so you have to tweak it a little bit manually – it’s really easy to do so.

Adjusting the focal length

To adjust the focal length, perform the following steps:

  1. On the left panel, change Principal point to Manual. By default, Principal point will be set to Image midpoint. As soon as you change it to Manual, a yellow point will appear in the middle of your reference.
  2. If you grab it and move it a little bit, you will change the focal length of your camera. You will see that on the right panel under the Field of view tab, beside the Horizontal value:
Figure 1.12 – Changing the focal length settings in fSpy

Figure 1.12 – Changing the focal length settings in fSpy

Alright, now let’s save this project: go to File then click on Save As and save the fSpy file to your desktop.

Exporting the fSpy file

Now, let’s export this fSpy file into Blender. To do that, we must install an addon that allows us to do this.

The addon is available at this GitHub link for download: https://github.com/PacktPublishing/3D-Environment-Design-with-Blender/blob/d71de483c88180ac12dc0e6738ce3a7425b00389/chapter-1/fSpy-Blender-Addon.zip.

Once you download the fSpy-Blender-Addon.zip file, make sure to not unzip this file.

Once you get the addon zip file, we can now jump into Blender and install it. So, in our Blender interface, click on Edit -> Preferences, click on Add-ons on the middle left side, then on the top right, click on Install and choose the fSpy-Blender-Addon.zip file. Then you should see a message below saying that the module is installed. Also make sure that you enabled the fSpy addon box Import-Export: Import fSpy project.

Figure 1.13 – Installing the fSpy add-on in Blender

Figure 1.13 – Installing the fSpy add-on in Blender

Alright, now let’s import the fSpy file we created with the fSpy program. If you follow the previous steps, when you go to File and Import, you will see that you have the possibility to import fSpy files into Blender. Just click on Import and choose the fSpy file we created earlier, then you will see the following:

Figure 1.14 – Importing the wood cabin fSpy file into Blender

Figure 1.14 – Importing the wood cabin fSpy file into Blender

This is the benefit of using fSpy; now we have camera settings that match those of our photographer who took this shot. The same camera focal length, camera position, and rotation has been replicated. From now on, we can go and start building our scene.

Building our scene

First, let’s exit the camera view; you can do so by pressing the number 0 on the numpad.

Figure 1.15 – First three steps to creating the wood cabin scene

Figure 1.15 – First three steps to creating the wood cabin scene

We begin by making a ground plane (1) and adding a simple cube (2), making sure it’s on the top of the grid.

Place the cube on the corner of the cabin reference:

Figure 1.16 – Putting the modeled cube in the corner of the reference

Figure 1.16 – Putting the modeled cube in the corner of the reference

Placing the cube on the corner of the cabin reference will allow you to get the right start. Otherwise, you will be stuck not knowing where to put the initial cube. Another note is to move the cube only along the x and y axes; we need to keep it on the floor.

Figure 1.17 – Four steps to model the wood cabin in Blender

Figure 1.17 – Four steps to model the wood cabin in Blender

Next, we can proceed and create the basic shape of the wood cabin that we have in our reference:

  1. Select the cube and enter edit mode (press Tab to toggle between edit and object mode).
  2. In edit mode, select the front face, and move it to cover the length of the cabin wood. Also, align the backface with the back of the wood cabin reference.
  3. Select the top face and move it upward until it reaches the beginning of the roof.
  4. Press E to extrude it more upward until it reaches the top of the reference.
  5. You can scale it on the y axis to make that A shape.

As you can see, we will now have a perfect match to our reference image:

Figure 1.18 – The final result of the modeled wood cabin

Figure 1.18 – The final result of the modeled wood cabin

Also, make sure that you are using the measurements we set earlier; to do so without distorting the camera angle, make sure that you scale everything up one at a time, the camera included.

Now that we have finished matching the same scale of our reference and made a simple wood cabin, you can see the beauty of scale matching; our camera settings in Blender now perfectly match the camera settings used to take the reference image. Both have the same focal length and rotation. This is an excellent start to achieving a photorealistic result.

Next, we will cover one of the most fatal mistakes that prevents most 3D designers from achieving photorealism: forgetting the bevel modifier.

The importance of using the bevel modifier when modeling

One of the fatal mistakes that most 3D designers commit that prevent them from achieving photorealistic results is modeling without using the bevel modifier. Let’s see a quick example in Blender to emphasize this theory.

Bevel modifier

The bevel modifier gives you the ability to bevel the edges of the mesh it is applied to. Basically, it adds edge lines in between the mesh corners (see Figure 1.17). It might seem like a simple step, but the effect the bevel modifier has is enormous for achieving photorealism; we’ll see that later.

Figure 1.19 – Creation of two cubes

Figure 1.19 – Creation of two cubes

For our example, let’s use two cubes, one with the bevel modifier applied to it (red cube) and another without any beveling (blue cube). To apply beveling to the red cube, let’s perform the following steps:

  1. Go to Modifier Properties (wrench icon), select Add Modifier, and choose the Bevel modifier:
Figure 1.20 – Bevel modifier settings in Blender

Figure 1.20 – Bevel modifier settings in Blender

  1. Set Amount to 0.02 m; this represents how large we’re going to be affecting the corners of our cube object. Basically, the one corner edge we got by default will be divided into two edges, and the distance between the two edges is the bevel amount.
  2. Set Segments to 3; this indicates how many face loops there are going to be inside the bevel.
  3. Select the beveled cube, then right-click and choose Smooth.

Figure 1.21 – Three cubes demonstrating the Amount, Segments, and Smooth bevel settings

Figure 1.21 – Three cubes demonstrating the Amount, Segments, and Smooth bevel settings

The other cube will remain as default: no beveling will be applied.

When you add a source of light to the scene, you will see a big difference between the two cubes:

Figure 1.22 – Final render of the beveled and unbeveled cubes

Figure 1.22 – Final render of the beveled and unbeveled cubes

The red beveled cube reflects light on its corners, which makes it more realistic. On the other hand, the blue cube looks fake right on the spot: its edges are 100% sharp and non-realistic.

In general, 3D software programs like Blender make everything perfect by default. When creating a cube, for example, it will come with these sharp 90-degree corners, something that doesn’t exist in real life. In nature, you’ll never find an object that has completely sharp edges. Even if you zoom in on a sharp knife (zoom really close to its edge), you’ll find some sort of beveling.

I’ve heard a saying that says, “Imperfection is the CGI perfection,” which means that in order to make objects photorealistic, we have to break the perfection that comes with CGI, and one of the first steps to break it is to always apply the bevel modifier.

Now with the measurements we set earlier and the help of the fSpy, we can set the right scale.

Summary

In this chapter, we went through the three modeling mistakes and how to fix them. Starting with scale matching, we discussed why it’s a bad habit to rely on eyes only when modeling, how the Blender unit system works, and how to set the right measurements of objects before modeling them.

Next, we installed and configured the open source fSpy to help us match the same proportions of a real wood cabin reference, following which we learned how to install the fSpy add-on and import the fSpy file into Blender and built the basic scene that resembles the real reference scale.

Finally, we discussed the importance of using the bevel modifier and why it’s crucial to achieving photorealism.

In the next chapter, we will be covering the second building block for photorealism, which is the creation of PBR materials. We will break down the components of PBR materials and understand the role of each channel and how it works. Finally, we will create an example of realistic wood material in Blender using procedural texturing.

Left arrow icon Right arrow icon
Download code icon Download Code

Key benefits

  • Reveal modeling tricks to make your Blender 3D environments look realistic
  • Discover techniques to enhance the photorealism of your scenes while saving time
  • Set up realistic lighting in your scenes to make your environment look pleasing to the eye

Description

Blender is a powerful tool for creating all kinds of visual assets, but with such power comes complexity. Creating a photorealistic 3D scene seems like a Herculean task for more than 90% of 3D designers, but don’t be discouraged! 3D Environment Design with Blender will get you up and running. This practical guide helps reduce the complexity of 3D environment design, advance your Blender skills, and produce lifelike scenes and animations in a time-efficient manner. You'll start by learning how to fix the most common mistakes 3D designers make with modeling and scale matching that stop them from achieving photorealism. Next, you’ll understand the basics of realistic texturing, efficient unwrapping and achieving photorealistic lighting by turning an actual reference of a wood cabin into a realistic 3D scene. These skills will be used and expanded as you build a realistic 3D environment with natural assets and materials that you’ll create from scratch. Once you’ve developed your natural environment, you’ll advance to creating realistic render shots by applying cool camera features, and compositing tricks that will make your final render look photorealistic and pleasing to the eye. By the end of this book, you'll be able to implement modeling tricks and best practices to make your 3D environments look stunningly lifelike.

What you will learn

Understand how to avoid the most common modeling mistakes 3D designers make Create realistic landscapes using Blender s built-in A.N.T Landscape add-on Build natural assets such as rocks, flowers, plants, and rivers that you can customize and use in a variety of projects Create realistic materials such as snow, mud, wood and animated water Use the particle system to generate realistic grass, as well as scatter flowers and rocks Apply the five lighting rules to achieve great photorealistic results Use nodes and materials effectively to produce impressive results

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Buy Now

Product Details


Publication date : Jan 31, 2023
Length 344 pages
Edition : 1st Edition
Language : English
ISBN-13 : 9781803235851
Vendor :
Blender Foundation
Category :
Concepts :

Table of Contents

20 Chapters
Preface Chevron down icon Chevron up icon
Part 1: Turn a Real Reference into a Realistic 3D Scene in Blender Chevron down icon Chevron up icon
Chapter 1: Most Common Modeling Mistakes That Prevent You from Achieving Photorealism Chevron down icon Chevron up icon
Chapter 2: The Basics of Realistic Texturing in Blender Chevron down icon Chevron up icon
Chapter 3: Efficient Unwrapping and Texturing in Blender Chevron down icon Chevron up icon
Chapter 4: Creating Realistic Natural Plants in Blender Chevron down icon Chevron up icon
Chapter 5: Achieve Photorealistic Lighting in Your Environment with Blender Chevron down icon Chevron up icon
Part 2: Creating Realistic Landscapes in Blender Chevron down icon Chevron up icon
Chapter 6: Creating Realistic Landscapes in Blender Chevron down icon Chevron up icon
Chapter 7: Creating and Animating Realistic, Natural-Looking Water Chevron down icon Chevron up icon
Chapter 8: Creating Procedural Mud Material Chevron down icon Chevron up icon
Chapter 9: Texturing the Landscape with Mud Material Chevron down icon Chevron up icon
Part 3: Creating Natural Assets Chevron down icon Chevron up icon
Chapter 10: Creating Natural Assets: Rock Chevron down icon Chevron up icon
Chapter 11: Creating Realistic Flowers in Blender Chevron down icon Chevron up icon
Part 4: Rendering Epic Landscape Shots Chevron down icon Chevron up icon
Chapter 12: Using Particle System to Scatter Objects in Blender Chevron down icon Chevron up icon
Chapter 13: Finalizing the Landscape Scene – Lighting, Rendering, and Compositing Chevron down icon Chevron up icon
Index Chevron down icon Chevron up icon
Other Books You May Enjoy Chevron down icon Chevron up icon

Customer reviews

Filter icon Filter
Top Reviews
Rating distribution
Empty star icon Empty star icon Empty star icon Empty star icon Empty star icon 0
(0 Ratings)
5 star 0%
4 star 0%
3 star 0%
2 star 0%
1 star 0%

Filter reviews by


No reviews found
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.