Difference between revisions of "Using plane textures for trees, people, etc.. in still rendering"

From Blender for Architecture
Jump to: navigation, search
(Create your tree in Blender)
(Make your tree face the camera)
Line 55: Line 55:
 
Select you tree object, go to Object panel (F4) and and a "Locked Track" constraint. Fill the target object name with the camera name. Tick : To: "Z" and Lock: "Y". That's it !
 
Select you tree object, go to Object panel (F4) and and a "Locked Track" constraint. Fill the target object name with the camera name. Tick : To: "Z" and Lock: "Y". That's it !
  
''Interface Picture''
+
[[Image:tree scene-03.png|300px]]
  
 
You can now duplicate (ALt-D to duplicate link) your tree around the camera to create a forest :D.
 
You can now duplicate (ALt-D to duplicate link) your tree around the camera to create a forest :D.
  
''Interface Picture of the forest''
+
[[Image:tree scene-03b.png|300px]]
''Render picture of the forest''
+
 
 +
[[Image:tree scene-03c.jpg|300px]]
 +
 
 +
[[Media:tree scene-03.blend|Downlad the .blend source file]]

Revision as of 15:04, 30 October 2006

Working
 
Work in Progress.

Most of the time, pixel images are more suitable to represent people, cars, trees, etc... than 3D model. If these are not the main subject of your render, it often doesn't worth to model a precise 3D object. Moreover, it's very hard to make human or tree models realistics. In addition, they require a huge modelling which increase a lot rendering times and memory consumption.

So, there is a trick to use plane pixel images to fake 3D model in your render. In fact, we will use a cut out image and use it as texture on a plane facing the camera. The result will be the same as a postproduction in Gimp. The advantage to use this trick in Blender rather postprodction is less time consumption because wherever you move you camera, images will always face you, cast shadow on your 3D model and be cutted by a 3D foreground. However, if you use a tree picture shooted from an human height(~1.7m), you cannot use it to render a "from the sky view" of your model.

Prepare your texture

This is quite a hardwork here. You could find on the web libraries of these cut out pictures of trees and people to skip this part.

Otherwise, take a digicam and shot around you. Prefer to zoom max to avoid perspective effect. Especially for people, make sure feet are horizontal on pictures. Cut out the subject in your favorite image software (Gimp, Photoshop). The best technique is to use masks to have blurred transition between plains and holes. Once it's done save your picture in PNG for example to keep and alpha layer.

Lime.png

Tree cut out picture in PNG

Create your tree in Blender

To make it easier, this a Blender start scene where your tree could grow in serenity. (A green grass plane with a sunlight and a blue sky :)

Tree scene-01.jpg

Blend file of the start scene

First, create a vertical plane object in the center of your grass plot.

Create a new material for this plane object in the shading panel (F5). Create a new texture for this material, choose "bitmap" as type and load your tree picture. Tick "UseAlpha" and the "Alpha" button near the preview to see transparency.

Tree scene-02.png

Go back to the material panel. Tick Ztransp, Shadeless, put Alpha slider to 0. Tick Alpha in the "Map To" tab. That's it for the material.

Tree scene-02b.png

Plane dimensions should be the same ratio as the texture size. For example if your texture is 500x1000px, your plane could be 2.5x5 blender unit. In our example, the texture size is 477x664px so : select the plane object, press "N" and set the dimensions as follow.

Tree scene-02c.png

This also means that our tree is 6.64 units tall. That's a bit small for that kind of tree. We can resize it by the pressing the "S" button and moving until we get 8 units tall. Ratio will be preserved ;-).

Move the plane until the base just reach the ground.

Start a render.

Tree scene-02d.jpg

Blend file of the scene

Tips: If you don't see the tree transparent shadow on the ground, tick the TraShadow button of the ground material (not the tree material).

Make your tree face the camera

This a good start, but imagine you have a lot of trees surrounding you camera. How to make all of them face it?

Select you tree object, go to Object panel (F4) and and a "Locked Track" constraint. Fill the target object name with the camera name. Tick : To: "Z" and Lock: "Y". That's it !

Tree scene-03.png

You can now duplicate (ALt-D to duplicate link) your tree around the camera to create a forest :D.

Tree scene-03b.png

Tree scene-03c.jpg

Downlad the .blend source file