It’s been a long week of sorting out UV mapping, trying to figure out texture painting, and finally over-rigging my character.
UV mapping was sort of fun. Maybe I’m weird but it felt like a chore that you look forward to doing, lot like watering plants. For those who don’t speak computer graphics jargon, UV mapping is the process of taking your 3D model and flattening it out so that you can paint it and the computer knows where to put the paint. It’s the reverse process of making a shirt, first you make the model and then figure out how to cut it. That went fairly smoothly once I figured out what I was doing.
The next step was to give it paint, or in graphics jargon texture. That started out fine, but I had already made a material that gave the look I was going for, so I had to figure out how to make that happen. This process is called baking a texture (at least in Blender). You just tell blender what you want to bake and it goes off and does that. Simple right? Well maybe if you have a graphics card, but I do not (at least not one that Blender can use). Each attempt took 20-30 minutes to render which is a long time to wait, especially when you’re not sure things are going to work. And boy did they not work. It took many tries, but I eventually got a result I was satisfied with, the render took 1 hour. Apparently, graphics cards are important for graphics work.
Once I got the texture ‘baked’ in it was time to rig the character. This is the process of taking all the vertices that the character is made of and telling them to move with ‘bones’. This took a lot longer than expected, partially because I did way more work than what I needed for this project and partially because there are many nuances to rigging that were not clear to me when I began. For example: each vertex can be assigned a ‘weight’ from 0-1 (decimals included) which tells it how much to move with a bone. The thing I didn’t get was that each vertex can have a value of 0-1 with every bone in the armature if you wanted, whereas I thought if you assigned a vertex a weight of 1 to bone A, and then 0.2 to bone B it would result in 80% weight with bone A, 20% bone B. Nope. It instead moves perfectly with bone A and adds 20% of bone B’s movements. Good to know.
I also made some mistakes by not adding the bones to the hair (you heard me) when I built the armature. This resulted in some tedious renaming, spell-checking and adding things to groups, and then re-weight-painting the hair. Not the worst, but it would’ve been easier to do it earlier.
Finally, I followed this tutorial by archetapp on YouTube to figure out how to make masks in ARKit/SceneKit. It turns out to be simple, you basically just tell the app to render a barely visible (%0.001 transparent) plane before it tries to render the elements behind it. This results in the app not bothering to render the hidden things. I made the demo below to test out how that would work.
I was initially going to make the wall around the image be a mask, but I think I’m going to just build a box around the painting and the viewer (roughly the size of the room they’re in). What this will do is allow me to place the entire sky into the scene as well as a large ocean through the painting’s frame, but since all except the frame will be masked it will appear as if there is only a window. This is another slightly overkill option because the scene is only active when the painting is in the view of the camera, but it will make sure you can see the sky or ocean outside the painting’s frame. Here is an image to show you what I mean:
In other news, I got a loaf of sourdough from the Flourist! It was a little less sour than I was hoping and the crust is not quite as substantial as I’d like (I want to gnaw on it a bit), but all in all, it’s a great loaf; 8/10. I also remembered that the Collision Course EP exists, and so I’ve been listening to that a lot. It’s also just got me back into LINKIN PARK’s early stuff again which is fun, if a little bittersweet.
Oh, and once more thing, I named the character Lira (lie-ra). It has no particular meaning, it just sounded right.
Enjoy some random images from the week’s work: