Skip to content

Instantly share code, notes, and snippets.

@bigsylvain
Last active August 29, 2015 14:00
Show Gist options
  • Save bigsylvain/43cb10890dfbc7d358d2 to your computer and use it in GitHub Desktop.
Save bigsylvain/43cb10890dfbc7d358d2 to your computer and use it in GitHub Desktop.
Blender Tutorial - Generating Pine Trees

Someone asked me after my Post-Mortem article on Ludum Dare how I achieved this effect: screenshot-LD29

So here is a quick tutorial using Blender 2.69.

  • Open up the default file with a cube in the middle. Edit the cube using "Tab". From the top view ("7" on the num pad), add a cylinder ("Shift+A -> Cylinder"), and in the menu (which is on the left by default) there is an option for vertices, I chose 7 for having a nice low-poly mesh (an even number is less nice, you can test it by yourself). 1

  • Press "A" to deselect all, then move the mouse over a vertex of the cube, and press "L" and "Del- > Vertices", since we don't want that ugly cube.

  • Press "1" on the num pad to go to the side view, and make sure you're in orthogonal view (press "5" until you can see the grid in the background). Press "Z" for wire shading, "B" to select all the top vertices with the mouse (left click-drag). Then "E" to extrude, but don't move it anywhere, just press "right-click". Then "S" to resize it a little bigger. 2

  • Then repeat the operation "Extrude->Move->Resize if needed" to obtain different layers. (Reminder: "G" to move things around, and "G+Z" to move things only in the Z direction). 3

  • For the last step (third in my case), I merge the top vertices "Alt+M -> At center". 4

So now the basic mesh is done. You can rename it to "tree" here.

  • Now go to the material tab. Rename the default material to "Green pine", and change the color to the green you want. 5

  • Press the small "+" sign next to the list of materials, then on "New". Change the name to "Brown pine" and select the color you want. 6

  • You should be seeing the tree without colors since it is in wireframe shading. So press "Z" to go back to Solid Shading. The pine should be green.

  • Click on the selection by faces, 7

  • "Z" again, and with "B" select all the faces from the trunk. Then in the material Panel, click "Assign" 8

  • You can verify the colors by pressing "Z" again.

  • The Pine tree is almost finished, we want it's base to be centered near the reference dot of the object.

  • Still in Edit mode, select the wireframe shading ("Z"), select all ("A"), then glide it a little up ("G+Z") 9

  • The Pine tree is finished, press "Tab" to switch to object mode.

It's time to create the ground.

  • "A" to deselect all. "7" to go to top view. "Shift+A -> Mesh -> Plane" to add a plane. "S 10" to resize it.

  • Switch to edit mode ("Tab"), select all "A", and subdivide ("W -> subdivide").

  • In the left menu, select the number of cuts, and the amount of fractal. 10

  • Repeat the subdivision operation once or twice.

  • Switch back to object mode ("Tab"), press "5" and move the view with the middle button. 11

  • Go to the material tab.

  • Create an appropriate material (color, name...) 12

Now comes the magic!

  • Go to the particle tab
  • Add a particle system
  • In the "Emission" section, set the number to 15, the start to 1, end to 1
  • In the "Velocity" section, set the "Normal" to 0.
  • In the "Physics" section, press "No", and set the size to 1
  • In the "Render" section, select Object, and your tree. 13
  • You can play with the size and random size to fit what you want.
  • In the velocity tab, you can change the "Tangent" velocity if you want the trees to be following the normal directions of the ground.

In the World tab, select "Ambient occlusion" and "Environment Lighting". 14

Right-Click on your camera, and glide it ("G") to a good location. Press Num Pad "0" to go in the camera view. You can adjust the direction of the camera with "Shift+F". 15

Now Render using F12. 16

To have better looking results, go for smaller Pine Trees, add more. Select also "Smooth shading" for the ground. You can also add some clouds textures to the ground with a slightly darker green or brown. 17

Also, set your lamp to "Sun" and give it a yellow color, this will give some life to the scene!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment