Page 23 of 26

Re: Jennifer's Classroom

Posted: Thu Jun 19, 2008 8:48 am
by Jennifer_P
Just plain old tears of UV frustration, I'm afraid

Poor thing! What's your problem?

B2-B4
What was that Junee? My 1337 isn't so good. :)

It's almost scary how quick those little squares loose their squareness. :D *passes out napkins* ....
I much enjoy to play with those little squares, going from square to rectangle to polygon to rectangle and then .... where did the squares go? /scratchhead 8-)

Hehe, well, next we will explore ways to make those little squares stay square. ;)

Re: Jennifer's Classroom

Posted: Thu Jun 19, 2008 9:13 am
by Junee
Jennifer_P wrote:
B2-B4
What was that Junee? My 1337 isn't so good. :)

:lol: That's how you write chessmoves (for pawns). ;)

Why is this so hard? :(

Re: Jennifer's Classroom

Posted: Thu Jun 19, 2008 9:20 am
by Jojon
Jennifer_P wrote:
Just plain old tears of UV frustration, I'm afraid

Poor thing! What's your problem?


Just a general reflection on limitations and seam management for complex objects. :)

....but if you know of a way to properly map a rectangular texture area (four sides) onto a parallel trapeze (also four sides - great!...or so you'd think.), without a triangle splitting them and spoiling the broth by adding a fixed diagonal edge, I'd love to hear it. :)

(mapping concentric stuff with triangles, is easy enough as long as the perimeter is large enough to result in relatively little distortion, but the closer you get to the centre... argh. ['think I may just make some pre-warped textures for different diameters] :7)

*keeps a safe distance to the chess game - I'd only get "pawned"* :P

Re: Jennifer's Classroom

Posted: Mon Jun 23, 2008 4:21 pm
by Junee
Ok with no lessons I'm getting impatient and start little projects on my own. So what's the first thing you need? Maybe a desk!
Show Spoiler

Now I was pretty pleased with this (maybe because it only took me like ten minutes to make and it's still IKEA standard :P) but others would probably want more.. depth.. to it than just something grey. So I made a quickiesearch and found this pretty wooden thing. (Huge?) So this is where I begin to wonder if we really loose that much joy if the world was grey. ;) The texture looks fine on top of the desk and on the sides of the legs, well it looks good in the x direction really. (And for some strange reason the texture refuses to show in draw type so I am forced to move the camera and render it if I want to take a closer look *sigh*)
Show Spoiler

Now I wonder: how do you rotate it for the other sides while keeping the good parts? :D

Re: Jennifer's Classroom

Posted: Tue Jun 24, 2008 7:18 am
by Robert The Rebuilder
Junee wrote:Ok with no lessons I'm getting impatient and start little projects on my own.


Just curious, Junee: have you already performed the 10 existing lessons (listed here)?

Re: Jennifer's Classroom

Posted: Tue Jun 24, 2008 9:25 am
by Jojon
Junee wrote:Now I wonder: how do you rotate it for the other sides while keeping the good parts? :D


When you unwrap, only the currently selected faces will be affected, so you can select just the faces on the length-wise sides, for instance and then adjust the view so that you look at them head on, then unwrap "project from view" again - the top will remain as it were. Also, only the currently selected faces shows up in the UV/image editor, so you can easily select just one side and then adjust the mapping of it alone in the UV/image editor, without affecting the rest. (note, though, that if you do have any shared UV-map vertices, between to and sides, that you want to preserve, they will be moved apart, if you do. [They can, however, then be moved in blocks afterwards and rewelded, if so desired.])

Re: Jennifer's Classroom

Posted: Tue Jun 24, 2008 4:43 pm
by Junee
Robert: Yes, this is simply to see how far I can take things on my own. (Apparently I'm failing hard without a set of written instructions. :roll: :oops: )

Jojon: I think I got it! At first it went straight over my head, maybe because it's in the middle of the night, but now that I've fiddled around with it a bit it seems like I got the hang of it. YES! (Well the legs are still being annoying because I need the camera right, but it's just a bit more fiddling. :D)

(Edit: Guyah it doesn't show when I render it. :()

Re: Jennifer's Classroom

Posted: Wed Jun 25, 2008 12:17 am
by Jojon
Junee wrote:(Edit: Guyah it doesn't show when I render it. :()


The texture from the material is used when rendering and exporting prp files, but not in the real-time view. (The UV-map is used though, if the MapInput "UV" button is selected -- note that the map isn't associated with any picture in particular, it's just a mesh of interlinked coordinates, that can be overlaid onto any picture - in this case the material's texture.)

The texture that you select in the UV/image editor, while editing your UV-map, is what is show in the Real-time view (if set to textured ("potato") display mode), but is not used when rendering or exporting PRP files. (..unless the material's "TexFace" button is selected - it does just that; tells to use the real-time display source texture in renders.)

(When editing UV-maps in the UV/image editor, make sure to tick the "View->Update Automatically" menu entry in the UV/image editor pane -- this will make your edits show up in real time, in any view windows [i.e. while you're dragging stuff around, as opposed to not until after releasing the button].)

Re: Jennifer's Classroom

Posted: Fri Jun 27, 2008 3:43 am
by Jennifer_P
....but if you know of a way to properly map a rectangular texture area (four sides) onto a parallel trapeze (also four sides - great!...or so you'd think.), without a triangle splitting them and spoiling the broth by adding a fixed diagonal edge, I'd love to hear it. :)

Heh, well if you can't figure it out I doubt if I could, but if you send me the packed .blend file I'll give it a shot at least. :)
(When editing UV-maps in the UV/image editor, make sure to tick the "View->Update Automatically" menu entry in the UV/image editor pane -- this will make your edits show up in real time, in any view windows [i.e. while you're dragging stuff around, as opposed to not until after releasing the button].)

Wow, I wish I'd known this earlier. Great tip! :)

:lol: That's how you write chessmoves (for pawns). ;)

Oops! Well maybe that's a good puzzle idea. :D Your table looks nice, Junee; you've chosen a good texture. Have you tried the "Cylinder from View" unwrapping option for those table legs?


Lesson 11
Note: this tutorial works for Blender 2.45; it will need to be updated to work for version 2.46.
Okay, pay sharp attention today because this lesson discusses the very foundations of UV mapping! :D Basically, we'll be looking at one of the main causes of texture distortion and stretching/extension.
So let's open up Blender and get started with a fresh cube and a quick review. We're going to be texturing, so set the screen up for that task. (Split the 3D View window up into two windows, change the right window to be the UV/Image Editor window, and change the 3D View window from being in Object Mode to being in UV Face Select Mode. Tada!) We'll also be using the same Blender grid texture today that we used in the last lesson. Remember how to access that? Well, in the UV/Image Editor Window, go to "Image", choose "New", and hit the "UV Test Grid" button. Your cube should now be coated with that checker pattern. Incidentally, did you notice that we never changed the Draw Type from "Solid" to "Textured"? Check out how the cube looks in Object Mode: no texture showing! You'll have to set the Draw Type to "Textured" to get it to show up in Object Mode. And while you're at it, try rendering (the Render menu option is up by the File menu option; just click "Render", and then choose "Render Current Frame"). Yikes, no texture in the render either! Well, just remember the last lesson--you have to hit the "Texface" button for this texture to show up in a render. The "Texface" button is located in the Material subwindow, which is one of the five subwindows that pop up when you click the red sphere button (technically known as the "Material buttons" button). ;) Okay, enough review, let's start some UV mapping!

To unwrap an object, you need to be in UV Face Select Mode (at least, for Blender 2.45 you do), so switch back to that from Object Mode. Ready? Now choose the menu option "Face" (located in the 3D view window's header bar) and in that menu choose "Unwrap UVs". Immediately a window will pop up asking you how you would like your UVs unwrapped, and you would like fries with that? Tell it no; Blender's fries are awful. :P ...Anyway. The unwrapping option that we'll be working with today (we'll look at more options later) will be "Project from View", which is a planar form of projection.

But just what is a planar projection? And what has projection got to do with anything in the first place??? Well, let's try a little thought experiment to help clear this up. First, imagine that you have a slide projector showing a colorful picture of a still life fruit bowl scene. Now let's imagine that you are holding a large white cube. You walk in front of the projector screen holding the cube. Now what happens to the cube? Light is projected onto it from the slide projector, reproducing a part of the still life scene on the faces of the cube which are pointed towards the light. If you hold the cube straight and level so that one face is pointed directly head on towards the projector, the still life picture looks nice and proportional. But now suppose that you tip the cube so that the projector's light strikes the face of the cube at an angle. Is the still life picture still nice and proportional? No, it is elongated and stretched out. Like this: http://www.pbase.com/shootin/image/56881709
Or this flashlight circle, which should be circular but is instead an oval:
http://www.outdoors-magazine.com/local/cache-vignettes/L328xH246/aurora_beam-6b022.jpg
So what happens if you tip the cube even more? The picture on the face becomes even more stretched and elongated. And eventually, if you tip the cube far enough so that the cube's face is almost pointing away from the projector, there is nothing more to be seen of the still life except some colorful streaks of light smeared across the face of the cube. But what does it all mean?

Well, in this scenario, the still life picture would be like our texture: and we are "projecting" the texture onto the faces of our cube. And just as smears are produced when the light from the slide projector strikes the face of a physical cube from a wide angle, so also do texture smears result when a texture is projected onto a virtual surface at a wide angle.
http://www.pbase.com/shootin/image/56881709
So to sum it up: when there is a wide angle between the projection direction (the direction the beam of light is pointing in) and the surface on which the light is projected, the texture is elongated as a result. Actually, if you want to try an experiment to see how this works, take a flashlight and draw a smiley face on the lense with a marker (washable). Then shine the beam on a flat surface and change the angle at which you shine it at. When the projection direction of the flashlight beam is almost parallel to the target surface, the smiley face will be really smeared out and the circle stretches out into an oval! But if the projection direction of the flashlight beam is almost perpendicular to the surface, then the circle is nice and unstretched and the smiley face is happily proportional.

Now, about why the "Project from View" UV mapping option is called planar. Basically, if the texture is projected from only one direction, it is called "planar" because the texture is projected onto an object from a simple flat "plane" view. There are other types of projection methods in which you basically take the texture and roll it into a cylinder or sphere around the object to be textured and then project the texture inward--but we'll get to these later.

UV Mapping in Blender
So let's try some planar mapping out in Blender, shall we? :) First, make sure all the faces of your cube are selected (they will be a light purple color when selected; hit the "a" button a couple of times with your mouse in the 3D view window in order to deselect and reselect the cube a few times and you'll see what I'm talking about). Got the faces all selected? Now turn the cube so that one face is directly facing you head on in a perfect view (Top, Side, or Front, it doesn't matter--and remember you can find these viewing options in the View menu option of the 3D View window). So go ahead and hit "Face", "Unwrap UVs", and observe the option "Project from view"...And what "Project from view" means is "Project the texture from my point of view, as if I'm a human flashlight shining onto the cube." Well, click "Project from view". As Anna would say, "What do you see?" Do you see a perfect grid covering the face of the cube which is directly facing (perpendicular) to you? So far so good, right? Okay, so let's rotate the cube and--Aiiiieeeee!!! Horrors, we've got streaks on four faces of it! What happened??

What happened was that those four faces were at a large angle to the projection direction--in fact, they were parallel to it. And when projected, faces that are parallel to your projection direction will get long streaks on them; faces that are perpendicular to your projection direction will get perfect textures on them. Faces that are somewhere in between being parallel and being perpendicular end up looking better than streaks but worse than perfect texturing--usually they just end up being elongated and stretched out, with the distortion worsening or being mitigated as the angle between the projection direction and the textured face grows or shrinks.

Here is a bit of Blender mapping practice plus a problem to try out:
1. Using the default Blender grid, texture a cylinder from the side. Where and why do you see smears on the cylinder?
2. Now texture a sphere. Where and why do you see smears on the sphere? Where is the distortion the worst? Where is the texture the least distorted?
3. Finally, without actually doing this in Blender...How would you texture Suzanne the monkey head so that there is as little distortion as possible on the top of her head? On the side of her head? On the front of her head?
Now try this out in Blender and see if you are correct. :)

Re: Jennifer's Classroom

Posted: Fri Jun 27, 2008 11:20 am
by Junee
Jennifer_P wrote:
:lol: That's how you write chessmoves (for pawns). ;)

Oops! Well maybe that's a good puzzle idea. :D Your table looks nice, Junee; you've chosen a good texture. Have you tried the "Cylinder from View" unwrapping option for those table legs?

Nope, but I did do it for this soda bottle :D (The texture was turned the wrong way to make it work on the legs I think)
Show Spoiler

The label was tricksy, I changed it six or seven times but it still kept on cutting off at the top and the bottom. In the end I just added white borders and slightly changed the shape of the bottle to make it work. I can tell texturing is going to take some getting used to!