Blender
Blender contains a:
3D models can be used in three applications:
fabricating and manufacturing
video games
animation for film and video
This later use requires video editing, and therefore, the Video Editing capabilities
were added into Blender, and integrated with the 3D modeling.
Structure
The blend file is a database.
It contains objects and scenes and collections.
Each object is referenced into one or more collections.
Each scene has a collection.
The user can also create collections for his own organizational purposes.
Collections can be named, colored, and nested hierarchically.
A collection can be appended or linked from another blend file.
UI
The Blender window is divided into three parts:
Topbar - one line at the top containing menus.
Current Workspace - the large space between the Topbar and the Status Bar.
Status Bar - one line at the bottom containing status info.
The Status Bar is optional. It can be turned off via the Window menu.
Keyboard shortcut cheatsheet:
https://drive.google.com/drive/folders/0ByidsAQcVcUUei0wc1lpVWlfUFU
Top Bar
The Topbar contains four menus.
main menu - App, File, Edit, Render, Window, Help
workspace tabs - one tab for each open workspace and a plus-sign Add Workspace button.
Scene menu - a drop-down menu of scenes, plus New and Delete buttons
View Layer menu - a drop-down menu of view layers, plus New and Delete buttons
There is always at least one workspace tab, one Scene, and one View Layer.
Visible UI Elements
workspace, area, editor, panel, tab
A workspace occupies the window space between the Topbar and the Status Bar.
A workspace is divided into one or more rectangular areas.
Each area contains one editor.
Some editors contain one or more panels.
Groups of panels can be toggled into view via tabs.
Workspace
There is always one current workspace visible.
Choose among the open workspaces by clicking on its tab in the Topbar.
A default workspace is a named layout of areas.
There are 22 default workspaces divided into 5 categories.
Nine of these are open by default when you start Blender.
To close a workspace, right-click on its tab and select Delete.
To open a workspace, click on the Add Workspace (plus-sign) button in the Topbar,
and then choose from among the default workspaces listed in the menu.
[Note: When Blender says add and delete workspace, they really mean open or close.]
To create a custom workspace, right-click on any tab and select Duplicate.
Then double-click the new tab and rename it.
A custom workspace is saved in the blend file. To make it globally available, click File - Defaults - Save Startup File. This will create a startup.blend file in a new folder named for the workspace in the user's config.
./config/blender/2.82/config/Video_Editing/startup.blend
Area
An area is a rectangular area of the workspace.
Areas are tiled, not overlapping.
Create a new area by splitting an existing area.
Delete an area by joining it to an adjacent window.
Move the mouse to the divider between the areas until you see the double arrow cursor.
Right click. The two areas become selectable.
Click on the one you want to keep.
Editor
Each area contains one editor.
An editor is of an Editor Type.
There are some 20 editor types grouped into 4 categories.
The top left corner of each area contains an icon button to drop down a menu of Editor Types.
Use this menu to change the editor shown in the area.
Notice that the icon identifies the editor type.
Panel
A panel is a rectangular area within an editor.
A panel can be collapsed or expanded.
A panel can grabbed and dragged to reorder the panels.
A panel can have sub-panels.
For example, in the Properties editor, in the Output panel,
a different set of sub-panels is shown depending on your setting of File Format.
Some editors contain a side panel on the right that can be toggled into view by clicking n.
[Example: Video Sequencer.]
Tabs
Tabs are sometimes used to switch among multiple sets of panels.
Tabs can be on the left, the right, or above the panel viewing area.
[Example. See the Properties Editor.]
Preferences
Python within Blender
Edit - Preferences - Interface - Python Tooltips: check on
areas (Editor Type - Scripting):
Text Editor - write python scripts here. Save and open files. Alt-P to run script.
Info - history of python commands executed by the UI.
Python Console - interactive python console. import bpy has been at done automatically.
System Console Window -
Errors from python scripts run in the Text Editor display in the System Console Window,
not in the Python Console.
In Linux, start blender from the command line.
The terminal window is the System Console Window.
If you close the terminal window, Blender stops immediately without saving.
YouTube: Curtis Holt: Python Crash Course for Blender!
Command-line
Blender's command-line options allow you to execute a pipeline of
digital video processing and rendering
on any number of files in a background, GUI-less process.
Example:
blender <filename.blend> -b -P <scriptname.py>
where:
-b
Run in background, no UI.
-P <scriptname>
Auto-run the named python script.
Blender Manual: Command-Line Options
3D Modeling
Terms
model - A collection of objects built within the world.
world vs object
3D objects exist within the 3D world.
There is one world, and multiple objects within that world.
Objects are made of vertices, organized into edges and faces.
A selection may refer to objects, vertices, edges or faces.
navigation vs transformation
navigation applies to the world, or rather, to my view into the world
transformation applies to an object or a selection
both navigation and transformation occur along or around an axis
there are three axes: x,y,z
navigation does not change the world. It only changes my view into that world.
transformation actually changes the model.
noun | applies to | terms | changes what |
navigation | world | pan, roll, orbit, zoom | my point of view |
transformation | object or selection | move, rotate, scale | the model |
3D Viewport - The editor type we use to do 3D modeling. Provides your view into the world.
3D Viewport
gizmo - a UI device that allows navigation or transformation with the mouse.
A gizmo always has three color-coded axes: X (red), Y (green), and Z (blue).
Gizmo
Navigation Gizmo - applies to the world. Found in upper-right of viewport.
Transformation Gizmo - applies to object or selection. Appears at the pivot point, aligned with the transform orientation.
pivot point -
for one object, or for a selection of objects, or in edit mode for a group of selected vertices
determines the locaion of the “object gizmo”, and thus is the center of transformations
types:
bounding box center
median point
center of mass
center of geometry
normal - the line perpendicular to a face.
origin -
world origin - the point at world coordinates 0,0,0. Constant.
local origin - average center of all selected objects of vertices.
object origin - local origin of a single selected object. By default is the bounding box center of the object. Can be moved by setting it to the 3D cursor.
3D Cursor - a singleton object with location and rotation. By default it is at the world origin.
Set it using the toolbar or the Snap menu via left-click or shift-S. The 3D Cursor has multiple purposes.
It defines where newly added objects are placed. It can be used to manually position and orient the transform gizmo.
transform orientation - the orientation of the Object Gizmo. Can be selected from the 3D Viewport Header menu.
global - aligned with the world space
local - aligned with the active object's orientation
normal - fancy. normally equivalent to local.
gimbal - fancy. Involving Euler math.
view - aligned with your viewpoint as you orbit.
cursor - aligned with the 3D cursor.
parent - aligned with the parent.
rotation mode - fancy. involving Euler math.
Note: object origin vs pivot point vs transform gizmo
A transformation requires a pivot point and a transform orientation.
if a single object is selected, the pivot point is the object origin. The object origin is by default the bounding box center, but it can be moved using the 3D cursor.
If multiple objects or vertices are selected, the pivot point is at the average point of the selected objects.
The transform orientation can be selected on the 3D viewport header, see above.
The transform gizmo visualizes the pivot point and the transform orientation.
How to navigate
Views:
orthographic (flat): top, bottom, front, back, right, or left.
perspective (having depth)
To switch views:
To navigate:
use Navigation Gizmo, in upper-right corner, plus magnifying glass and hand.
drag mmb to orbit. View automatically switches to perspective.
shift-drag mmb to pan.
scroll wheel, zoom view in and out
use Object Mode - View menu: pan, orbit, roll, zoom
t toolbar on the left, toggle on and off
buttons to move, rotate, scale, all three
put mouse into a mode
confine movement to an axis
add an object
duplicate
shift a, add, add - mesh - primitives menu: cube, plane, cone, monkey, torus
shift+A: add an object primitive
Render Engine
Cycles - slow, ray-traced, unbiased, for high-end movies
Eevee - fast, for real-time games
Force Fields, Particles, Animation
Particles move.
Force fields affect the movement of particles.
For a particle to move in space, it must simultaneously move in time,
hence particle movement is done through animation.
Particles are by nature animated.
Force fields affect the movement of particles.
Force fields can be experienced only in the presence of particles.
Particles can be experienced only in the presence of a force field.
Empty Object
can enable physics properties
cannot add particle emitter modifier
choice of visual representation
Force Field
object properties
transform
relations
collections
instancing
motion paths
visibility
viewport display
custom properties
add “effector”, ie “field”
add “empty”
choices at add time
type
radius
align
location x,y,z
rotation x,y,z
types
empty, type of visual representation
force field, aka field, aka effector, type of force
Subassembly Organization
How to group multiple objects into a subassembly:
Collection
There are two ways to use a collection.
Use it to organize the hierarchy in the outliner.
Use it as a class that can be instantiated multiple times.
You can hide/unhide the whole collection with one click.
But you cannot move/rotate/animate the collection as a unit.
Collection Instance
Every collection can be instantiated.
The instance appears as a single line in the outliner, and is treated as a single object.
How to:
Build a collection someplace - separate file, separate scene, separate hidden area of outliner.
Add an instance of that class to your project.
Not recommended: Object-Apply-Make Instances Real. This copies all the component objects flatly,
not organized.
Parent
How to:
Select two or more objects in the outliner.
One of the objects will be “selected”, the others merely highlighted.
Object-Parent-Object. Makes selected object the parent; moves the others under it in the outliner.
Recommended: Add empty object to be the parent.
You can move/rotate/animate the group as a unit.
But you still have to hide/unhide components individually.
Boolean Un1on
Use for sculpting a single component.
NOT appropriate for a subassembly.
How to:
select object to modify.
Wrench - Add Modifier - Boolean - Un1on
second object: a copy of this is merged into the selected object
hide the second object to see the results
Apply - this makes the modification permanent.
The selected object is modified. Its mesh is altered.
The second object is unaffected and may now be deleted.
Comparison
| Parent | Collection | Instance |
Can be undone | Yes | Yes | Yes |
Show hierarchy of components in outliner | Yes | Yes | No |
Hide/Unhide whole group with one click | No | Yes | Yes |
Move/rotate/animate whole group as a unit | Yes | No | Yes |
Copy/paste as a unit | No | No | Yes |
Usage recommendations:
For a unique, one-off subassembly, use an empty parent within a collection. Use the collection to hide/unhide; use the empty parent to move/rotate/animate.
For a subassembly replicated multiple times, build a collection as a class, kept in a normally hidden collection of the outliner hierarchy, and add multiple instances into the final assembly.
For a component that will be 3D printed, keep it a separate simple object without modifiers or materials, so that it can be exported to a separate .STL file.
Video Sequence Editing
Solve problems with audio-video sync.
In this video, Mikeycal Myers explains importing videos from a smart phone.
Changing the fps from variable to constant 24 using Handbrake.
If there is an extra frame on the audio track, use Hold-Offset-End property to bring it back.
scroll and zoom video sequencer (squeeze height of channels)
set user preferences input to emulate middle mouse button, using alt by default.
alt left drag to scroll sequencer up, down, right, left
ctrl alt left drag to zoom sequencer up, down (height), right, left (width)
Timeline
mousewheel: zoom in and out horizontally
shft-mousewheel: pan timeline up and down
ctrl-mousewheel: pan timeline left and right
MMB drag: pan timeline left, right, up, down
ctrl-MMB drag: zoom timeline, horizontal and vertical
Playhead
alt-mousewheel: move (scrub) playhead forward and back
VCR controls: jump to start, jump to end, play forward, play backward, pause
- move strips around the timeline
select strips, hover mouse over timeline window, click g to grab, click x or y to constrain, drag with mouse
- keep video and audio together
select both and click ctrl-G to make a metastrip
click tab to toggle into and out of metastrip view
click shft-L to lock a strip. shft-alt-L to unlock
From camera to Blender?
Shoot video with camera phone.
Copy to video work folder, using SSHelper and SCP.
scp -r -P 2222 '192.168.1.100:/storage/emulated/0/DCIM/Camera/VID*.mp4' .
Open each video clip in Handbrake.:
Change the output folder.
Goto video tab and change settings
Framerate: 24
Constant Framerate
Start, save.
In Blender, drag clip to timeline.
Compare audio to video. If audio length is one frame longer:
Click on the audio track
goto property panel
click the Time dropdown
property Hold Offset End, increase from 0 to 1
The two tracks should now match
set end, three ways:
Timeline, View, Range, Set Frame Range to Strips
set explicitly to 10000
position blue line at one frame before the end, and click Ctrl-End
repeat above steps for each clip
crop each clip
position the playhead, select the tracks, click k to cut
select the unwanted pieces and click delete (Yes)
select the strips to move, click G to grab, then X to constrain to X axis
drag the strips to the right until the border turns red, then click to drop into next frame
Green Screen
YouTube: Ryan King Art: How to Green Screen with Blender
YouTube: CG Cookie: Learn Green Screen Basics with Blender
make two blender files, one with Video Editing, one with Compositor
Framing the talking head.
Divide the screen into thirds.
Eyes should be just above the top horizontal line.
Leave two fingers of space above the head.
Shoot with horizontal center.
Later when editing with background graphics, if you shift the head to the left,
center the head on the left vertical line.
Keep camera at eye level.
Keep head 20 cm in front of the green screen to minimize shadows around the head.
Use handbrake to sync audio and video framerates.
Framerate 24
Constant Framerate
To: project folder
Optional, specify range for a sample file.
Start
Make blender project to filter green screen.
New General Compositing.
Check Use Nodes.
Delete the Render Layers node. Keep the Composite Node.
Shft-A to add a node, Input - Movie Clip. Open: select the handbrake output.
Add node, Output - Viewer.
Draw a line connecting Movie Clip Image to Viewer Image.
Click Backdrop to see Viewer Image in compositor window behind the nodes.
Add node, Matte - Keying.
Drop it onto the line between Movie Clip and Viewer.
Choose Key Color with eye dropper.
Draw a line from Keying Image to Composite Image.
Render the Composite Node.
New Blender project for VSE.
Find output frames folder rendered in previous step.
Pan and zoom head using Effect Strip, Transform, and Keyframes
https://www.youtube.com/watch?v=hFVPXTO7px8
Fade in
Select a strip
position counter to first frame
in properties panel: Adjust - Compositing
change opacity to 0
with cursor over the value, click i to create a keyframe
reposition counter to frame 24
change opacity to 1 and make keyframe
do the same for Adjust - Sound - Volume
use a Graph Editor window to edit the keyframes
keyframe color codes
gray: normal
yellow: on a keyframe
green: between keyframes
right-click on any value in the property panel to bring up the keyframes context menu
Presentation Slides
Make presentation slide show in LibreOffice Impress or Google Slides.
Export as PDF.
Use ImageMagick to convert pdf to multiple PNGs.
convert
First time, ease policy restrictions in ImageMagick.
Edit the file in etc named ImageMagick-6/policy.xml
Comment out the line containing “PDF”
Audio Voiceover Enhancement
mp4 - original shoot from camera phones, with variable framerate
m4v - from Handbrake, with constant framerate of 24 fps
mkv - clips captured in OBS Studio
mp3 - audio track separated out by Blender Mixdown, input and output to Audacity
jpg, jpeg - stills, no alpha channel
png - stills with alpha channel possible
frames/*.png - individual frames rendered by Blender compositor render after green screen filtering
odt - script document from LibreOffice Writer
odp - slideshow presentation from LibreOffice Impress
slides/*.png - individual frames from slideshow, output by ImageMagick from PDF
Video Editing Setup
Preferences
Interface
Python Tooltips: checked
Resolution Scale: 1.30
Remove File Browser
Two Video Sequencers
one in sequencer view
one in preview view
Properties
Dimensions - Resolution: 1920 x 1080
Dimensions - Frame Rate: 24
Output - destination folder name
Output - File Format: PNG or FFmpeg
Output - Encoding - Video: H.264, medium quality, good speed
Output - Encoding - Audio: MP3 for youtube, AAC for mac/iphone
Color Management - View Transform: Standard (Filmic for 3D model rendering)
Timeline
YouTube: Ryan Art King: Video Editing with Blender! Part 1
All Together
Combine 3D Model, Python, Timeline, Sequencer.
In the Layout editor, choose a camera view.
In the Scene menu, do a Full Copy to create a second scene.
(You cannot add the current scene to the Sequencer.
You can only add other non-current scenes.)
In the Sequencer, Add - Scene - select the scene.
YouTube: Adding 3d scene into video sequencer
Animate drawing on a video
You are working in the video sequencer, but
the drawing animation must be done in the modeling view.
Therefore three steps are required.
In the video sequencer:
Select your desired section of video.
Render an image sequence of that section.
In the modeling view:
Add the image sequence from step 1 into the layout or modeling view.
Draw over the video. There are at least two ways to do the drawing.
the grease pencil
the bezier curve
cannot draw by hand, must manipulate the curve
can be animated automatically from one end of the curve to the other
Render the animation as a movie.
Back in the video sequencer:
Install, Config, Setup
Today is 10 Oct 2021.
My current blender version is 2.82.
sudo apt search blender returns blender 2.82
blender.org says the latest version is 2.93
If I want to move to 2.93,
I think I have to uninstall my current version
and then install the new version by downloading from blender.org.
The user's linux config folder contains these files:
In the github sandbox project, folder blender, find these example blend files:
proto.blend - start with this for video editing per Ryan King video
magetic.blend - demo particle system
curtis_holt.blend - companion to video Python Crash Course for Blender
donut.blend - companion to 3D modeling tutorial by Blender Guru
Directory structure for a blender project folder: