Читать книгу Blender For Dummies - Jason van Gumster - Страница 95
Creating collections
ОглавлениеOf course, under some circumstances, parenting doesn’t make sense for organizing a set of objects. A good example is a lighting setup that you want to adjust and reuse. Sure, you can rationalize that perhaps the key light is the most important light and, therefore, should be the parent, but that logic is a bit of a stretch and doesn’t make much sense in more complex setups. You could also add an Empty to the scene and parent all your lights to it. That solution works, but what if you wanted to make a duplicate instance of that light rig?
For these cases, Blender’s collections feature is ideal. You may not be aware of this, but if you’ve been working in Blender, you’ve been using collections all along. Fire up a new Blender session and have a look at the Outliner. You should see something like what’s shown in Figure 4-13. By default, all Blender sessions start with two collections: a Scene Collection that binds objects to a particular scene in your .blend
file, and a general collection — named Collection — within that scene. All the default objects (the cube, camera, and light) are part of the collection.
FIGURE 4-13: The Outliner is where you manage collections. Four chapters into this book and you’ve been using them all along!
If you’re coming from another 3D application, you might think of collections like groups or layers, but they’re so much more than that in Blender. Collections are not only a great way to organize your scenes, but they’re also an integral part of other processes in Blender such as instancing and compositing.
Even with just the one collection in your scene, there are a few things you may want to do from the Outliner. For the first thing, I strongly recommend that you rename your collection to something that makes sense to you. Nothing is more confusing than opening an old project and seeing your collections named Collection, Collection 1, Collection 2, and so on.
To rename a collection, double-click its name in the Outliner and type the new name you’d like to use. You can’t do this with the scene collection, but any collection within the scene is fair game.
Looking back at Figure 4-13, notice also that the collection has a check box to the left of its name and an eye icon to the right of it. Both these controls seem to have a similar effect on the objects in the 3D Viewport, but in application, they’re used very differently. The check box is specific to how the collection relates to your current view layer, used when rendering and compositing (see Chapter 18 for more on view layers). If you disable the check box, that collection is basically disabled for this part of your scene. The eye icon will also hide the objects from your scene if you click on it to disable it, but the difference is that those objects aren’t disabled, they’re just not currently visible in the 3D Viewport.
To test the difference between these two controls, disable one and then render your scene (Render ⇒ Render Image). Then re-enable it and disable the other before rendering again. You should notice that when you disable the check box, nothing appears when you render, but when you click the eye icon to close it, your objects in the collection still appear when you render.
For a faster way to control the visibility of collections in your scene, you can use the Collections panel in the View tab of the 3D Viewport’s Sidebar. That panel lists all the collections enabled in your current view layer and provides you with toggles to control visibility.
Playing with one collection is fun and all, but it’s when you have multiple collections that you can really see this feature sing. From the View Layers display mode of the Outliner, you can create a new collection by clicking the New Collection button on the right side of the Outliner’s header. Clicking this button adds a new empty collection to your scene. You can populate that collection by dragging and dropping objects into it.
Of course, you’re not always working in the Outliner. Sometimes the Outliner is hidden or you’re working with a maximized 3D Viewport (Ctrl+Spacebar) and you don’t want to shrink it just to see the Outliner. Fortunately, you can also manage collections from the 3D Viewport. The easiest way to create a new collection from the 3D Viewport is to move one or more objects to it. Follow these steps:
1 Select all the objects you want to include in the new collection.As an example, say you want the lights in your scene to be in their own collection, so you start off by selecting all your lights.
2 Choose Object ⇒ Collection ⇒ Move to Collection or use the M hotkey.A secondary menu appears with a list of your current collections in your scene. Choose the menu item at the bottom that says New Collection. A pop-up will appear where you can name your new collection. In this example, you might choose to name that collection Lights. After you confirm the collection’s name by clicking OK, all your selected objects are moved to your new collection.
Looking in the Outliner, you should now see that your selected objects (in this example, your lights) are no longer in your original collection, but in your newly added one. You can also go to the Object tab of the Properties editor and look in the Collections panel to see what collections an object belongs to.
Actually, this is an important point that highlights another example of how collections and parenting differ. Whereas an object can have only one parent, it can be a member of any number of collections. Let me write that again for emphasis. An object can belong to multiple collections.
You might find yourself wondering what possible uses there could be for having objects be members of multiple collections. The simple (but not easy) explanation is scene organization. This is especially true as your scenes become more and more complex. You may have a scene full of foliage. Each tree, flower, and shrub is part of a corresponding collection, each named “trees”, “flowers”, and “shrubs”. Now say you’re doing a little physics simulation on that scene and you only want the tallest trees and shrubs to be affected by that wind force. You wouldn’t want to pull your trees and shrubs from their collections to a collection called “physics”. It would be much better if those trees and shrubs could be members of both collections.
If you choose the Object ⇒ Collection menu, you have a number of options:
Move to Collection (M): This menu item invokes the operator used in the preceding example. Whatever objects you have selected get moved to another collection, either pre-existing or new.
Link to Collection (Shift+M): This operator is similar to moving your selection to a collection, but it does so without being removed from any collections your selected objects are already members of. This is how you get an object to be part of multiple collections.
Create New Collection (Ctrl+G): This option is always available and creates a new collection, adding your selected objects to it. Be warned, though. As of this writing, when you add a new collection with this menu item, it doesn’t show up in the Outliner, even though you can plainly see it in the Object tab of the Properties editor. For the time being, I’d suggest that you avoid using this menu item.
Remove from Collection (Ctrl+Alt+G): This option is always available, and choosing it removes the selected objects from any collections they may be a member of. Removing all objects from all collections doesn’t delete those collections while your Blender session is still active.
Remove from All Unlinked Collections (Shift+Ctrl+Alt+G): This is a quick shortcut to remove the selected objects from all the collections they may be a member of.
Add Selected to Active Collection (Shift+Ctrl+G): To use this feature, you need to pay attention to which object is your active object (hint: it’s the most recent object you’ve selected). Then any objects you have selected become members of all the collections your active object is a member of.
Remove Selected from Active Collection (Shift+Alt+G): Choose this option, and all your selected objects (including the active object) are removed from any collections in the active object.
In addition to having objects as members of multiple collections, you can also nest collections within each other to give yourself a bit of a hierarchical organization. The easiest way to nest collections within one another is through the Outliner. Simply click and drag one collection into another, and then that collection and all the objects in it becomes a member of the collection you moved it into.