Sunday, September 30. 2007
 I have also mapped the long variant. Everything went smoothly and so I can finish work on the T-shirt. I worked on it for very long and had to work through many problems, implement many new features and find ways on how to continue with my modeling. I hope the next objects will be done faster. But I can now be sure, that the UV-editor is quite usable. There are issues and there are extensions I would like, but it works. So I can soon start to map the face to finally give the character some color.
 Now I have also mapped the medium length version of the T-Shirt. I haven't drawn a real texture yet, so I show only the editor screen shots with the checker texture.  The process was to map the short versions UV-map and then move the common vertices to the places they were on the other version. This way they have a similar UV-mapping and it should be possible to create a texture for both by some scaling.  The biggest problem was, that I had accidentally stitched the arms for the backside upside down. When I tried to fix the distortions, I was unsuccessful, the mapping didn't change at the places I pulled. Upon selection of an edge I saw what had happened, I had accidentally put in the arms upside down. But even that challenge was met by my UV editor, as I had implemented a way to drag apart two points at the same location, I was able to separate the wrong points, turn the mapping and reattach it. I am very happy with the editor, though there is also a complaint, it is very slow. I will have to see to speed it up in the future.
Yesterday I also had started on the mapping of the medium length T-shirt. I loaded the short versions mapping into the editor and then found out, that I had forgotten a detail. I can't use transparent colors in the editor (I use a rather low level implementation) and so couldn't see the image in large parts of the editor as it was hid under the faces. Instead of adding some way to use transparent faces, I came up with a much simpler solution. I just added a button to switch off rendering of faces. Most of the time I don't need them.
Saturday, September 29. 2007
While creating the last rendering I ran into a big problem, the faces were no longer being smooth shaded. After some debugging I found out, that the smoothing angle was 0. The smoothing angle is the maximum angle two faces' normals may be apart to still consider the transition between the two faces smooth. I have introduced a bug there somewhere I couldn't find, it seems I lost that value a long time ago. The main problem was, that I can't change the value from the default yet, as I never even wanted to change it. So after looking a bit at the code I noticed, that I was storing the angle multiple times, once for the polyhedron and once for every instance of the geometry associated to a modifier. As I don't see any reason for the stored geometry to have a differing value I just threw that out. Now the angle is stored exactly once, in the polyhedron. That also fixed the rendering problem.
 I have continued on the UV-mapping of the T-shirt. There is probably not a big visible difference to the last image, but it really is better now. I worked especially on getting the mapping to have about the same scale on all parts so that I don't get too big distortions. One of the reasons it still looks a bit bumpy is, that the subdivisioning also moves the UV-map around a bit. I can't really do anything against that. So now I will save the UV-map and start on the medium and long T-shirts.
Friday, September 28. 2007
Today I was a bit lazy, but I at least added a small new feature. The size of textures to be used for the procedural shaders was fixed at 256x256 pixels. Now it can be changed. Up to now I had to find a compromise, as my laptop has a rather weak graphics card, I have to be careful to not overload it. So I couldn't use big textures. With a configurable, machine dependent setting I can choose a useful value depending on the power of the box. This already showed a problem with the UV-mapping. The checker pattern already had a resolution which was higher than the texture map could resolve. So it resulted in a pattern which wasn't uniform, a problem if you try to create a uniform mapping. And with a much bigger texture I noticed a bug in the OpenGL-renderer. The procedural materials are recalculated when the geometry changes. For procedural shaders dependent on the position in space, that really is necessary, but for 2d procedurals (like the checker pattern) it is not necessary. So I just switched it off in that case, as that should speed up the editor quite a bit.
Thursday, September 27. 2007
The two small additions to the UV editor are made. Now when nothing is selected the rectangle selection is automatically activated. Also the "r"-key toggles the rectangle selection. That should speed upworking with the editor, because I actually switched rectangle selection on and off a lot.
Wednesday, September 26. 2007
 Now I am rather sure that I will have to change the UV-mapping a bit. As I plan to use it as base for the other two variants of the shirt, it should not have big problems. Also I found out how hard it is to get the pattern at the arms to match up.  I am not really good at drawing, but this thing at least gives me some reason to practice it and I guess that can't be bad. Also I think with time I will get better (at least a bit). And even when the UV-mapping isn't particularly good and the texture also has problems I think the result still looks quite nice (and I definitely have to try stripes like a Zebra). And it proves that the UV-editor indeed works. There is a small issue I will change soon, the rectangle selection has to be selectable with a keystroke. Clicking on the UI-button is quite slow, as I have to move the mouse around too much. Also I will activate the rectangle selection when nothing is selected and the mouse is dragged. That doesn't lead to any action currently and it seems a very logical way, if nothing is selected then there first needs to be a selection for the next action.
 To try the UV-mapping I yesterday played a bit with Xara to create a texture. There was some bug in the program where I lost the UV-mapping or I would have posted the image yesterday. The texture isn't finished, the back is completely missing and the arms are also still not done. I actually consider to work a bit more on the UV-mapping, I though the slight irregularities might give it a more natural look, but it only looks slightly off. Where the black spots are from I don't know (and I currently don't want to know). Somehow that stuff pops up again and again. This time it seems to have uncovered a bug in the uv-mapping or texture mapping in the raytracer.
Tuesday, September 25. 2007
With the help of the checker pattern I was able to create a mapping I am basically happy with. To show the differences I made two screen shots of some parts, one before the fine tuning and one after. You should see quite a difference: So the mapping now looks like this: 
To get the UV-mapping of the T-shirt right I needed a checker pattern so I can see, if there are parts twisting and if the sizes match up. Instead of drawing a texture I implemented the framework for procedural 2D color shaders. So I now have a simple to use shader which just creates a checker pattern of the desired aspect ratio.
Monday, September 24. 2007
I have added the feature to display an image as background in the UV editor. That should make it possible to adapt a mapping so it fits a preexisting image. It also should make it easier to map the T-shirts in the same way so a texture only has to be cut but not changed in another way to fit all three models.
Sunday, September 23. 2007
I had to fix two more bugs, the first was that snapping to existing vertices didn't work, I had added the wrong points. This is related to the other bug, the export function created the mappings upside-down. To output the UV-mapping in a useful way I have to mirror the mapping on the x-axis and that was missing. The snap points had exactly the other bug, the mirrored points were used to look for possible snaps against the not mirrored candidates.
The UV editor seems to be usable. I was able to map the short T-shirt and it doesn't look half bad. To the left is the cleaned up mapping, the left is for the front, the right the backside. I will probably work a bit longer on them, I don't like the left arm on the backside mapping.
You can also see the aspect ratio at work, the image was created like that by my program. I didn't have to do any scaling in an image manipulation program. But I also have a wish for the next feature. As I will have to map two more shirts (the medium and long variant), I want to be able to load an image as background in the editor. That way I can use it as a guide.
I have also implemented the rectangle selection. Quite some changes were necessary, but now it is working. I hope I can now create a good mapping for the T-shirt.
|