Showing posts with label personal. Show all posts
Showing posts with label personal. Show all posts

Friday, March 6, 2009

The Big Move!

The response to the interviewing article went really well! I got a lot of great comments about it and am really glad I was able to give back a little by contributing a piece like that. Hopefully I'll find some time to write more articles like it in the future.

So the past few months have been pretty interesting for me. A few months ago I made the decision to leave Destineer to work for id Software. They're a great company and everyone there is absolutely awesome but I just could not pass up the chance of a life time to work at the company that got me excited about computers and games in the first place! They were all incredibly understanding and I truly wish them the very best. Trust me when I say they're working on something really amazing and I'm very excited to see the final result!

So outside of that I've been keeping pretty busy. While looking for some code to generate cubic noise maps (as part of a series of new experiments I've been working on to generate spherical terrains) I ran into my old starfield generator which generates random points and "blurs" them as they whiz by you. A very cool effect, especially when you consider how the points were generated.

When you generate random noise around a unit sphere you have to be incredibly careful to ensure that they are uniform, otherwise you'll see them gathering towards one of the poles as demonstrated here:


The problem lies in how spherical coordinates tend to congregate points towards the poles. To fix this problem you can use sphere picking to ensure any given area around the sphere contains the same number of points:
This may seem relatively trivial and unimportant for something like a starfield (which it is), but where it starts to really matter is when you need to generate random vectors for something like raytracing. I recently created an ambient occlusion generator for heightfields and ran into an issue where the sampled values where resulting in way to many false positives than they should have been. As I'm sure you can imagine, the issue is pretty obvious; most of the generated rays were going straight up, and heightfields by definition do not have overhangs for those rays to hit!!! The simplest solution is to scale the generated rays up value so they go more towards the sides (which helps quite a bit), but really the best way to do it is to properly generate the sampling rays around the unit hemisphere uniformly. By doing this I was able to get away with using a lot less rays for fantastic looking results!

I won't bother to provide the full algorithm here but if you're interested, check out this page: Sphere Point Picking.


So as I mentioned I've been doing quite a bit with terrains. Unfortunately I don't have much to show as far as screenshots as it's been mostly experimental type stuff to learn and get acquainted with new algorithms. After I finished the ambient occlusion generator I went ahead and wrote a lightmapper for fun (it wasn't that much of a departure) and started a survery of terrain shadowing techniques.

Shadow Mapping is a tried and true classic which can give some great results if you're willing to put a little blood and sweat into your implementation (ala CSM's, VSM's, TSM's, etc...). Lightmapping is nice but only works for static terrains and doesn't work so well for dynamic objects (though I know of some neat tricks to fix this). Ambient Occlusion works nice but only works for global indirect light (so is more complementary than comprehensive). Spherical Harmonics is an option but from my research doesn't always result in the best looking shadows.

One experimental shadowing technique I tried which resulted in some really nice soft-shadows is Ambient Aperture Mapping. The idea behind it is pretty novel and is similar to relief mapping but simpler. First, you generate your aperture values which consist of a bent normal; a vector pointing towards an un-occluded light source (i.e. the sky/sun/moon), and the aperture; essentially a circle at the end of the bent normal which defines how much light reaches that point (this value is similar to an ambient occlusion result and make the bent normal into a sort of cone). After you have these you can test any given terrain surface point's aperture against your global light source which has it's own aperture values. The intersection of these two apertures defines how much light reaches that surface point.

The results are surprisingly good! I may utilize this in full force the next time I need an efficient low to medium frequency shadowing solution with modest storage costs for terrain rendering. Here's a paper on it for your reading pleasure: Ambient Aperture Lighting, and a screenshot of their results:


That's enough for now. Until next time!

Thursday, October 2, 2008

D.R.M. S.U.C.K.'s

For the second time in just a few shorts months, I am NOT able to play a game I legally purchased... thanks to DRM. DRM (Digital Rights Management) is a system used to enforce that a game is not illegally obtained (i.e. stolen). Instead, again and again I'm finding that all it's doing is stopping people who have a right to the product they purchased to be able to use and enjoy it. If anything is killing PC Gaming, it's not Piracy, it's DRM!

I bought Spore the other day and for three days I was unable to play it, even though I could go right now and find a cracked executable to be able to run it. Heck, I can just go start downloading the torrent and within two days have the game as a whole. Come on EA (and other publishers like you), who are you really hurting here??? Myself and other paying PC Gamers, or the people who can get the game for free anyway, and more easily!? In addition to not even being able to run it now, once I DO get it working, I'll only be able to install it three times? No, not on just three machines, three installs, then I no longer own the game. WOW. And in addition to all that (yes, there's more), even though the manual says you are allowed multiple accounts per-install (so my Fiancee could have an account on my machine for instance), you're in fact only allowed ONE. What hubris! I still have my copy of The Sims that I bought, what, 8 years ago? And guess what, I've re-installed my copy at least 5 times since I purchased it, and both of us have been able to play it at different times. Can they really argue the top selling game of all time suffered from piracy so bad that it's spiritual sequel has to be so guarded!? I'm not the only one: 1 Star. Food for thought. On the bright side it looks like they're listening to reason and might change a few things for the better (i.e. adding deactivation so you could reclaim your installs), but it's still pretty sad it got this far.

Anyhow, life's been hectic in North Carolina. Starting work has been great and I really enjoy it so far. Destineer is a great company with a lot of great people. There's definitely a lot of great things to come from it in the future. Saturday is my birthday then next Friday I'll be up in New Hampshire to get married and man has it been crazy getting the last remaining details worked out.

I was finally able to get the Hexen Touch (Hexen for iPhone) source code up; here. If you're interested in iPhone development check it out. Disclaimer: The code is purely for learning purposes, is not at all supported, and doesn't represent the best quality possible. But it basically works so beggars can't be choosy. :-)

Time is short. Until next time!

Wednesday, August 13, 2008

Good things come in threes...

You know, it's amazing how life can move so fast sometimes. A lot of big things have happened to me in the past few weeks. To begin with, I've decided to pursue opportunities outside Firaxis. I really enjoyed working with everyone there (Sid Meier especially) on such an amazing franchise as the Civilization series but after careful consideration I decided it was time to move on. I learned a lot and am incredibly proud of my contributions and wish only the best for everyone there.

As for myself, I'll be headed to a young but ambitious company named Destineer Studios based in Raleigh, North Carolina to work on their console technology for a currently unannounced title. I'm fond of the area (my parents have lived there for years) and was incredibly impressed by everyone I met there during my interview. After a month of interviewing and multiple offers around the country, I decided to take a chance and go with a company I feel will really make a difference. The people at Destineer (and when I talk about I company, I really do refer to the people - I mean seriously, what else gives a company it's strength), are incredibly talented, enthusiastic, and friendly and I'm very glad to be joining the team. I'm sure to have many more great things to say about the new job and the move in the coming months.

So in addition to changing jobs and selling my house (in an amazing 1 week!), I just got engaged! We're trying to fit the wedding in within the next few months but we're not sure yet if that's going to be possible. We figure we can leverage the fact that we're doing all the most stressful things at once to reduce the possible stress later on, haha. Hopefully it'll all work out.

As I hinted at last time, I've been working on the iPhone on some pretty neat stuff. One of the things I finished was a port of Hexen for the iPhone. I plan on putting the source code online as soon as I find some time. It's a pretty straight forward port and runs really well. Thanks to my friend Rich Whitehouse for his help (the port is based on the work he had done for his Nintendo DS port of Hexen). In the end it was really fun and I learned a lot. It's quite surprising what the iPhone can do and I'm looking forward to doing some more work on it.

In addition to my iPhone projects I'm thinking of writing an article on effective interviewing techniques from the perspective of an interviewee. As I mentioned before, I've been through quite a number of interviews in the past month (something like 8-10), both over-phone and on-site. From this experience I've learned a lot about what an interviewer should and shouldn't do to both represent the company well and impress the applicant. While I've seen a lot of articles on how to interview as an applicant, it's just amazing how many mistakes are made by the companies interviewing and I think there's some good things to be said about improving the process. I have some idea's on what mistakes a company should avoid and some questions that should and shouldn't be asked. Hopefully I'll have more on this soon...

Lastly, here's some amazing stuff coming from ATI: WOW. The only thing is, 100+ MB a frame!? Hmm, maybe not so practical yet. Still, amazing that we're almost at the age of photorealistic gaming!

Take care everyone!