January 1, 2020

Books I read in 2019

Each year I write a list of books I read during the year. This is the 2019 list:
  1. Predator: The Secret Origins of the Drone Revolution. Tells the history of the most famous military drone: The Predator.
  2. Fighter Wing: A Guided Tour of an Air Force Combat Wing. A combat wing is a collection of different military aircraft organized to complete a specific mission. This book tells you about the different aircraft, the weapons, and the organization.
  3. Bomb Hunters: Life and Death Stories with Britain's Elite Bomb Disposal Unit in Afghanistan.  
  4. A Dawn Like Thunder: The True Story of Torpedo Squadron Eight. Tells the story of a carrier based squadron of torpedo bombers during the battle of Midway and Guadalcanal. 
  5. Designing Games: A Guide to Engineering Experiences. There are many books on how to make games, but this book is written by the game developer who made RimWorld. That game sold more than one million copies, so you better study the book. He wrote it before he made RimWorld. 
  6. Dust Off - Army Aeromedical Evacuation in Vietnam. Tells the story of medical helicopters in the Vietnam War. Is available for free!
  7. The Grid: Electrical Infrastructure for a New Era. One often forgotten achievement of humanity is that we have electricity in our homes. But this system is crumbling because the system is old and will also change to be more environmentally friendly, so if you want to learn about the feature of how to deliver electricity, you should read this book. 
  8. Logistic Support. Much has been said about the battles of the Vietnam War - but not what happened behind the scenes. To fight a battle you need ammunition, food, etc. How can you transport it from US to Vietnam in the best way? This book will give you an overview of the logistics behind the Vietnam War. Is available for free!
  9. Wind, Sand and Stars. Is a memoir written by a french pilot who in the 1930s was flying mail across the french empire. 
  10. Topgun: An American Story. Is written by one of the founders of Topgun (and yes it is "Topgun" and not "Top gun" as in the movie). Despite the name, the book is not only about Topgun - it's a biography of the authors career in the US Navy.  It starts with the Vietnam war, some Topgun in the middle, and ends when he commands an aircraft carrier. His basic idea is that the pilot is more important than the aircraft, so it includes some criticism of the latest aircraft in the US Navy: the F-35, arguing that a cheaper aircraft with a more skilled pilot would have been a better solution.
  11. Why Did the Chicken Cross the World? Tells the history of the chicken. 
  12. Last Stand at Khe Sanh: The U.S. Marines' Finest Hour in Vietnam. Khe Sanh was a military airfield in Vietnam and this book tells the story of when it was under siege for more than two months.  
  13. The Colosseum. Tells the history of the famous Roman amphitheater. The most interesting part is how little we know of what actually happened in the Colosseum. Not many sources exists, so movies have taken a lot of creative freedom. 
  14. Babylon's Ark: The Incredible Wartime Rescue of the Baghdad Zoo. Tells the story of what happened to the Zoo in central Baghdad after the 2003 Iraq war. 
  15. When Thunder Rolled: An F-105 Pilot over North Vietnam
  16. Worm: The First Digital World War. Tells the story of the Conficker computer worm which was a virus people thought would cause the end of Internet.
  17. We Bought a Zoo: The Amazing True Story of a Young Family, a Broken Down Zoo, and the 200 Wild Animals That Change Their Lives Forever. With the longest sub-title ever there's no need for further descriptions.
  18. Circle the wagons - The history of US Army convoy security. Is available for free. 
  19. Nine Lives: My time as the MI6's top spy inside al-Qaeda
  20. Humble Pi: A Comedy of Maths Errors. Consists of several examples of where minor mathematical errors have resulted in big consequences. For example, ground crew confused the units of measurement when they put fuel in an aircraft, so the aircraft ran out of fuel and almost crashed (the fuel gauges were also broken). 
  21. Surely You're Joking, Mr. Feynman!: Adventures of a Curious Character. A book about the Nobel Prize winner Richard Feynman (spoiler: he didn't want the prize). 
  22. Permanent Record. Biography on Edward Snowden.
  23. Unity 2017 Game Optimization - Second Edition: Optimize all aspects of Unity performance

Books in Swedish
  1. Det bevingade verket. Tells the history of the Swedish Air Force. 
  2. Med invasionen i sikte. Tells the history of the Swedish Air Force 1958-1966, and how a war with the Soviet Union would have happened. 
  3. ÖB:s klubba - Flygvapnets attackeskader under kalla kriget. Tells the story of the ground attack part of the Swedish Air Force during the Cold War. 
  4. System 37 Viggen. Consists of shorter stories written by people who were involved with the Viggen project, which was a Swedish military aircraft. 
  5. Svenska hackare. Gives you an overview of who has been hacking what with a focus on Sweden.
  6. Poltava. Tells the story of a famous battle between Sweden and Russia in the 18th century. 
  7. På spaning efter det okända - Bilder från kalla krigets ubåtsjakt. Each chapter is written by someone who was involved in the 80's anti-submarine hunts in Sweden. 
  8. Ubåtsfrågan 1981-1994. The Swedish government set up a total of three groups with the task of analyzing the assumed underwater violations of Swedish waters that have been going on mainly in the 80's. This is the second group's report. 

October 21, 2019

Adventures making stylized vehicles

After making three stylized characters in Blender I needed to do something else. So why not learn hard-surface modelling and texture painting while making some stylized vehicles? The first vehicle is a US coast guard helicopter model MH-60:

The reason I decided to make this exact helicopter was that I had an old non-stylized model of it collecting dust in a folder, so I might as well use it and improve it. What I also wanted to learn was to add decals to a model. Decals are those logotypes and text and there are several ways to add them. When making games I think the best way is to paint them on top of the base texture by using Blender's stencil function. What you do is you have the texture with a transparent background and then you just paint it where it should be and Blender is figuring out how to add it on top of the base texture. The problem I discovered is that the texture resolution has to be high or the logo and text will become pixelated meaning that you can see the pixels and can't read the text. The helicopter's texture is 2048x2048, but because I realized this was a problem after painting the base texture, and I didn't want to redo it all, I had to cheat by using a 4096x4096 texture on top of the base texture or the logotypes would be visible. This is something I wanted to improve when making the next model.

I also decided to experiment with low-polygon characters with lower polygons than I had previously used. The stylized characters I experimented with before are still low-polygon but they take several days to make because you have to make a high-polygon version and then a low-polygon version, which is a process I talked about in a previous article: How to make a stylized game character in Blender. A single of these lower-low-polygon characters takes less than a day and I think the result is still good if you are not looking at them very close:

Next vehicle I made was a Visby corvette belonging to the Swedish navy:

As said before I wanted to fit everything into a 2048x2048 texture and the easiest way to do that is to have as few UV islands as possible. This is the texture and you can see I managed to paint the logotypes and text on top of the base colors. The result is still kinda pixelated if you look really close, so I might have to experiment more to get a better result:

I wanted to put the Visby corvette in a scene, so I also made the underwater robot rov called "Double Eagle." It belongs to the Visby corvette and they lift it out with a crane to look for underwater objects such as mines:

The final scene is a half below water and half above water. To make the light shining through the water volume I had to experiment with volumetrics, which is really slow to experiment with. The reason is that volumetrics is really slow to render so if you make a small change you have to wait really long before you can see the result of that change. But after a few hours I think the result is good:

If you want to see more images, I've uploaded them to my Artstation account:

September 3, 2019

Book review: Babylon's Ark

I clearly remember the 2003 Iraq War. The reason is that I did my military service at the same time as when US invaded Iraq and there was chatter that the Swedish army would extend the length of our military service because of a higher security risk. Now Sweden is far away from Iraq, so perhaps someone thought that Russia would use the opportunity when many US forces were in Iraq to cause trouble in Europe. Luckily, that didn't happen and the invasion of Iraq ended after a few weeks. But people would for many years still be dying in Iraq because not everyone thought the war had ended.

Fast forward a few years to when I was listening to a radio show where Malik Bendjelloul, a Swedish documentary maker, talked about his life. You can read a translation of it in English here. In it, he talked about how he wanted to make a documentary about Lawrence Anthony, a South African who was working with elephants.
"Lawrence had for the past few years tried to help a group of ferocious elephants, elephants that had destroyed surrounding villages and would now be put to death if no one embraced them. So for the past few years, he had for months hanged out with these elephants. And it led to that his entire way of looking at life on our planet had changed. The more time he spent with the elephants, the more he experienced his own inferiority. The human brain may be developed, but all of our other senses are embarrassingly undeveloped: our hearing, our sight, our touch. Researchers have still not understood how, but everything indicates that elephant senses function in a way that sounds like science fiction. For example, one has begun to understand that elephants can communicate with each other over incomprehensible large distances. Maybe over entire continents. Lawrence argued that he occasionally felt this communication. It had felt like the elephants had tried to communicate with him. He didn't want to talk much about it - in part because it was difficult to put it into words, in part because he understood it sounded a bit too much new age fuzzy. I returned to Sweden and thought it existed material for a good story."
But Malik Bendjelloul was also talking about one of Lawrence Anthony's other adventure: when he, just a few days after the 2003 invasion of Iraq had ended, traveled to the capital of Iraq, Baghdad, to help the animals at the zoo. I was really happy when I realized that he had written a book about it before he passed away in 2012. It's called Babylon's Ark: The Incredible Wartime Rescue of the Baghdad Zoo, and it's the best book I've read so far this year. There are some clips available on YouTube, but you should also read the book.

Not only did he rescue many of the animals at the Baghdad Zoo, but also other animals across Baghdad. Lawrence Anthony realized that another zoo existed in Baghdad, and it was called Luna Park. It was in terrible shape, so he decided to move the animals to the main Baghdad Zoo:

Saddam Hussein, the former leader of Iraq, collected horses, and they also needed to be rescued. During the war, the horses disappeared because they were very valuable, but Lawrence Anthony and his team managed to find them and bring some of them to the zoo:

So if you want to read a feel-good book that I rated 5/5 stars on Goodreads you should read Babylon's Ark.

August 15, 2019

Disco Elf Corel - or how to make a stylized character

I finished my second ever character for games: a disco elf called Corel. Like my last character, butterfly woman Madeliefje, I made it to participate in a draw-this-in-your-style challenge organized by Poopikat, and I also wanted to learn Blender 2.8. This is the original concept by Poopikat:

According to Poopikat's description, Corel "has darker skin, Glow tattoos and white-ish blue hair with two big bows. I'd like to think of her as a water/snow elf if that makes any sense." I thought it would be cool to make them glowing tattoos, so I decided to make a 3d version of her in Blender. I also wanted to improve what I thought wasn't good about my last character.

Improvement 1: Face. So I started with the old character. Most 3d artists use a basic character and change it to make it look more like the character they want to make because most human-looking characters have similar body shapes. Step one was to improve the face. I first changed her jaw bone to make a sharper jaw and I also changed her eyes. What I learned was that very small changes can change the look of a face. If you look in a mirror and then open your eyes slightly and stare at yourself, you only have to raise your eye-brows a few millimeters to go from just a "looking" face to a "staring" face. To improve this character I made the distance between the eye-lids and the eye-brows smaller to make a more concerned face like in the original concept. I also remade the size of the lips and I gave her an open mouth where you can see her teeth. The teeth are just a flat white surface because they are almost not visible anyway.

Improvement 2: Body. Madeliefje's body looked like a human body, but I wanted Corel's body to be more stylized. One artist I get inspiration from is Carlos Ortega Elizalde, who's making characters with a slim body and large head. I think they look really cool. So I changed Corel's body to be smaller while increasing her head size.

Improvement 3: Rig. To make a 3d character move around you need to "rig" it by adding bones like a human has. Some people have this as a job, so it's not something you learn in an afternoon. I'm using Blender and a free add-on to Blender is Rigify which will generate a rig for you. I used a simple rig to animate Madeliefje and I realized I couldn't pose her the way I wanted because I couldn't rotate her hands. It takes some time to learn Rigify and you have to tweak the generated rig to make it fit your character, but because all human-looking characters move in the same way, Rigify will help you a lot once you learned it.

What I want to improve when making the next character.
  • Hair. Making hair for game characters is not easy - there's a reason most game characters have short hair or a ponytail. The reason is that big hair will demand many triangles, making the game slower and it's also difficult to animate a big hair. Corel's hair consists of many hair pieces you have to add one-by-one and the result is that you end up with a "stripy" hair and many triangles belonging to the hair pieces are hidden, so it's a waste of triangles. I've seen some characters where the hair is just one big mesh, so I might try to make that type of hair next time. 
  • Cloth creases. Corel is wearing a body-suit and to make it look more like cloth you have to sculpt creases. I think they were too small and you can't barely see them in the final model, so I will make them bigger next time.
  • Normal map. To make smaller details on a less detailed mesh, you need a normal map. The normal map belonging to Madeliefje was so bad I had to remove it, but Corel has a normal map. This normal map generated some weird edges and I think the reason is that Corel is too low-poly, so next time I will add a few more triangles, especially around the legs.      

These are the final poses, with some inspiration from a disco movie with John Travolta. I added the smoke as a post-processing effect in Krita:

If you want to vote for her you can find her on Artstation.

July 23, 2019

How to make a stylized game character in Blender

I finished my first ever stylized character for games. Her name is Madeliefje and I decided to make her so I could participate in a so-called draw-this-in-your-style-challenge. This is a popular challenge on Instagram where an artist uploads an artwork and then the community will remake that artwork but with their own personal style. I didn't have a style because this was my first character, but I've always wanted to learn how to make a stylized character, so I decided to give it a go. Stylized art is the same art-style you can find in games like Fortnite. This is the original artwork by Madeleine Bellwoar:

Now this was my first character, so to learn how to make a character in Blender I found this tutorial: CGC Classic: Female Character Modeling. And if you finish it you end up with something that should be a good start you can continue from to make it your own character. I wanted to make a stylized character and they tend to have bigger eyes and smaller eye-lids, and this character also has elf-ears, so I added that and ended up with this:

Next up was hair. The original character has long hair, which is not a good idea in games because it's difficult to animate, so I decided to give her a pony-tail. Now there are several ways to make hair in 3d, but I needed to make stylized hair, and this is an excellent tutorial on the subject: How to Model Cartoon-Style Hair in Blender - Bezier Curves Tutorial. I separated the hair into two major parts because it was easier to control with the bezier curves, so the pony-tail consists of three pieces which are not connected to the head pieces, but the missing connection is not visible because of the scrunchie.

To make good-looking eyes I found this tutorial: How to Model, Light, Texture, Bake & Rig eyes in Blender. The eyes were actually the hardest part - or rather the appearance of the eyes in relation to the head. Stylized eyes are larger than normal eyes, but when you add larger eyes the character may sometimes look like the eyes are popping out of the head, so I had to spend a lot of time adjusting the size of the eyes, the size of the pupils, the position of the eye-lids, and so on. It was also fun to rig the eyes to make it easier to control them:

In the original image you can see that she's wearing a skirt, but skirts are kinda tricky to animate, so I replaced the skirt with pants. The idea behind the pants is that she has folded them up so I had to add many creases to the pants to give them the correct shape. Blender has a sculpting tool so I used a crease brush, and the pants were actually the only part I sculpted - the other parts were just moving one vertex after the other. Speaking of moving vertices, the top in the original image consists of leaves and the top was the most time-consuming part of the character. I first tried to sculpt the leaf-top with a leaf-brush but it didn't work. Then I tried to add the leaves with a particle system, but it didn't work. So I had to place all 300+ leaves one-by one:

We can't see the bottom of the character in the original image, so I gave her boots. And I also replaced her diadem with butterfly antennae, because the diadem I first made didn't look good. The main character is now finished. But I also wanted to make it game-ready, meaning reducing the amount of vertices by baking textures onto a character that looks the same but has fewer vertices, and then you end up with a texture sheet looking like this:

Most of the ambient occlusion shadows in the above texture sheet are generated automatically by Blender, but I had to clean them up by vertex-painting. At the same time I also painted her lips and gave her face a slightly red color, so the entire skin is not looking the same. Most humans have a slight tone of red in the face, but also some yellowish and bluish colors, so you have to experiment with what looks good. An excellent tutorial on how to use textures baked by Blender to make stylized textures is: Learn Sculpting by Creating Game Assets. I also had to make a specularity texture, which tells which part of the character should be reflective, such as the boots, and which should be not, such as the pants. Then I rigged the character with a simple rig to be able to move her legs and arms to easier change her pose. This is the final result:

But the idea behind the original character is that she's responsible for growing plants during spring time. So I thought it would be an excellent idea to practice making foliage. I've earlier tried to replicate the trees from the Witness game, so I had some experience, and I also found this video on how to make plants for games: How to make stylized plants and grass. The basic idea is that you first make a high-polygon plant and then you bake the high-polygon model to a flat-plane. It looks like this:

And if you do some painting the texture will look like this:

Then you cut the plane around the individual plants and move the vertices to make the flat mesh more three-dimensional. These flat meshes are called cards. The problem is that they look the same from both sides but it's generally not a problem. For example, you never see the bottom of the plant to the left so you never notice that the upper part is the same as the bottom part:

To make a forest scene, you add a flat mesh with many vertices, and then you use Blender's weight-paint tool to give each vertex a weight, which controls if you want a specific plant to appear around that vertex. Then you use a particle system to place the plants, so you don't have to place each piece of grass by yourself. You can also use weight-paint to control the length of each plant. This will require a lot of painting and re-painting until it looks good and no plant intersects with another plant. This was an early test (the plants are smaller along the border and this is controlled by weight-painting):

In the original image you can also see there's some kind of stone-bench. So I googled for some reference images and ended up with this:

I used a stone brush to paint the different colors of the bench and I think the result was better than expected. So I was a little sad when most of the bench in the final scene is hidden by the foliage, but I guess that's how it is. Anyway, this is the final render which took about 90 minutes for the computer to generate. 

The time it takes to generate a final image is one of the struggles with 3d. Yes, you can generate images with lower resolution and quality which is faster, but sometimes you find something that bothers you in the image with the highest resolution. Then you make that small change and have to wait another 90 minutes for the new image to render. For example, I made some tests from other angles, so there were many 90-minutes of waiting periods. And I have just one computer and rendering images takes up almost all power, so even surfing the web was a struggle during the waiting times:

But that's not it! In the original image you can see some greenish smoke. Blender can generate volumetric smoke, but when I tested it, it was difficult to control how the smoke looked and it would take like 5 hours to generate the final image with smoke, so it took far too long. Notice that this is not the same grayish mist you can see in the rendered image - it takes zero time to generate. Instead I decided to learn some post-processing in Krita. This is an excellent tutorial on the subject: Post-processing for Dummies in Under 12 Minutes - Blender and Krita Tutorial. And the final image looks like this:

In the end it took some weeks to learn all these things, but when I make the next character it will hopefully be a much faster process.

This project is also my first project on Artstation, so go there and like it if you like it.