Thursday, September 2, 2010

Big Bang On Religion

There has been recent news about Stephen Hawking making the claim that it was not God’s doing that created the Big Bang. He believes that since gravity exists, it is a perfectly good cause for the creation of the universe from nothing. Now, I’m not going to sit here and try and argue against one of the most prominent astrophysicists of our time, but I can’t say that he’s necessarily right.

First, I’d like to remark on those of faith who would say that the universe necessarily had to be created by someone of a greater power. If it is your faith that this be true, then that is perfectly fine in my book. I personally am skeptical of either answer. It’s really impossible to prove, so believing either side is still a matter of faith.

What I wanted to talk about, though, is the idea of infinity. Those of faith believe God is infinite in time, space, and knowledge. When asked how this could be possible, the response is usually that God is a mystery that we can’t even begin to comprehend, and should we come close to understanding, how head’s would explode like a watermelon strapped with C4. Why, then, is it impossible to accept that the universe could possibly be infinite in time. If it’s ok to accept that nothing created God, then why isn’t it acceptable that nothing created the universe? It’s an insanely incomprehensible concept either way, but this is the reason why I would accept both sides of the argument.

Aside from that, there was commentary about the Stephen Hawking statement that said that it was a dangerous statement to make. The commentator claimed that Hawking was forcing people to make a choice between religion and science, in which case most people would pick religion. That statement really rubbed me the wrong way. I don’t see it as forcing a choice at all. There is always a compromise to be made between the two. The compromise has over the years shifted drastically toward the side of science, but there is still plenty of give and take to be had. One of my coworkers made a good comment on this when we were discussing it. He said that religion and science don’t necessarily even exist in the same realm. They are tools to explain different things and don’t actually intersect a lot of the time.

Friday, August 6, 2010

Digital Marketing

We’ve reached an interesting age as far as marketing and sales. When you are sold or given something in person, we are very accustomed to turning things down. We say, “No thank you,” and walk away without another thought. We might even vehemently be against being sold something that we don’t want; throwing a fit that someone could be bold enough to try to sell you something. Think about all the offers a place like Gamestop makes you when you go to buy something and you’ll realize how annoyed you were after the fifth offer.

Now that’s something that’s been going on since the beginning of society. Think back to the bustling markets where salesmen would bark their wares at people. The interesting new age we’re in is in digital marketing and sales. We’ve started to actually flip which side of the coin we’re on. We start saying yes to things just to get a process over with or to make something go away. Installers are a great example of this. It’s practically an epidemic of useless packaged software. Everything is defaulted to saying yes so unsuspecting users end up with an exorbitant amount of programs or features that they would never need or even use.

There’s something about humans that makes them buy things they don’t actually need. That’s why there were men shouting in markets in the first place. They were hoping to sell something to someone who didn’t actually need it. It’s not to say that they weren’t successful, but right now, the chance of success if growing. People are growing accustomed to saying yes, and it’s somewhat frightening.

It gets worse. Companies are now collecting our credit card information and saving them for future purchases. We’ve reached a point where unsuspecting individuals accidentally say yes to pay money for something they might think is just another random piece of free software. You might be thinking that they get what they deserve if they’re not paying attention. The point is that it’s hardly even their fault these days. People get bombarded with information that it can sometimes be hard to pay attention to everything.

Friday, July 9, 2010

Society Regresses

In Ancient Rome, they held gladiatorial events at the Coliseum. Murder was a commonplace event that the crowd cheered for. In this day and age, we like to think that we’ve become more civilized since then. Yet, on a daily basis we see death and destruction. What’s worse is the fact that if the culprits aren’t brought to justice and their ultimate demise, there are those among us that are not satisfied. Have we really come that far from the days of the Coliseum?

A suicide bomber reigned down terror in a tribal region in Pakistan killing over fourty. Some will claim that those in the region are nothing but uncivilized animals. “They know nothing but killing,” I hear. I make the claim that we are no different. Police officer accidentally shoots a suspect in the back, killing him. I am not here to defend this officer. He pulled a gun, claiming that he thought it was a tazer. How you could make this mistake is absolutely beyond me.

Put on trial, he was convicted of accidental manslaughter. The spectators at the Coliseum were quite unhappy with this judgment. They call for the thumbs down for Caesar. The crowd, those who consider themselves the enlightened few in California, started rioting over the fact that the officer was not given a harsher conviction. A society that claims to value life regresses to Hammurabi’s code, calling that we take an eye for an eye or else we shall destroy the cities we live in. The livelihoods of business owners completely destroyed is somehow a valid response to officer’s sentence. We still have a long way to go before we can consider ourselves civilized.

Saturday, June 19, 2010

Patriotic Competition

President Obama made his first speech to the nation from the Oval Office this week and his closing remarks made me think. He discussed that lawmakers must push for energy reform the in the US and inaction will cost us, and the environment, more in the long term than it could possibly in the short term. Obviously, it’s going to be tough and it could end up being just hot air, but it really struck a chord with me. Given the US’s constant desire to be the best, I feel like the US could lead in clean energy if we push hard enough.

However, this feeling of pride in the US’s desire to be the best was recently challenged. It was the attempt of others to show that my pride in my birthplace is not just pointless, but actually counter-productive. I was told that we should be trying to worry about it globally, making sure everyone is advancing rather than just our home country.

While there is some truth to this, the fact that my pride of my homeland was challenged bothered me and I wondered why. Not only did I wonder why I was bothered, I wondered why I had pride for where I was fortunate enough to be born, since it was just random luck to be born here. Then I realized that being proud of anything is the same concept. Everything in this world is random chance. The world is chaotic in nature, therefore everything you could possibly be proud of came about by random chance. If you’re an artist and you’re proud of it, then you’re proud that your brain was randomly wired a certain way.

Now that I was assured that being proud of my fortune wasn’t actually silly, I wondered what exactly I’m proud of. I realized that, more than anything else, I’m proud of what this country was founded on and what this country means to the world. I wouldn’t be alive if this country wasn’t what it is. My family comes from literdally two ends of the planet and yet they came together here because they felt the US was a better life than what they had. I am part of a country with an enormous immigrant population and a large amount of immigrants their families have gone on to do amazing things in this country because of the resources and the ability to be great if you work hard. I am proud of that.

Friday, June 11, 2010

Tangent Space At A Quick Pace

It is amazing when you finally have all the pieces of a puzzle click right into place. This is a post for the techies; all the other kids can follow along if you want. Kiyome and I have been working on some graphics research lately. The latest concept we’ve been tackling is normal maps. Just like there is more than one way to slap a misbehaving husband, there is more than one way to implement a normal map. You can either slap him in the arm, which is somewhat effective and may more may not get him to stop whatever he’s doing, or you can slap him right across the face and leave a big red imprint, effectively shutting him up for a while. For normal maps, you can either have your map be in object space, that is the reference frame based on the object’s orientation, or you can have the normal map be in tangent space, which is the frame based on the surface of the object.

We chose to go with slapping the husband straight across the face. This method is somewhat involved in the fact that you have to understand what the tangent space really means and what it means to transform vectors into tangent space. When I set off to do this, I went in armed with a very brief, maybe twenty minute introduction into tangent spaces from two years ago. For those of you who are still wondering, yes this does mean I went in without really knowing what I was wondering.

Simply applying the sample code we found produced results that had the sort of normal map effect on it, however there were major errors. First of all the light looked like it was in the totally wrong direction, but even weirder is the fact that the light was bounces off of spots on the tortoise that didn’t make any sense.

Our first thought was that the normal texture must’ve been wrong. We went into Photoshop and together inspected the properties of the normal map. We attempted altering the color components of the normal map in vein. This is where that note about not understanding what I’m doing comes into play. I will explain later why altering the texture makes no sense and has barely any effect.

So after some tweaking and coming up with ideas to debug the shader, the program that does the drawing, I realized that our light vector, the vector from the vertex, a point on the surface, to the light source, was being transformed in the reverse order from the other transforms in the shader. When I reversed it, it seemed to produce far better results. At first I thought it might have actually been correct.

I moved on and added in a feature to move the light around the model to see how the light acts as is goes across. Unfortunately, the light was moving in a very weird direction with respect to how the light moved without the normal map. This of course set off red flags leading me to believe that we were still wrong. It got worse when I realized that the light was actually still highlighting areas that it shouldn’t.

I decided to try toying with values in the pixel shader, this is the shader that does the per pixel calculations onto the screen. I’d like to make a brief note. In the pixel shader, the normal and light vectors are in tangent space. So then I started thinking about what it means to alter a value in tangent space and I realized that it’s impossible to alter a single component to produce a meaningful effect for the entire model because this is tangent space. This is the reason why it didn’t make any sense to alter the normal map, since the normal map is tangent space vectors. You see, in world space, the space whose reference frame is the same for all objects in the world, a normal vector can go in any direction, and changing something like the X component will tweak the component across the entire model in the same way. However, in tangent space, most normals are actually in the Z direction. Negating the X component usually has no effect, but also it is completely dependent on where on the model that particular tangent space is.

So then things started really clicking. What it meant to transform from world space into tangent space in particular was a really important piece of math that I needed to understand. The reason why the light vector operation was reversed was because the tangent space matrix was a matrix that goes from object space to tangent space. Since the light vector was in world space, I needed to transform the light vector by the inverse of the tangent space matrix.

So the light vector was now correct as far as the math is concerned, but I was still not getting proper results. So I decided to take a look at the tangent space matrix. The matrix is composed of the Tangent, BiNormal, and Normal. The Normal is a vector sticking straight out from the point on the surface. The Tangent is a vector perpendicular to the Normal, and is tangents the surface. And the BiNormal is the vector perpendicular to those two. These three vectors create a space.

There is a necessary operation here though. These three vectors come into the vertex shader, the drawing program that handles the points on the model that create the overall shape of the model, in object space. It is the job of the vertex shader to transform these three vectors into world space. You might think to just apply the world matrix transform to these vectors but there’s a final piece of understanding that I knew but didn’t apply until now.

You see, when you transform the surface of a model from object space to world space you use a world matrix to orient, scale, and move the surface. However, the tangent space of the surface cannot be transformed the same way. There is a theorem and proof that shows this better than I could ever explain so either trust my words or go look it up.

Even though I had known this, my false notion that you didn’t necessarily need to apply this came from the fact that I had been learning a lot of HLSL, high level shader language, programming from DirectX samples, and DirectX samples don’t seem to ever follow this rule. What the reason is I will never know, but that doesn’t really matter all that much. Once I applied this bit of knowledge to my own shader and transformed the basis of the tangent space by the the transpose of the world matrix, everything finally came into place. The light was finally moving across the model properly. The higher detail was apparent in the model, and there were no strange artifacts due to things being lit improperly.

Monday, May 17, 2010

Sick of Oil Slicks

I’d like to take some time now to vent some rage at the oil industry. Hopefully by now, everyone knows what’s going on in the Gulf of Mexico. I’ve started to wonder if they have heard of Murphy’s Law. The explosion was just one of the ramifications of the lack of precautionary measures. What makes matters worse is they seemed to have thought nothing could ever go wrong. They never even considered what might happen if a rig sank and broke the pipe? Oh right, they only thought as far as the preventer clamping down. There was no question about what happens if the preventer doesn’t work. No researchers working on backup plans. That’s right, that would cost money, and those CEOs need more boats. Well I hope those boats are made to drive through oil slicks.

Another interesting thing is the fact that BP, British Petroleum for those of you who are wondering, has this many truckloads of cash to throw at the problem. They are sinking millions upon millions of dollars into dispersants, technology, boats, fines, etc. In my mind, this is one of the few positives that came out of this whole thing. The oil industry opened its eyes to the fact that they’re not indestructible, and they have to invest in preventative measures. Fortunately for everyone else, BP is a catastrophe guinea pig and is forcefully on the forefront of testing solutions. Unfortunately for everyone though, BP doesn’t actually have any scientists to run these tests, or so it seems.

Look, their crazy dome idea didn’t work because the temperature and pressure at that depth caused icing and other problems with caused a clog. I feel like if there was anyone who knew anything about physics or the ocean would be able to call this out. What are the meetings for these solutions like? Have you heard what they’re trying now? As of this writing, Monday, May 17, 2010, the latest idea I heard they’re trying is to shove tire pieces and, wait for it, golf balls. Yes, you read right. Tire parts and golf balls to plug the pipes while they work on their cementing solution. Again, science seems to be a missing element here. Last night I read they were able to stick a tube into the pipe to start siphoning oil, so that’ll slow down the spill a bit, but something tells me that’s not going to work out that fantastically.

To piss me off even more, the CEO of BP was discussing the spill and ramifications. He noted that his job was on the line in this. I’d certainly hope he is forced to leave after this catastrophic blunder. Honestly, I’d like to see him sent to prison. That’s a bit extreme, I know, but this could have been prevented. It’s ridiculous that so many things could fail in order to cause an unstoppable spill. So I say put the man in the stockade at the beach. Cover him in bread or something so the seagulls attack him. Post it on YouTube, show the world what wildlife revenge is like.

Tuesday, April 27, 2010

Military Troops

I used to naively think that most soldiers fought for money and country and didn’t really care about the missions they were sent on. I’m not sure why I thought that really. I guess I’ve seen too much propaganda about kids being pulled into the military from poor neighborhoods where people can’t really afford college. It is incredibly evident that those men and women on the ground are more interested in making a difference in the grander scheme of things.

I guess some of my thoughts came from the differences between World War II and the Vietnam War and the similarities between the Vietnam War and the War in Afghanistan and Iraq. In WWII, soldiers joined because they were fighting a concrete enemy that was threatening to take over the world. In the Pacific theatre, marines prevented Japanese takeover of Australia and liberated the island nations that Japan laid claim to when the empire expanded. In Europe, army forces liberated most of Europe from German rule. Soldiers were greeted with cheering crowds and were constantly reminded that what they were doing was achieving tangible results.

In Vietnam, it was unfortunately a very different story. Soldiers were surrounded by people who most certainly did not want them there. It was impossible to know who was an enemy and who was a friendly face. Tangible results were completely non-existent. If soldiers had gone there thinking they were making a difference, this idea was most certainly lost very quickly. I saw a documentary last night about the massacre at My Lin. There were hundreds of non-combatants that were slaughtered. Anything that moved was hunted down and shot. It happened because the soldiers were completely furious and in hunt of enemy forces. They thought they finally found an enemy strong hold. They were ordered to shoot anything that moved. One of the soldiers explained, “If anything moves, shoot it. If it is a building, burn it. If it grew, destroy it. If it was alive, kill it.” It ended up being a peaceful village, full of women and children, that was completely wiped out. These things aren’t done by soldiers who felt they were there to help the people or to make a difference. These atrocities are done by soldiers who only want to get the mission done and get out.

The reason why I thought this mindset would continue is the fact that there are similarities between Afghanistan, Iraq, and Vietnam. The thing is though that while a lot of people didn’t really want Americans there, there is still a lot of good that those soldiers are doing. I read a story in time magazine about Captain Ellis trying to rebuild a school in a town not far from Kandahar. The Canadians had built the school, but Taliban forces had driven them out, broken all the windows of the school and placed mines and IEDs across it so that no one could even step foot in it. And the difference here is incredibly apparent when the villagers appreciate seeing their children being able to learn how to read and write. They were appreciative of the soldiers’ efforts to rebuild the school. It’s a reminder of a long time ago when a soldier’s purpose in the grand scheme of things was actually apparent. I’m reminded of how beautiful it is that these men and women serve and I am very appreciative of it.

Thanks Guys.