440 likes | 567 Views
SE 313 – Computer Graphics. Lecture 10: More Modeling and Texturing Lecturer: Gazihan Alankuş. Quiz. Turn off monitors Take out a piece of paper and a pen/pencil 5 minutes. Today’s Goal. Learn about more modeling and texturing techniques. Modeling a truck.
E N D
SE 313 – Computer Graphics Lecture 10: More Modeling and Texturing Lecturer: GazihanAlankuş
Quiz • Turn off monitors • Take out a piece of paper and a pen/pencil • 5 minutes
Today’s Goal • Learn about more modeling and texturing techniques
Modeling a truck • The initial cube has material on it, remove it and add a new cube
Modeling a truck • Press tab to go to edit mode. Hit A to select all. • Press subdivide to add more vertices and edges
Modeling a truck • Select faces in the front (multi-select with shift) and do “extrude region” • If you do “extrude individual” they would be two separate pieces
Modeling a truck • Select and move around edges and faces to make it look more like a truck • Feel free to play with other mesh tools to make it better-looking
Preparing for texturing • While it’s simple, we’re happy with our model. Now let’s prepare it to be textured. You have to do these steps to put textures on your models.
Preparing for texturing • First we need to unwrap our model. This maps the 3D model to 2D. Since images are 2D, this will help us cover the model with parts of an image. This is called texturing. • Earlier in the semester we saw that we can mark seams in our model to unwrap it nicely. • Now we will take a more practical approach and use automatic unwrapping
Preparing for texturing • While in edit mode, select all by pressing A and making everything orange. • Click on unwrap to bring up its menu • Beside “Unwrap” there are many other options. Select Smart UV Project.
Preparing for texturing • To see things better, on top of the screen click on the layout button and select UV editing. This will open the image editor on the left. • There we see where the selected faces are mapped. Since we selected all, we see them all.
Preparing for texturing • While the unwrapped model is a bit discontinuous, we do not care. We will draw on the model itself and will not care how they are located in the 2D image.
Preparing for texturing • Now add an image. You can choose to initialize it with the UV test grid to understand which parts of the image is mapped to which parts of the model. • Name the image well. “truck texture” is what I wrote.
Preparing for texturing • Scroll out and you will see your image initialized to the UV test image • Under the 3D view on the right, select “texture” to see the texture on the model
Preparing for texturing • Go back to the default layout to have more screen area for setting up the material. • Even though we are seeing the texture on our truck, we have to also set the texture as a material on the truck for it to work
Preparing for texturing • On the properties pane, go to the material tab • Add a new material if there isn’t already one there
Preparing for texturing • Now go to the textures tab and add a texture to this material if there isn’t one already
Preparing for texturing • Set the type of the texture to “Image or Movie” • Scroll down and browse for the image that we created earlier
Preparing for texturing • Congratulations, you have successfully added the texture to the model. Here are the things you can do to verify that you have done everything correctly: • Render and see the texture on the model • Select texture in viewport shading and see the texture in the 3d view
Preparing for texturing • Next we will start painting the texture. Before that, we will save the texture image. An early reminder: don’t forget to save the image every time after you paint. File->Save’ing the .blend file is not enough.
Texture painting • Now go to the UV Editing layout and change the view on the right to “texture paint” • You will see options about brushes etc. appear
Texture painting • Click on the 3D model to start painting. It’s that easy! • You will see the 2D image on the right will be painted automatically
Texture painting • You can just keep painting and not worry about which parts of the image will be painted
Texture painting • You can increase the strength of the brush and make its curve straight in order to draw sharp edges. • You can also change its color and make the brush radius smaller.
Texture painting • While it’s much easier than drawing on the unwrapped 2D image, painting in 3D is still not very easy for a non-artist
Painting from existing images • It’s easier if we find pictures of things and use them on parts of our models • Texture mapping photographs directly does not work well • We will use BProjection to copy parts of photos as textures • http://wiki.blender.org/index.php/Extensions:2.6/Py/Scripts/3D_interaction/bprojection
Painting from existing images • Download it from the link there, save it anywhere • https://svn.blender.org/svnroot/bf-extensions/contrib/py/scripts/addons/space_view3d_paint_bprojection.py • This is a Blender add-on. To introduce it to blender, go to File->User preferences
Painting from existing images • Go to the “addons” tab • Click on “Install Addon…” • Find it in your hard drive and double click • Select “paint” on the left
Painting from existing images • Enable Bprojection • If you don’t want to repeat this, press “Save As Default”
Painting from existing images • Click on the plus to the right of the 3D view. This will open the properties pane. • While still in texture paint mode, scroll down in the properties pane and click on the “Add Bprojection plane”
Painting from existing images • This has created a plane that is hidden behind our model. Use its location, rotation and scale to place it in a convenient location.
Painting from existing images • Click “open” to place an image on this plane. Use the images of ice cream trucks provided with this presentation. Click “apply image” to see the image on the plane.
Painting from existing images • Look at the model from the appropriate direction, touch the location of the plane and see it turn towards you.
Painting from existing images • Now we will select the clone brush tool from the left. This will help us use the photograph of the truck.
Painting from existing images • Ctrl+click on a location in the photograph. This will bring the cursor there.
Painting from existing images • Now, when you drag your mouse on the model, it will start to copy from where the cursor is on the photograph and its surroundings. Don’t forget to select a brush that is large enough.
Painting from existing images • You can also ctrl-click on the truck itself to use the colors already on the model • Use other pictures for other parts of the model • Remove the BProjection plane when you’re done
Painting from existing images • You can create much better textured models than this
Boolean operations • We can add cylinders as wheels
Boolean operations • To do this, select the truck in object mode, go to the modifiers tab on the right and add a boolean modifier
Boolean operations • Change the operation to “union” and select the cylinder as the target object
Boolean operations • Press apply to apply this operation. • You will see the texture break… This is because our model has changed drastically and you will have to re-unwrap the model and re-paint the texture.
Boolean operations • If you want, you can also subtract a larger cylinder first to create the tire holes
TODO: Homework 10 (deliverable) • Create a scary model with a scary texture • Implement the dolly-zoom technique to create an animation that amplifies the scariness of this model. The model should stay still while the surroundings change. • Carry out the necessary calculations about camera location, object location, field of view angle, etc. Apply them precisely in Blender. • Place objects in the background to stress this effect. • Submit the following • A .blend file • A rendered image of your scene • A video no larger than 1mb (use windows movie maker if necessary) • Details of your calculations in soft copy • Submit them to Erdem with an e-mail with such a subject: • SE 313 Homework 10 Ali Veli 201203021030