Sunday, October 28, 2012

Rendering fog without washing out colors close to the camera

Game devs: when rendering fog, you can avoid putting a haze all over your nice colors by using an equation like this one.  (If you look close at the curve, there is a small dip at the start.  If you take x as the distance from the object to the camera, and the height in y as the amount of fog, the dip at the start means that objects that are very close to the camera won't have too much fog applied and have their colors washed out.)  It works well in practice and gives you a nice range of darks and saturateds up close and ramps up smoothly without looking weird.  (Curve originally from John Hable's Uncharted 2 tone mapping presentation.)

Wednesday, June 8, 2011

I'd love some kind of video mashup playing in the background when I have to write the boring kind of code.  I want high res video from cool scenes around the world -- like crashing waves, or underwater footage, or even webcam views of different locations.  I don't want people talking in the videos or even sound because I can't code and do talking at the same time.  Just something to make me feel more connected to the world.  Being in a text editor is a bland, isolating experience.

Sunday, March 27, 2011

I was incredulous at this This American Life episode about a drug court judge in Georgia and indignant enough  to send judge Amanda Williams and the court my thoughts on the matter.

Sunday, March 20, 2011

It's fraudulent for an author to write a book about how to be financially successful if a large portion of their net worth came from sales of the book.  Legal, yes, but wrong.

(Rich Dad, Poor Dad comes to mind -- and what a confused mess of lessons he tries to impart.  It struck me that he didn't really understand what he wanted to teach.)

Friday, March 18, 2011

Panic at the Disco was streaming their new album for free on facebook, the catch was that I had to click "Like" on their facebook page to listen to the whole thing.  I wouldn't click on it because I didn't know if the new album is good or not, so I left the page without listening to any more.  I don't think they understand how facebook really works:  If I say I like something, I'm putting my credibility on the line.   My friends trust that I won't sell out my opinion or sell their information for a reward/bribe from some company.

Saturday, March 12, 2011

This algorithm does an f'ing gorgeous job of calculating normal vectors.  Ignore the wacky URL.

Thursday, March 10, 2011

Would a judge ever reduce a sentence if he thought there was a 97% chance a person was guilty and maybe 3% that he was innocent?  (Like for having mercy on this guy?)

Our justice system seems to be predicated on an all or nothing mentality, either 100% guilty with a penalty of 100%, or else innocent.

Wednesday, March 9, 2011

I subscribed to this guy's high frequency trading programming blog, but I have only mild curiosity about how it works.  Imagine that you did succeed in writing software that could purchase a security 10 microseconds before another guy: the time spent writing software to shave off microseconds could have gone to creating something beautiful or useful or entertaining for people.  And if the purpose of trading securities is to allocate capital to companies that make stuff society wants, it's hard to argue that a company would be harmed by getting its money 10 microseconds later.

Monday, February 21, 2011

You have to willfully not follow the logic to disbelieve evolution.

Monday, February 14, 2011

Good IRL UI

The telephone poles in the sidewalks on my run to the park in Fountain Valley are placed closer to the road than the wall.  It makes me choose the side furthest from the road to avoid the narrow width of sidewalk next to the street and so takes away the chance of a stumble onto the road as a car comes by.  I want to believe that someone planned this out on purpose.

Monday, February 7, 2011

An interesting question for people who don't support universal health care is at what cost they would support it.  If it was $10 per American per year to get universal coverage for everyone, I hope you'd have near 100% support.  Of course it gets trickier to decide this as the sums get higher, but I get the sense there are some that see having to pay for others as a moral issue.

Thursday, January 20, 2011

Beautiful quote

"At some point, self-confidence turns into a learning disorder."
--Lamentations on Chemistry

Monday, January 10, 2011

One reason Tron Legacy was not a good movie was because the world didn't have consistent rules. You couldn't tell what the limits of the characters were and so it felt like the characters could pull arbitrary super powers out of their asses when they needed to move the story along (e.g. the old guy suddenly causing a tornado at the end).

I always felt cheated at the end of DragonLance and Stephen King books for the same reason.

Tuesday, November 16, 2010

It would be cool if our planet was at the outermost edge of the galaxy, and that galaxy was at the edge of the universe, so all we'd see is blackness on one side of the sky but stars on the other.

Friday, November 12, 2010

Fox News and Comedy Central should make a deal to give Jon Stewart a half hour slot right after Glenn Beck's show and give Glenn the half hour slot after The Daily Show.  Jon could use the time to rebut what Glenn just said and vice versa.  It sucks that an entire channel can be a homogenous block of one ideology.

Friday, November 5, 2010

Hypothesis

Mountaineers that pose like badasses in their pictures are more likely to die. 

Tuesday, October 19, 2010

I sometimes think about this homeless man I've seen watching cars on the freeway in the evening.  When he was young and in school was he excited about the future?  Did he have a crush on anyone?  Did some girl have a crush on him?  Where did he lose the friends he had and wasn't able to pick up new ones anymore? 

Wednesday, October 13, 2010

At the end of a long day of hiking some months back, when I walked by I somehow startled a cow grazing by the side of the road and it took a bad step and then crashed down on its side.  The last thing I wanted to do was touch its filthy body, but I manned up and put my hands under it and pushed.  It started to move its legs wildly but the thing that stuck with me was the look in its eye, you could see the panic.  Its fear felt way too human to me and it disturbed me.

I wasn't even close to being able to lift it and it snowed that night.  I left a note on a rancher's trailer with the cow's serial number on it, but I don't know what happened.

Monday, October 11, 2010

A rule of thumb

Every website that purports to tell you the "truth" about some health supplement or a political candidate makes me expect the opposite, that their analysis will be biased towards what they want to believe and incomplete.  When they use truth with a capital T it's doubly worse.

Wednesday, October 6, 2010

Evolution is a Sherlock Holmes mystery where clues are lying around in large piles and crunch under your feet in every direction and the murderer periodically jumps out of the bushes and waves his arms at you frantically.