 All right. Welcome, ladies and gentlemen. It's already a little bit late. I hope you're still enthusiastic and motivated. Perfect. All right. So first things first. Who of you uses UV unwrapping on a daily basis or fairly regularly? That's most of you. And how many of you have ever been frustrated because you need to place another seam? That's perfect. I think I'm in the right place. All right. So my name is Aurel Gruber. I got in contact with Blender around eight years ago. At the time as a hobby, I then went on to work for an animation studio in Switzerland called Pixcube. And now I just finished my bachelor's in computer science. So today and yesterday we saw a lot of interesting things, among it a lot of interesting content created with Blender. That we get to enjoy. But we can only enjoy it because artists create it and artists can only create it because developers and programmers create the software. But there is one more layer that's often forgotten and that is research. So the things that is implemented by programmers and developers is often based on extensive research that's often very hard. And today I would like to elaborate that a little bit, but in particular it will be all about UV unwrapping. All right. So I did my bachelor thesis at ETH. So that's the Swiss Federal Institute of Technology. Who knows about it? A couple people. It has a strong background in engineering, science and technology. And at ETH there is the Institute for Visual Computing. And in that institute there is the IGL, that's the Interactive Geometry Lab. It is led by Professor Dr. Olga Sorkin-Hornung. And it has a lot of fields that are really important for 3D. That is interactive shape modeling and animation. What you can see here is a rig that you can manipulate in front of your computer and you can in this way interactively pose or animate your objects. Another field is a digital fabrication. What you can see here is a 3D model that was balanced computationally such that you can then spin it and it's dynamically balanced. Then there is image and video processing. What you can see here is image retargeting. Essentially you have an image that has a certain aspect ratio and you want to retarget it to a different aspect ratio. So as you can see in C, you can stretch it. Which is fine for the ocean and the mountains, but the surfers are terribly distorted. And so this technology allows you to retarget that to restore these objects. Finally, and most importantly for today, there is digital geometry processing. UV unwrapping is part of digital geometry processing. And that's what we'll talk about today. So the IGL has an impressive record of publications in those fields. Most recently the paper called Scalable Local Injective Mappings that is concerned with parametrization and shows a new approach that is perfect for UV unwrapping among other things. Now I would like to give you an introduction to UV unwrapping but not how to use it in Blender. I think most of you know how to do that. But how to think of it in a more formal way such that it becomes tangible and tractable for algorithms. So parametrization generally is the process of transforming geometry from one state into another. On the bottom right you can see mesh deformation where you have a mesh. You deform certain vertices and then you want the rest to kind of relax in a state such that it looks as if it were some kind of flexible material. But that's not part of today's talk. Today we'll focus on UV unwrapping as mentioned several times. And UV unwrapping is the process of taking 3D geometry, producing a 2D map that has to satisfy certain constraints. In particular, it may not contain any flips that is especially important also in texture painting. And it should minimize some notion of distortion. The less distortion you're mapping, the more usable it is. But how can we formally reason about distortion? So here you can see several different maps and intuitively it's quite clear that the one on the bottom left is fairly bad, it doesn't represent the 3D shape very well, while the one on the top right is fairly good. And we can formally capture this with energies. So an energy is essentially a number that we can assign to a UV map that tells us how good it is in terms of distortion. There are different energies, there are conformal energies that essentially say a mapping is very good if the distortion in the angles of the triangles is fairly low. There are ortholic energies, they are concerned with area preservation and there are isometric energies that care about the length of the edges. And this last energy is by far the most important for UV unwrapping and the corresponding technologies like texture painting. So I will now give you a very short introduction to those things that involves a little bit of map, but it will be not too much, don't worry. So here you can see this triangle. Do I have a laser pointer here? Yes. So you have a triangle over here that's barely visible unfortunately, and the corresponding mapped triangle over there. So we can reason about the distortion, we can compute it, whatever measure we choose, be it the angles, the area, the edge length. And we can generally call this a function called E, so we give it a triangle, it gives us a number that says this triangle has so and so much distortion. And then we can actually weigh it. We can say, alright, it's a fairly small triangle so it has less weight for the overall model, or it covers a large area so it's more important. So that's the weight we give to that one triangle. The whole thing is the energy for one triangle, and now we can sum that up. So that's a bit of an intimidating looking sign. Essentially it says for all triangles, compute the energy and sum it up, and then we get our final measure for that mesh. And the task of parametrization of UVN wrapping now is to minimize that energy. And that's a very difficult task and there have been a lot of attempts going back to the 60s. First were fixed boundary methods. They produce mappings that look approximately like this. So your border vertices, they have to remain fixed to a circular border. And then you place all the remaining vertices inside. It's easy to see that for most objects that don't have a circular border or something resembling that, it's not a very good match and produces awful distortion. Later on there were angle-based methods that allowed for a free border. That is angle-based flattening, least squares conformal maps, and AVF++. Those are actually the algorithms that are implemented in Blender right now. They produce maps that look somewhat like this. As you can see in this case, we have a lot of distortion in these areas. Essentially what we have are flipped triangles. And for things like texture painting, this is awful because if you paint on the ear, the paint will also appear on other areas of the mesh. It is therefore not usable. There is a newer technology that was published in O5, and that's called AVF++, also implemented in Blender. As you can see, it produces a fairly similar map, but it no longer has the issues with flipped triangles. Most recently in O8, Chinese researchers found a new way to parameterization that allowed for the optimization of isometric maps. But they were not able to remove all flips, and so in 2016, at IGEL, at ETH, they invented a new technology called Scalable Local Injective Mappings that produces mappings of highest quality while removing all flips. Or while not allowing any flips. So now I will show you what that actually means. That's probably what you guys are most interested in. That's the result of isometric maps. And as you can see, if we compare this to what we had previously, you have a much more detail captured from the texture, even though there are no seams placed on the model, and this is how the algorithm works conceptionally. So you have an initialization that looks like this. This should be cheap to compute, and it's only like a starting point. And then it's an iterative algorithm, and in each iteration it improves the mapping. As you can see, by the 20th iteration, you have something that looks fairly good. And here you have a direct comparison. On the left you can see the angle-based method, which as such is, for example, not usable for texture painting because you have not enough detail in the facial features. On the right you can see the new mapping, which has a lot of detail in the facial features. And therefore you can place less seams. You can use your texture space better. You have less islands, and therefore your overall workflow is more efficient. All right, so now we come to a few demos. I think that should be what you guys are waiting for. But first we have an unwrapping demo where we start from a bad initialization to visualize the performance. So here we have our 3D mesh. As you can see, it is a fairly standard 3D head model. It has no seams. It's completely closed. Now I will unwrap it with Slim, and this is after one iteration. You have a bad initialization, and after one iteration, that's the result you get. Two iterations? Three iterations? Then we have five iterations. As you can see, quite quickly from the bad initialization, a correct map starts to form. This is after 10 iterations, and finally after 20. Now the colors that you see is the amount of distortion in terms of area. So blue sections of your map are undistorted triangles, while green, yellow, and in the end red are highly distorted triangles. And now what is visualized is angular distortion. So the distortion in the angles per triangle. As you can see, with Slim, we have it fairly evened out between area distortion and angular distortion. If we now compare this with the old method, based on angle-based flattening, you can see initially that there is no angular distortion. Because it optimizes the distortion in the angles, it is completely blue when we visualize angular distortion. However, if we switch to area distortion, you can see it paints a very bad picture. So most triangles are heavily distorted, and it's almost completely red. And now I would like to very quickly run through the different iterations when we use a good initialization. As you can see, even after one iteration, it's already quite well developed. Three iterations, three iterations, five iterations, then 20, and finally 100. As you can see, the last 80 iterations didn't really make a big difference. So with only very few iterations, you can quite quickly get a very good unwrapping. And in comparison, that's the old method, based on ABF++. All right, but there is something that's also quite usable often. Let's say you arrange your UV maps, you have all your islands, and then you kind of fit them together. You change the borders such that they nicely use the entire texture, but by deforming it, you introduce distortion. And you would then probably like to have an algorithm that takes care of that and tries within the borders to minimize the distortion. So on the right-hand side, you can see an initialization with ABF++. Who of you is familiar with the minimize-stretch operator that is used to minimize distortion? All right, quite a few. So if we use minimize-stretch on that unwrapping for a minute, you can see we get the result in the middle, which is not very good. I'll talk a bit more about that in just a minute. On the very left, you can see the result that we get when using slim. So within just a matter of seconds, we get a very well-developed map. So use minimize-stretch, minimize everywhere distortion, and it does a fairly okay job on the outer rim because there it has enough room to move the vertices. However, in the center where the vertices are all packed together very densely, it cannot make any progress due to the nature of the algorithm. So even if we let this run for an hour or even longer, it won't produce a very pleasing result. Notice also how distortion actually increases in this outer part. It becomes even redder. So all in all, in this case, it's not applicable. This method. But now let's try the same thing with slim. Let's say you have your UVs packed, you have them nicely arranged, and now you want to minimize distortion. As you can see, within just a couple seconds, slim does a very good job at finding a compromise between angular and area distortion. All right. Finally, there's something new that I came up with that I must say I'm a little bit proud of. And that is a new way for artists to have more freedom in creating their UV maps. So let's say you have your model and you have it unwrapped, and let's say you want to really add a lot of detail on your textures to the eyes of this model. So you would have to somehow scale up the eyes in the map, right? You probably use something like proportional editing, which doesn't work too well because you always induce distortion in the surrounding parts, like you can see here. Another option would be to use pinning, right? So you choose two vertices at either edge. You pin them, you scale them up, you unwrap again. But they're also often you have to do a lot of pinning, a lot of manual work, and it's very hard to get right. What would be really cool is if we could, instead, use a weight map. So it's already built into Blender. We create a weight map and we color the eyes red because we want more detail in the eyes. We color the rest of the model blue because that's not so important. Now we can use, once again, interactive parameterization, and it will change the proportions such that more details can now be found in the eyes. So who likes that? All right. Glad to hear, glad to hear. All right, so now we can also add a texture to more clearly visualize the difference in detail. So as you can see, if we go through these two mappings, there's a lot more detail in the eye, but it still tries to minimize distortion in the surrounding areas. And of course, this wasn't done by an artist, but by me, which isn't the best. You can do much better. You can blur your weighted maps. Do a lot of fancy things. Most importantly, it's something that's preserved through a different, if you unwrap your model differently for a different, for example, one thing for the texture maps, one other thing for other maps, and you can have different weight maps for different tasks. And here you can clearly see how it corresponds, the amount of detail to the color of your weight map. And you can also hopefully see how quickly this is possible. Yeah. All right, so this once again visualizes the difference. All right, that's more or less it. So in conclusion, with Slim, Blender has a state-of-the-art unwrapping tool that can handle large geometries, that is fast, and has some additional nice features. Yeah, now there are two more things I'd like to mention at this point. First, I, together with some friends, some other students, founded a company two years ago called Infix. We do application web development, teaching, and three visualizations. So if you ever need a partner for something, drop us an email and we'll see what you can do. You could find us in these addresses. And furthermore, I'm at the moment in Amsterdam, and I live here for another three months. I tried to look for a temporary position or an internship. I haven't found any so far. So if you have something, please contact me. I'd really appreciate that. Thank you for your attention.