Franklin's Blog


  • Home

  • About

  • Tags

  • Categories

  • Archives

  • Search

Blender Learning Notes

Posted on 2018-01-31 | In Media

Ref: Blender Essential Training

The Blender Interface

Navigating in 3D space

Function ShortCut Keys
Orbit Camera Middle mouse click and drag
Toggle Zoom Ctrl + Middle mouse click and drag
Toggle Pan Shift + Middle mouse click and drag
View All/Center Cursor Shift + C
View orthographic Numpad 5
Front View Numpad 1
Right View Numpad 3
Top View Numpad 7
Camera View Numpad 0
Toggle Right Numpad 6
Toggle Left Numpad 4
Toggle Up Numpad 8
Toggle Down Numpad 2
Toggle Quad View Ctrl + Alt + Q

Configuring user preferences

File -> User Preferences

System -> Compute Device: Change it based on your hardware

For laptop or you have no numpad, check Input -> Eumlate Numpad

Selecting and Translating Objects

Selecting objects

Function ShortCut Keys
Select Model Right click
Select/Deselect All Press A key
Border Select Press B and drag
Circle Select Press C and drag, use mouse wheel to adjust radius
Lasso Select Ctrl + Click and drag
Inverse Select Ctrl + I
Select Pattern Bottom Menu -> Select -> Select Pattern

Moving objects

Constrain to x/y/z axis when moving: press X/Y/Z key or using Gizmo

Also we can change view to constrain to a specific axis, e.g. In Top View, constrain to z axis

Rotating objects

Function ShortCut Keys
Rotate Press R key
or using Gizmo: Bottom Menu -> Rotate manipulator
Constrain to x/y/z axis when rotating Press X/Y/Z key

Scaling objects

Function ShortCut Keys
Scale Press S key
or using Gizmo: Bottom Menu -> Scale manipulator
Constrain to x/y/z axis when scaling Press X/Y/Z key

Understanding transform oritentation

Oritentation Meaning
Global The default
Local Aligns to the current slected model
Gimbal Working with bones and that sort of thing
Normal Aligns to the normal directiong of the surface. Mesh Modeling
View Move things square to the camera

Changing an object’s origin

Bottom Menu -> Object -> Transform

  • Geometry to Origin
  • Origin to Geometry: Centers to the object, exact center
  • Origin to 3D Cursor

Selecting pivot point

Bottom Menu -> Pivot Point

Way Meaning
Bounding Box Center Rotate all objects around the center of all objects
3D Cursor Rotate around the 3D cursor
Individual Origins Rotate each object around its individual center point or origin point
Median Point Like Bounding Box Center, but a little more sophisticated than that
Active Element Rotate around the last object that you’ve selected.

Using Snap to move objects precisely

Enable Snap by clicking Magnet icon on the bottom menu

The additional options:

  • Volume
  • Face
  • Edge
  • Vertex
  • Increment

Modeling

Creating mesh primitives

Function ShortCut Keys
Toggle Edit mode Press Tab key
Delete Selected Press Delete key
Add Mesh Menu Shift + A

Selecting verticles, edges, and faces

Change select mode: Toggle Edit Mode -> Choose Vertex/Edge/Face select

Function ShortCut Keys
Toggle select mode Ctrl + Tab

A/B/C/Lasso Select is the same as the one in Object mode

Editing mesh objects

Function ShortCut Keys
Toggle Wireframe/Shaded mode Press Z key
X-ray mode Ture on “limit selection to visible“ (On the right side of Vertex/Edge/Face select)
Select More Ctrl + “Numpad +“
Select Less Ctrl + “Numpad -“
Select the whole ring edge Win: Alt + Right Click
Mac: Opt + Right Click

Mesh Tools -> Shrink/Fatten

Proportional editing

Mesh menu -> Proportional Editing -> Enable/Conneted

Function ShortCut Keys
Toggle Proportional Editing Press O key
Grab Press G key
Confirm Edit Click
Cancel Edit Right Click

Sculpt mode

Sculpt Mode -> Bottom Menu -> Brush -> Sculpt Tool

Sculpt Mode -> Bursh

Notice: Symmetry / Lock

Working with edges and edge loops

Mesh Tools -> Loop Cut and Slide

Function ShortCut Keys
Concatenate to the broken edges Win: Shift + Alt + Right Click
Mac: Shift + Opt + Right Click

Extrusions

Mesh Tools -> Extrude Region

Mesh Tools -> Extrude Individual

Smooth shading objects

Object Mode -> Object Tools -> Shading: Smooth/Flat
Edit Mode -> Select Faces/Edges/Vertices -> Shadding/UVs Panel(Tab on the left panel)-> Shading

Subdividing meshes

Edit Mode -> Tools(Tab on the left panel) -> Mesh Tools -> Subdivide

Advanced Modeling

Working with modifiers

Select model -> Right menu bar -> Modifiers

Working with subdivision surfaces

Select model -> Right menu bar -> Modifiers -> Subdivision Surface

Subdivision Surface

Creating a simple creature

Practise

Symmetrical modeling with the Mirror modifier

Select model -> Right menu bar -> Modifiers -> Mirror

Mirror modifier

Joining mesh objects

Function ShortCut Keys
Join objects Ctrl + J

Stitching vertices

Using Snap(Magnet) to stitch vertices:

Function ShortCut Keys
Toggle Vertics Mesh Menu Ctrl + V
Toggle Edges Mesh Menu Ctrl + E
Toggle Faces Mesh Menu Ctrl + F

Vertics Mesh Menu -> Merge / Remove Doubles

Finalizing a simple creature

Sculpt Mode -> Brush -> Sculpt Tool -> Smooth

Creating text

Add Mesh -> Text

Text Properties:

Boolean tools

Select model -> Right menu bar -> Modifiers -> Boolean

Vertex groups

Select model -> Data Properties -> Vertex Groups

Function ShortCut Keys
Toggle Vertex Groups Menu Ctrl + G

Staying Organized

Using the Outliner

Function ShortCut Keys
Expand Numpad +
Collapse Numpad -
Show Hidden Object Alt + H
Hide Selected Object H
Hide Unselected Object Shift + H

Using layers

Function ShortCut Keys
Move to Layer M

Creating groups

Function ShortCut Keys
Create new group Ctrl + G
Select grouped objects Shift + G

Working with scenes

Function ShortCut Keys
Render scene F12

Creating hierarchies

Function ShortCut Keys
Make parent
(The last selected one)
Ctrl + P

Applying Materials

Assigning materials to objects

Diffuse shaders

  • Lambert
  • Oren-Nayar
  • Toon
  • Minnaert
  • Fresnel

Working with specularity

  • CookTorr
  • Phong
  • Blinn
  • Toon
  • Wardlso

Using the Ramp Shader options

Ramps are basically a gradation of both color and transparency that can really transform the way that your materals look.

Additional shading options

Shading docs

Creating reflections

Adding transparency and refractions

Subsurface scattering

次表面散射 Subsurface Scattering docs

Adding Textures

Adding a simple texture

Using bitmaps

Image or Movie Type

Image Mapping -> UV

UV Editing:

Please notice that a material can have multiple textures

Mapping textures in the UV Editor

Mesh menu -> Edges -> Mark Seam

Mesh menu -> UV Unwrap -> Unwrap:

Using UV projections

Function ShortCut Keys
Move projection Island mode, right click

Or Press G
Scale projection S

UV mapping a character

Practise

Projected mapping is view dependent

Fine-tuning UV mapping

Creating Bump and Normal maps

Texture -> Infulence -> Geometry

With bump mapping, just remember that the light colors are what’s creating the bumps. Dark colors create no bumps.

Displacement mapping

Texture -> Infulence -> Displace

Bump mapping is a surface effect; It does not change the underlying geomerty. Displacement mapping, however, does, although you do need enough geometry to displace. With Subdivision surfaces Modifier’s help, we can easily add more geometry without too much overload.

Using the node editor

Allow us to connect multiple textures together into a network of nodes that create more complex textures.

Working with Light

Adding lamps to a scene

Fine-tuning ray-trace shadows

Ray Shadow

Using spot lamps

Fine-tuning buffer shadows

Buffer shadows are based on a bitmap, which means they render faster, particularly for soft shadows.

Using Hemi lamps

No position for source, just control the direction

Working with Area lamps

From a specific region, rather than a point or a source.

Creating sky and ambient light

World panel

Adding background images

Texture -> Image -> Influence

Creating sunlight

Basically works the same as the Hemi lamp, in that it is directional and not positional. On of differences between them, the Sun lamp can do shadows.

Ambient occlusion

环境光遮蔽

Ambient occlusion creates an overall ambient lighting, and we have two forms: we have ambient occlusion, which is just a simple color or if we want to have more complex lighting, w can use Environment Lighting.

Cameras and Rendering

Working with cameras

Creating camera targets with constraints

Constraints -> Add Object Constraints -> Damped Track

Add empty object(Object Mode, Add -> Empty -> Plain Axes) as target obj:

Render properties

  • Display
  • Dimensions
  • Anti-Aliasing
  • Shading
  • Performance
  • Output

Rendering animation

Function ShortCut Keys
Render Animation Ctrl + F12

Adding motion blur

Creating depth of field

Camera-focus effect

+

Defocus filter Node

F-stop: lower, the more depth of field we get
Threshold: The width of focal area

Basic Animation

Understanding the Timeline

Function ShortCut Keys
Zoom Timeline Scroll Middle Mouse Button
Ctrl + Middle Mouse Button + Drag
Pan Timeline Shift(Optional) + Middle Mouse Button + Drag

Animating objects

Function ShortCut Keys
Insert keyframes Hover over the property and Press i key

Animating properties

Editing animation in the Graph Editor

Function ShortCut Keys
Interpolation mode Press T key in Graph Editor

Using the Dope Sheet

动画摄影表

Function ShortCut Keys
Mode keyframe Right click and drag

Path animation

Add -> Curve -> Path

Constraint -> Clamp to

Character Rigging

Facial animation using shape keys

Add shape key and edit model in the Editor mode

Understanding armatures

Pose Mode: For animation
Edit Mode: Edit bones

Fitting an armature to a creature

Function ShortCut Keys
Rename Bones Ctrl + Click
Extrude Bone’s model Press E key

Deforming a character with an armature

Function ShortCut Keys
Rename Bones Select Mesh and then select armature, Ctrl + P

Pose Mode, Solid mode & X-Ray(Display), rotate the bone

Lock down some properties in Transform panel as you wish

Setting up inverse kinematics

Pose Mode -> Bone Constraints -> Inverse Kinematics:

Docs

Controlling the hips and body

Add a circle curve as parent of bones

Animating in Pose mode

Insert Keyframes

Creating a test animation

Keyframes + Shape keys

Rendering in Cycles

Interactive rendering in cycles

Cycles Render


Render settings for cycles

  • Render
  • Dimensions
  • Metadata
  • Output
  • Sampling
  • Light Paths
  • Performance

Create basic materials in cycles

Using the Node Editor to refine materials

Mix Shader

Working with image maps

Create bumps and deplacemenets

Material -> Displacement -> Voronoi Texture (泰森多边形材质)

Use Bright/Contrast node to adjust contrast

Create lights in cycles

Working wih ambient occlusion in cycles

Create object-based lighting in cycles

Emission Surface in material

Image-based lighting in cycles

hdr image

Using environment lighting in cycles

World -> Surface: Background -> Color: Environment Texture

Lighting a scene in cycles

Instead of using Background shader on surface, use Bright/Contrast shader with Environment Texture

Compression & Decompression on Linux

Posted on 2018-01-30 | In Deploy

Ref: https://askubuntu.com/a/660865

sudo apt-get install zip gzip tar

first (or by a graphical pkg-manager).

Then, for an entry it would be the easiest way to use zip/unzip:

zip -r my_arch.zip my_folder

where -r means “recursive”.

To unzip you simply use

unzip my_arch.zip

Zip stores relative path names by default. There are several parameter-options available for zip. For that read: the manual (man zip). For a starting this will do.

Most often you will see .tar.gz endings in linux-world. That’s the product of two tools: TAR (the tape archiver) and GZIP (the GNU-Zip). Tar has got the call option to automatically gzip/gunzip files after “taring”.

tar -cvzf may_arch.tar.gz my_folder

where

  • -c means “create”
  • -v means “verbose” (sometimes bothersome and slowing down…)
  • -z means “use (GNU)zip”
  • -f XYZ declares the name of the output file. (You should chose a helping name like XYZ.tar.gz)
    There may also be .tar.bz2 endings. This is the product of the -j parameter instead of the -z parameter: you will choose compression with BZIP2 (-> man bzip2).

To extract you simply use -x (eXtract) instead of -c (Create):

tar -xvzf may_arch.tar.gz

Hexo Installation in Ubuntu 14.04

Posted on 2018-01-30 | In Deploy

Preparation

sudo apt-get update && sudo apt-get upgrade

Git

sudo apt-get install git

ssh-keygen -C 'your email address' -t rsa
vi ~/.ssh/id_rsa.pub

git config --global user.name "yourName"
git config --global user.email "email@example.com"

Copy & Paste all strings in here: https://github.com/settings/keys

Node.js

sudo apt-get install nodejs
  • Adding the NodeSource APT repository for Debian-based distributions repository AND the PGP key for verifying packages*

    curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
    
  • Install Node.js from the Debian-based distributions repository*

    sudo apt-get install -y nodejs
    
    node -v
    

If you get node: No such file or directory exception, please execute: sudo ln -s /usr/bin/nodejs /usr/bin/node

sudo apt-get install npm

Hexo

sudo npm install hexo-cli -g

[Optional]

sudo npm install hexo-server -g

sudo npm install -g hexo

npm install -- save-dev hexo-util

Init Hexo Blog

hexo init hexo_blog
cd hexo_blog

Generate static pages

hexo clean
hexo g

If you see ERROR Local hexo not found exception:

  1. Ensure the nodejs version
  2. Try to remove the node_modules/ directory and reinstall it, so run: rm -rf node_modules/ && npm install

Run Hexo

hexo s

Open web browser, type http://<IP address>:4000

Theme - Next

hexo clean
git clone https://github.com/theme-next/hexo-theme-next themes/next

Change theme property in _config.yml:

1
2
3
4
# Extensions
## Plugins: https://hexo.io/plugins/
## Themes: https://hexo.io/themes/
theme: next

Type:

hexo g
hexo s

Setup theme

In hexo_blog/themes/<theme name>/_config.yml

Scaffolds & Source Folder

Ensure the following folders have been created under: hexo_blog/source

  • _drafts
  • _posts
  • about
  • categories
  • tags

Create template under hexo_blog/scaffolds

  • draft.md
  • page.md
  • post.md

Config draft

In _config.yml

1
2
3
4
# Writing
new_post_name: :title.md # File name of new posts
default_layout: draft
titlecase: false # Transform title into titlecase

hexo new first-post

You should see the following output:

1
2
Output
INFO Created: ~/hexo_blog/source/_drafts/first-post.md

Open the new post for editing.

vi ~/hexo_blog/source/_drafts/first-post.md

Next, publish the post so it will be accessible by visitors.

hexo publish first-post

This results in:

1
2
Output
INFO Published: ~/hexo_blog/source/_posts/first-post.md

Setting Up Git Deployment

In _config.yml

1
2
3
4
deploy:
type: git
repo: <repository url>
branch: [branch]

Install hexo-deployer-git, under the hexo blog folder:

npm install hexo-deployer-git --save

Deploy

hexo g && hexo deploy

Init Git & Connect to remoting repository

cd ~/hexo_blog/source
git init

# Set a new remote
git remote add origin git@github.com:username/repository.git

# Verify new remote
git remote -v

#Set default branch to master
git config branch.master.remote origin
git config branch.master.merge refs/heads/master

git config --global user.name "yourName"
git config --global user.email "email@example.com"

Auto start Hexo

Create shell script:

vi ~/scripts/autohexo.sh
1
2
3
#!/bin/sh
cd /home/<username>/hexo_blog/
hexo s &

Add the command in the /etc/rc.local script that is executed at the end of startup

sudo vi /etc/rc.local

Add the following command before exit 0

1
2
iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to 4000
sudo ~/scripts/autohexo.sh

1234

Franklin Chen

Little drops of water make an ocean

10 posts
3 categories
23 tags
© 2021 Franklin Chen