se 313 computer graphics n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
SE 313 – Computer Graphics PowerPoint Presentation
Download Presentation
SE 313 – Computer Graphics

Loading in 2 Seconds...

play fullscreen
1 / 62

SE 313 – Computer Graphics - PowerPoint PPT Presentation


  • 73 Views
  • Uploaded on

SE 313 – Computer Graphics. Lecture 11: Projection Painting and Merging Textures Lecturer: Gazihan Alankuş. Quiz. Turn off monitors Take out a piece of paper and a pen/pencil 5 minutes. Texture painting with the clone tool. We have seen T exture painting on 3D objects

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'SE 313 – Computer Graphics' - zagiri


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
se 313 computer graphics

SE 313 – Computer Graphics

Lecture 11: Projection Painting and Merging Textures

Lecturer: GazihanAlankuş

slide2
Quiz
  • Turn off monitors
  • Take out a piece of paper and a pen/pencil
  • 5 minutes
texture painting with the clone tool
Texture painting with the clone tool
  • We have seen
    • Texture painting on 3D objects
    • Using Bprojection and the clone tool to use parts of images on our models.
  • Clone tool demonstrated in Gimp

Cursor

Start drag

Copies current location under cursor

Cursor mimics drag path

texture painting with the clone tool1
Texture painting with the clone tool
  • Great for using details in parts of images
  • Precise matching can be difficult to master
texturing in blender
Texturing in Blender
  • While Bprojectionand the clone tool are great for collecting parts of your texture from different images, getting the whole texture of a model from an image requires more precision
  • We will learn projection painting and merging textures for different points of view to create more precise textures
projection painting in blender
Projection Painting in Blender
  • The idea
    • Get photographs of the object from different angles
    • Paint them on the object as different textures
    • Merge them together
projection painting in blender1
Projection Painting in Blender
  • The idea
    • Get photographs of the object from different angles
    • Paint them on the object as different textures
    • Merge them together
getting the model ready for texturing
Getting the model ready for texturing
  • We will repeat what we did last week in the following slides (slides 10-26)
modeling a truck
Modeling a truck
  • The initial cube has material on it, remove it and add a new cube
modeling a truck1
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 truck2
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 truck3
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
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 texturing1
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 texturing2
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 texturing3
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 texturing4
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 texturing5
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 texturing6
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 texturing7
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 texturing8
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 texturing9
Preparing for texturing
  • Now go to the textures tab and add a texture to this material if there isn’t one already
preparing for texturing10
Preparing for texturing
  • Set the type of the texture to “Image or Movie”
  • Scroll down and browse for the image that we created earlier
  • Under mapping, select UV for Coordinates
preparing for texturing11
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 texturing12
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.
reviewing the model
Reviewing the model
  • Now our model is unwrapped nicely and has a simple texture on it
  • We can remove the light in the environment if some faces of our truck are black
    • But then when you render it will all be black
    • Here is how you can fix it:
projection painting in blender2
Projection Painting in Blender
  • The idea
    • Get photographs of the object from different angles
    • Paint them on the object as different textures
    • Merge them together
reviewing the model1
Reviewing the model
  • Go to the Object Data tab while the truck is selected
  • There you see a section called UV Maps
    • This is where the unwrapped UV coordinates are stored
    • We will have more than one of these for different angles.
  • Rename this to “Main UVMap”
adding a new uv map
Adding a new UV map
  • Add a new UV map by clicking the plus button
  • Rename it to Front
adding a new uv map1
Adding a new UV map
  • In the image editor, we still see the old UV map and the image. This is because we created an exact copy of it
  • To verify this, move one of the vertices in the image editor
  • Switch between Main UVMap and Front. You will see that you edited Front and not Main UVMap
using a photo as a texture image
Using a photo as a texture image
  • Now we want to load the front image for the truck and map it to the front of the truck.
  • Select Front from UV Maps
  • Open the image for the front
  • Now we want to place the vertices in the image editor such that they match the photo
using a photo as a texture image1
Using a photo as a texture image
  • In the 3D view, turn the view so that our truck is oriented the same way as the truck in the photo
  • Now select all, click Unwrap and Project from View
using a photo as a texture image2
Using a photo as a texture image
  • The vertices started really small. You will always have to resize and locate them by hand
  • Select all (“A”), press “S” on keyboard to start scaling
  • Press “G” to start moving, and “R” to start rotating if you need to
using a photo as a texture image3
Using a photo as a texture image
  • Now lets ignore the faces that we cannot see. In the 3D View, deselect all
  • Select the visible edges by clicking and dragging the mouse
  • In the image editor we will only have these visible
using a photo as a texture image4
Using a photo as a texture image
  • Now move around individual vertices in the image editor so that they match the photo
  • You don’t have to get everything. Don’t get any background inside the model.
  • You can view the result as you drag
using a photo as a texture image5
Using a photo as a texture image
  • While this was good for the front of the truck, the side is not so good.
  • We will get the side from another texture later. First, let’s get the back just like the front
using more photos
Using more photos
  • To get the back of the truck, we will create a new UV Map
  • Create a new UV Map and rename it to Back. Again, it duplicated the current UV Map.
  • Load the back image in the image editor.
  • We will need to do another unwrap for this
using more photos1
Using more photos
  • Turn the 3D view so that the back of our truck is in a similar orientation as the photo
  • In the 3D view, in edit mode, select all
  • Select Unwrap and Project From View
using more photos2
Using more photos
  • Again select all (A), scale (S), rotate (R), and move (G) the points.
  • Select only the visible faces of the truck and move individual points to match the photo
doing the sides from one photo
Doing the sides from one photo
  • Now for the sides of the truck, we want to create another UV Map
  • Load the side photo
  • Orient the truck and Unwrap, Project From View
  • Select only the visible faces and adjustthe UV coordinates
doing the other side from the same photo
Doing the other side from the same photo
  • Turn the other side of the truck. Orient it similarly to our photo.
  • Select only the faces on this side (deselect with “A” and select one by one)
  • Unwrap, Project From View again. This will not touch the other side that is not visible.
doing the other side from the same photo1
Doing the other side from the same photo
  • In the image editor select all (A) and mirror these vertices so that they look more like the photo
  • Adjust and match the photo
doing the other side from the same photo2
Doing the other side from the same photo
  • Now both sides of the truck are done in this UV Map
using multiple texture images
Using multiple texture images
  • Now we have three different UV Maps that all texture only parts of the model
projection painting in blender3
Projection Painting in Blender
  • The idea
    • Get photographs of the object from different angles
    • Paint them on the object as different textures
    • Merge them together
using multiple texture images1
Using multiple texture images
  • Problem is, we need only one texture.
    • Now we want to merge them into one single texture.
  • We will copy parts of each texture into the Main UVMap
merging textures
Merging textures
  • For this, we will again use texture painting and the clone brush tool.
  • Select the Main UVMap from UV Maps and switch to texture paint mode
  • On the left, select the clone brush
merging textures1
Merging textures
  • Similar to Bprojection, where we cloned visuals from a plane, now we will clone from the other UV maps that we cannot see.
    • We will not place a cursor, it will handle all that itself.
  • Scroll down to the Project Paint section. It should already be checked.
merging textures2
Merging textures
  • The Clone property here lets us clone from other UV maps
  • We will start by cloning the front of the truck from the “Front” UV map.
  • Check Clone and select the “Front” UV map that youcreated earlier.
  • Also, increase the strength of the brush
merging textures3
Merging textures
  • Now when you click and drag on the model, it will bring in parts of the Front UV map.
  • Paint the whole front like this
  • This way, we will bring in parts of the truck from different texturemappings
merging textures4
Merging textures
  • Select “Back” and start painting theback.
merging textures5
Merging textures
  • Select “Sides” and start painting the sides. Be careful not to paint over the front or the back. If you do,press Ctrl+Z to undo.
    • Tip: zoom in so that you can’t see other faces
  • Paint both sides
merging textures6
Merging textures
  • This looks better than what we did last week.
painting the rest
Painting the rest
  • However, the top and the bottom are not painted.
painting the rest1
Painting the rest
  • We can select a color and paint these, but it would be difficult to choose the correct color. You can get the value of the color in external programs like Gimp if you want and use that.
  • I will do something that’s more hacky.
painting the rest2
Painting the rest
  • Select the clone brush, Ctrl+click on the model where you have color that you want for the top of the model. The cursor will go there.
  • Now deselect Clone so that we don’t copy from other UV maps
  • Make your brush smaller and paint on top of the truck with very short strokes
painting the rest3
Painting the rest
  • Now that we got some color on top, get the cursor there with Ctrl+click and continue to paint from there
  • Let your strokes move away from the cursor. This will avoid messing it up.
painting the rest4
Painting the rest
  • Paint the bottom to black with the regular brush tool
finishing up
Finishing up
  • Now if you want, you can remove the “Front”, “Back” and “Sides” UV Maps but you don’t have to.
  • When you select “truck texture” in the image editor, you should see your truck unwrapped and textured nicely. Save it next to the blend file.
finishing up1
Finishing up
  • Now when you drag the model and the texture into Unity, you should see it textured fine.
no homework
No homework
  • Work on your projects!