June 27, 2014

Skunk Works - or how to not waste taxpayers money

0 comments

Skunk Works: A Personal Memoir of My Years at Lockheed is a 20 year old book written by Ben Rich, who used to be the head of a mysterious small company called Skunk Works. You might now have heard of the company, but you have probably seen images of a one of their famous products: the F-117 stealth fighter

The history of the Nighthawk, as the F-117 is also called, began almost by accident. This was during the Cold War and one of the engineers at Skunk Works had found a report related to stealth technology written by a scientist in the Soviet Union. No one but the engineer at Skunk Works had cared to read the report and the content of the report described how to use equations to optimize an object's surface so the radar can't almost see it. These equations were complicated and the reason why the Nighthawk is so "squary" is because the computers couldn't make the calculations needed to create a more smoother surface. Modern stealth fighters are more smooth because modern computers have more power.

The book Skunk Works is filled with similar stories, not only by Ben Rich but also by pilots and government officials who were related to Skunk Works and their products. Another interesting fact about Skunk Works is that they always tried to not waste money. Other government funded companies have a tendency to spend more money because they know they will get more money from the government (tax-payers) if they need it. Someone who also tries to minimize the money received from the government is Elon Musk. I used to write a biography about Elon Musk called The Engineer: Follow Elon Musk on a journey from South Africa to Mars, and I discussed the topic there. Elon Musk said: 
"If you were sitting at an executive meeting at Boeing and Lockheed and you came up with some brilliant idea to reduce the cost of Atlas or Delta, you'd be fired. Because you've got to go report to your shareholders why you made less money. So their incentive is to maximize the cost of a vehicle, right up to the threshold of cancellation."

But Skunk Works, who was a part of Lockheed, always tried to optimize their costs - but it wasn't always easy. Ben Rich discusses it in the book and he realized that the government didn't have an account to where Skunk Works could send the money they didn't need anymore. Unknown exactly why - maybe no other company had ever tried to return money before? 

Another waste of money Ben Rich discovered is related to the spy plane SR-71 Blackbird. The original name of the plane was actually RS-71, but when the then US President Lyndon B Johnson revealed the plane to the press he said by accident SR-71 and not RS-71. Lyndon B Johnson was apparently a stubborn man, so instead of publishing a small correction he forced Skunk Works to change the name of the plane to SR-71. 29000 blueprints needed to be changed and it wasn't cheap to do it.  

June 8, 2014

How to make tank tracks in Unity and Blender

2 comments
What we are going to achieve here is this:


How do we make tank tracks in Blender and Unity? One part of the problem has already been answered in a Russian tutorial, but you can translate it with Google translate, or follow the links below.

Unity3D tank tutorial Part 1
Unity3D tank tutorial Part 2

Unity3D tank tutorial Part 1 (translated)
Unity3D tank tutorial Part 2 (translated)

In the Russian tutorial you will learn how to import a tank model in Unity and how to make it move. I don't know if it's the ultimate solution, but it's a good starting point. It uses the simplified version of tank tracks - a solid mesh that symbolizes the track and then the texture is animated so it looks like the track is moving. The other version, to model each part of the track and then join them together, will produce a more realistic track, but your computer will probably burn up from the calculations.

The problem with the Russian tutorial is that it assumes we know how to make the track itself. Well, I didn't and it took a while to figure out, and I thought it would be a good idea to share my new knowledge. We are going to use Blender to make a tank track that fit the Russian tutorial - and we are going to do it with bones. It is assumed that you have some knowledge of Blender.

Step 1. Import your blueprints and model something that looks like a tank.


Step 2. Draw a curve that symbolizes the track.


Step 3. Draw one cube (the size of the cube will determine the resolution of the track) that will be modified with two modifiers. The first modifier is an array modifier and the other is a curve modifier. The cube will now look like a track but is not connected so before you move on you have to connect the track so it becomes one solid shape. 


Step 4. Add bones to the track and position them so they originate from the center of the wheel to make it easier to move them in Unity. You also need to add a "surplus" bone where we are going to assign the vertices that don't belong to anywhere else.


Step 5. Connect the bones to the track and assign vertex groups to each bone.


Step 6. Weight paint the vertex groups so that the outer vertices are not moving as much as the vertices that are closer to the center of the wheel. It's important that each vertices has a total weight of 1. So the vertices connected to the left/right of the "outer" wheels have also to be connected to the "surplus" bone that we added before, or Blender will automatically give them weights of 1 and it will mess up the simulation.


Step 7. Mirror everything, export to Unity, use what you've learned in the Russian tutorial, and the result will hopefully look like this:

June 1, 2014

Tesla Motors Test Track Simulator

0 comments

When you are developing a car you have to test it. Most auto manufacturers have built their own secret test tracks where they can test their cars by exposing them to various physical demands. Tesla Motors is no exception and their test track is located behind their factory in Fremont, California. They inherited it from Toyota Motors that owned the factory before Tesla Motors bought it a few years ago. So if you look at the test track through Google Maps, you will see Japanese signs, they are driving on the left side of the road, and they are using kph and not mph. But that has changed now since Tesla Motors took over the track. 

Since I'm developing a Tesla Motors Simulator I thought it would be interesting to learn how to develop a racing track, so I decided to add Tesla Motors's test track to the simulator. There are a few images available here, and I could use Google Maps to get the overall shape of the track in Blender before I exported the track to Unity. This is the result:







Looks interesting? You can test it here.