January 27, 2022

How to make your boring animations more exciting

0 comments

After I finish a piece of art I always make one of those spin around animations (I think they are sometimes called turntable animations). The basic idea is that you take a 3d model and rotate a camera around it 360 degrees so you can see all sides of it. While these animations might show the model they are also really boring to look at. For example this SpaceX Starship rocket I made for Tesla Simulator looks like this (nothing interesting is going on here - yawn!):

 
The other day I was watching an art critique stream on Twitch where DiNusty, who's a game industry professional, went through works by artists and gave them suggestions on how to improve them. One of the art pieces he reviewed was a video of a game asset. What he said was that he really liked that the game asset moved, which is much more interesting to look at. So I've decided to from now on always add some movement or effects to all of my spin around animations.

I usually make those spin around animations in Blender. Adding movement in Blender is really complicated because I don't have much experience of it. But I have experience from Unity so I know how to make movements and effects like fire in Unity. So from now on I will make all spin around animations in Unity - not Blender - unless of course they are high poly models you can't import into Unity. Why not? The models are for Unity anyway so why not show how they look in Unity?

After some research I came to the conclusion that the easiest way to make a spin around camera animation in Unity is by using Cinemachine. I had no experience from Cinemachine so I had to learn it but it was kinda easy - you just import the Cinemachine package. Then you add a Dolly Camera with Track to your scene, and then you animate the camera to move along the track how many spins around the model you need. To make a video of the animation you can use Unity's Recorder package.  

So what effects can you add to make your boring animations more interesting to watch? One good talk on the subject (it's extra good because it's just 16 minutes long) is a video where they show how to take a very boring game concept and make it more interesting by adding for example camera shake.

I recently made a very boring garbage container game asset for Tesla Simulator. The plan was to make a spin around video of it and put it on YouTube. But who would watch a spin around video of a garbage container? Maybe they would if I added some juice to the animation:

So from now on make sure to juice up your boring animations and get them likes!

January 1, 2022

Books I read in 2021

0 comments
Each year I write a list of books I read during the year. This is the 2021 list:
  1. Grokking Deep Learning. Someone told me that this would be an easy introduction to Deep Learning. Apparently easy within the AI field means hard. The problem with the book is that includes a lot of uncommented Python code so sometimes it's a little difficult to figure out what's going on. BUT it is including code, which makes it easier to learn the theory of modern Neural Networks, such as CNNs and RNNs. 
  2. Introduction to Neural Networks with Java. Is an "old" book on Neural Networks so the word Deep Learning can't be found. Because of its age it includes Neural Networks that are not so popular today, such as Hopfield Networks and Self-Organizing Maps, but also the traditional Feedforward Network.  
  3. Head First Design Patterns. Design Patterns are common solutions on how to best organize code. Another good book on the topic is Game Programming Patterns which includes some of the same patterns but also other patterns.  
  4. Cryptonomicon. Is a mostly made up story set in both World War 2 and in modern times (~2000s). You should read it if you are interested in code breaking (Alan Turing plays a small role as himself).  
  5. 13 Hours: The Inside Account of What Really Happened In Benghazi. There's a movie with the same name and if you've seen the movie then the book covers the same events but there are more details added here and there. 
  6. Dr. Space: The Life of Wernher von Braun. Biography on the guy responsible for the World War 2 V2 rocket and later the Saturn V rocket that launched the spacecraft that would land on the Moon. 
  7. Saving Bravo: The Greatest Rescue Mission in Navy SEAL History. Tells the story of a very important aircraft navigator who crashed during the Vietnam war. Several people were killed during the rescue attempt, so the book is also trying to answer the question: how many people is it worth to save one man.  
  8. Spitfire Stories: True Tales from Those Who Designed, Maintained and Flew the Iconic Plane
  9. Fundamentals of Vehicle Dynamics. Is considered a classic book on the topic how cars work. It's easy to read even though you have to translate from the imperial system to the metric system to understand what's going on (unless you are into the imperial system). It was written in 1992 so it's a little outdated (you can't find a single sentence on electric vehicles) but some of the basics never changes, so you should read it before you start reading a more in-depth book.
  10. Go Like Hell: Ford, Ferrari, and Their Battle for Speed and Glory at Le Mans. If you ever saw the movie Le Mans '66 (aka Ford v Ferrari) with Matt Damon and Christian Bale, you know what this book is about because it inspired the move. I said inspired because the movie took some liberties to change what actually happened.  
  11. I Invented the Modern Age: The Rise of Henry Ford. Tells the story of the vehicle company Ford and the man who founded it. It ends where the book "Go Like Hell" takes over.  
  12. Iron Dawn: The Monitor, the Merrimack, and the Civil War Sea Battle that Changed History. Tells the story of two famous, innovative ships that fought a series of shorter battles during the US Civil War. Is also including a shorter biography on a fellow Sweden, John Ericsson, who was the designer of one of the ships.   
  13. The Right Stuff. Tells the story of Americas first astronauts - not the ones who landed on the Moon - but those who flew the first rockets into space, so it ends in the middle of the 1960s. This one was really funny to read because the author has a sense of humor.
  14. Liftoff: Elon Musk and the Desperate Early Days That Launched SpaceX. This is a book mostly about the Falcon 1 rocket - the author has squeezed Falcon 9, Starship, self-landing rockets, and astronaut missions into one chapter. The book is not including what Elon Musk was up to before SpaceX, which is good because that story has been told a million times.    
  15. The Dream Machine: The Untold History of the Notorious V-22 Osprey. Tells the story of the Osprey, which is tiltrotor that can land and takeoff vertically like a helicopter and then rotate its propellers to fly faster than a helicopter. It turned out it was tricky to build it (many people died). 
  16. One Soldier's War. Written by a Russian solider who participated in the Chechen wars.
  17. The Last Rhinos: My Battle to Save One of the World's Greatest Creatures. One of my favorite books is The Elephant Whisperer. The same author has written this book and it's equally good. It tells the story of how the author is trying to save the last of the "Northern white rhinoceros" which despite the name is actually gray.   
  18. First In: An Insider's Account of How the CIA Spearheaded the War on Terror in Afghanistan

January 1, 2021

Books I read in 2020

1 comments
Each year I write a list of books I read during the year. This is the 2020 list:
  1. Historical Study: German Tank Maintenance in World War II. Available for free!
  2. Physically Based Shader Development for Unity 2017: Develop Custom Lighting Systems
  3. Omaha beachhead. Omaha beach was one of the beaches where allied forces landed during D-day. It turns out much more happened than what was seen in the movies. Available for free! 
  4. U.S. Army Engineers, 1965-1970. Available for free!
  5. The Volunteer: The True Story of the Resistance Hero who Infiltrated Auschwitz
  6. Predator: The Secret Origins of the Drone Revolution
  7. The Art of Fluid Animation. Written by a guy who developed a real-time implementation of the Navier-Stokes equations called Stable Fluids, which is actually a simplified version of the Navier-Stokes but in the end he compares the results with real flow and they are similar.
  8. Disney's Land: Walt Disney and the Invention of the Amusement Park That Changed the World. Tells the story of how Disneyland was built in less than one year.
  9. Stuka Pilot. Written by a pilot who flew a Ju 87 "Stuka" dive bomber during World War 2.
  10. The Devil in the White City: Murder, Magic, and Madness at the Fair That Changed America. Tells the story of the 1893 Chicago World's Fair: how it was designed, built, and operated. It also tells the story of a mass murderer who killed visitors to the fair.
  11. The Ghost Map: The Story of London's Most Terrifying Epidemic - and How It Changed Science, Cities, and the Modern World. Tells the story of a cholera outbreak in 1850s London - you can find some parallels to the corona outbreak.
  12. Architects of Intelligence: The Truth About AI from the People Building It. Is a collection of interviews with people who are involved with the latest Artificial Intelligence algorithms, including Deep Learning.   
  13. Other Minds: The Octopus, the Sea, and the Deep Origins of Consciousness. Is a book about the octopus. 
  14. Outnumbered: From Facebook and Google to Fake News and Filter-bubbles – The Algorithms That Control Our Lives. This is not a math book - it's a book everyone can read who's interested in the algorithms used by Facebook, Google, Amazon, etc. 
  15. The Elephant Whisperer: My Life with the Herd in the African Wild. The author, Lawrence Anthony, adopts a herd of elephants to his so-called game reserve, which is a large area of land where wild animals live safely and tourists can come and watch them. The book is not just about the elephants, but also about the general life in a game reserve.
  16. Thunderstruck. Tells the history of both the wireless telegraph and a murder that took place in London. Is written by the same guy who wrote "The Devil in the White City" which was also about a technical achievement and a murderer.  
  17. Erebus: The Story of a Ship. Written by a member of Monty Python, this book tells the story of the ship Erebus which explored the south- and north pole during the 19th century. If you ever saw the television series The Terror (season 1), you have already seen the ship Erebus and her sister ship Terror.
  18. Vengeance: The True Story of an Israeli Counter-Terrorist Team. Tells the story of what the Israelis were up to after the Munich terrorist attack. If you saw the movie Munich by Steven Spielberg, it's based on this book.     
  19. Game Programming Patterns. Is a free book with common design patterns used in games. These are really useful as your game project grows. It was the second time I read this book and I still learned a lot so it's really useful. 
  20. Level Design In Pursuit of Better Levels. Available for free!
  21. Six Days of War: June 1967 and the Making of the Modern Middle East. Tells the story of a six days long war between Israel and its neighbors. Half of the book is about the history of the region before the war. 
  22. Calculus Made Easy. Gives you a brief repetition of calculus which may be useful if you forgotten one or two things since you where in school. Is available for free!
  23. Wizard: The Life and Times of Nikola Tesla: Biography of a Genius. A biography on Nikola Tesla. 
  24. Sid Meier's Memoir!: A Life in Computer Games. Is written by the creator of the famous Civilization computer game series. 
  25. Sapiens: A Brief History of Humankind. Tells the history of where humans came from. It also includes discussions on religion, technology, and the meaning of life. 
  26. Homo Deus: A Brief History of Tomorrow. Is the follow-up book to "Sapiens." The author argues that we have solved humanity's major problems, such as hunger, war, and medicine. In the future humans will instead create technologies so we can live longer, be more happier, and have more power. But if that happens will we still be members of Homo Sapiens, or will we be categorized as a new species: Homo Deus? 
  27. Red Phoenix. Tells the story of a fictitious war between North- and South Korea. 
  28. Brief Answers to the Big Questions. Stephen Hawking is trying to answer questions like: "Is there a God?," "Is there other intelligent life in the universe?," "Will artificial intelligence outsmart us?"  
  29. Hue 1968: A Turning Point of the American War in Vietnam. The battle of the city Hue can be seen as Vietnam's Stalingrad. Is written by the guy who wrote Black Hawk Down.   

In Swedish:
  1. Berg-och-dalbanan: jakten på den heliga G-kraften. A book about roller coasters from a Swedish perspective.   

April 22, 2020

Why you should use GitHub

0 comments
GitHub is one of many services where you can upload your code for version control. The basic idea behind version control is that code projects tend to become big and messy and version control makes the project less messy - especially if many people are working with the same project.
I think it was last year I really started to use GitHub for my code projects. I had several years earlier tried to start using GitHub but I stopped because I think I felt GitHub was confusing to use and I didn't really need it. But last year I found Sourcetree which is making GitHub less confusing to use (you don't have to memorize git commands). I also learned that GitHub has started to allow free private repositories - when I first started using GitHub all code had to be available free to everyone which is obviously not good if you are working on secret projects. So now I've put almost all my code on GitHub.

If you are working with a team then you almost always need to use GitHub or some similar service. But why should you, as an individual user, use GitHub?
  1. Backup. It's never fun when your computer crashes and your projects disappear into the darkness. To backup your projects you can copy-and-paste them into some backup software like Google Drive och Dropbox. This is working fine but can be a little annoying if you make many updates. With GitHub you can backup your projects with just a few clicks. You should still use another backup method because you can't trust GitHub - there's always a small probability that they will mess up and your code is gone forever, so it's always better to be safe than sorry. 
  2. Easier to experiment. Let's say you want to experiment with an idea you have and this idea involves deleting some code. Now deleting code for experimental purposes is never good because the experiment might fail and then you have to recreate the deleted code. With GitHub you can start different branches, which will split your code into branches and you can easily change between each branch to compare the experiment with the original code. If you are not happy with the experiment, just delete the branch.    
  3. You don't need to be tech support. What I've done lately is to publish some of my Unity tutorials on GitHub. I earlier had this pedagogical idea that people will learn more if they read the tutorial instead of copy-and-pasting from GitHub. But people will sometimes fail, so they will e-mail you and you have to spend time trying to solve their problems. It's also much easier to update code through GitHub than to update the code you earlier copy-and-pasted into html. So publishing your tutorial code on GitHub will save you time and energy.
  4. Free marketing. Something I realized after putting my code on GitHub is that people also found my code through GitHub's search function - they didn't come just from the original site. GitHub has a small, but still adequate, analytics page where you see from where people found your code. So if you want people to find you code you should put it on GitHub because it might be difficult to make people find your code by just making your original site rank higher in the search engines. And if you link your Twitter account from GitHub you will also get a few extra Twitter followers! 
  5. People will test the code for you. GitHub has this function where people can easily report issues with your code, which is really good because it might be difficult to test the code on your own.  

So how can you start learning GitHub with Unity if you have no idea where to begin? I think this tutorial is a good start: Using Git with Unity Tutorial [2019]. It will teach you how to use GitHub with Sourcetree. Atlassian, the creators of Sourcetree, has also created this online course: Version Control with Git, which you can go through in a few hours and it will teach you a little more than just the basics.

If you are interested in visiting my GitHub account you can find it here: github.com/Habrador

January 1, 2020

Books I read in 2019

0 comments
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.