Saturday, July 26, 2014

Steerin' Behaviours


Still in the downtime between job contracts, so I'm spending it by learning new stuff and pretending to be an author. The later isn't going too well, but I have been making good progress learning more about steering behaviours!

It's great fun figuring out how all the forces react, maybe one day I can get to use it for some kinda stuff at work.

Monday, July 21, 2014

Logitech M310t review

So, this is a review about a mouse! XD

The previous mouse I was using, the Logitech M505 has been a bit unstable of late, the cursor gets very unresponsive, and I've definitely have freshly charged batteries. I still have my old microsoft mouse - which is the best - but sadly it appeared to have died from disuse :(

Went down to the nearest IT shop, and I was frankly quite amazed to see one of the 4 walls covered with mice. A quarter of it appeared to be Microsoft, another quarter Logitech, and the last half heavily contested by various gaming mice, together with the brandless mice.

I must say the gaming mice were really tempting, and the entry level contestants weren't that expensive, but they were all wired. There were some wireless options, so my first instinct was: OMG MUST BUY COOL WIRELESS GAMING MICE.  Sadly, the reality was: CANNOT JUSTIFY WIRELESS GAMING MOUSE PRICES.

The prices were almost double what the M310t was, with the priciest wireless gaming mouse almost 200. Uh, no.

So then, that's out of the question. Next, to check out what I like to call "consumer" grade stuff. Yeah yeah, hit me, I used to be a gaming mouse snob. Anyways...

Lots of the wireless mice from logitech and microsoft were what I think would be in the so-called "travel" or "laptop" kind. Which means it's just a tad shorter at the back, but it's just enough so that the rear of my palm is always hovering in the air. Like when I was using the M505.

The M310t stood out from the pack simply because a) It was a full size wireless mouse b) It only required 1 AA battery, and c) it was affordable (SGD36). Win!

The packaging was also simple enough that I didn't cringe, and it was actually very easy to open. Great design Logitech people!

The mouse itself is great. Even with the battery in, it weighs almost as light as my now-dead Microsoft Mouse (It's the cheapest of the intellimouse series, and personally, I thought it handled the best). Has a little slot in the battery housing to stow away the usb dongle if it's not in use.

Other than that... it operates like any other mouse. It doesn't make tea or coffee, and it sure does not try to impress you with Quad Core CPUs or AMOLED displays. Heck, I doubt it even has a hipster commercial.

It's perfect for use with Houdini or Unity, and I really enjoy using it. Definitely something to consider if you have full sized paws like me XD

Saturday, July 12, 2014

Jos Stam's Stable Fluids

Finally, omg, after many years of wanting to implement this algo, I finally did it! The last few days were really good, I learnt lots, as well as figuring out what I don't understand, and where to focus my efforts.

For example, the advection of the density field it was quite eye opening to see how the reverse lookup worked, and then how the sampling is done by bi-linear filtering. On the flip side, the pressure projection I really have no idea what's going on. That, was utterly a black box for me. It has _something_ do do with the gradient of the velocity field, or so it seems, so maybe another look through the code would help.

It's been fun, perhaps I can find a simple sph simulation I could cobble together.

Friday, July 11, 2014

Gray-Scott Reaction Diffusion

Unity Webplayer link here :)

Reaction Diffusion has peaked my interest on and off, and I thought what the hell, since I was on a coding high, might as well take a stab at it. I followed this tutorial, which was marvelously well explained, and got it working very quickly.

Jerry Tessendorf's iWave in Unity

Interactive build for Unity Webplayer here.

It's one of those days when you get struck by inspiration, and I was like "OMG OMG! I must implement this in Unity". So I tried, and with some luck managed to get a version of it done. The source code was attached to "Simulating Ocean Water", which frankly, most of it I am puzzling over.

Adapting the code to C# was quite straightforward, however, there was a function used to generate a 13x13 kernel that utilized a j0() function. I was like.... was that some kind of typesetting error? Some googling indicated it was a bessel function. This does not appear to be part of C#'s math libraries, but it is for C/C++. Odd. Anyways, I found - after much searching - source code for the j() function in C that I adapted for C#.

Don't really know why this kernel was chosen, and I was wondering how different kernels like Gaussian would work. Something to explore another time.

The emission also uses a kernel, but only a 3x3 grid that I put in some pre-calculated values. A better solution really, would be to interpolate between positions. Now that I've figured out stuff like this, it's time to explore other stuff!

Friday, July 04, 2014

Descent: Freespace

It's one of those games where I could not play it because my machine back in the day didn't have the specs for it :(

So finally, after almost 2 decades, I got my grubby paws on it from gog :3 It reminds me totally of the wing commander series, even the same dragging-the-mouse-all-over-the-table just to catch an enemy dogfighter. Miss my saiteks.

Playing on medium, there were only a few missions that were annoying to win (recon mission in enemy fighter was one) and some protection missions, but thanks to the mission hints during the debriefing, it was not too difficult to win after a few tries. Overall, it was fun, almost an arcade experience.

For one, the spaceship you fly is really hardy. Starting out, there are no shields, but crashing at over 100m/s into a capital ship just gets some hull damage. With shields, the ship is able to take some serious damage, unless you just ignore the ships on your tail. I remember on xwing having to equalize or set the shield configuration and management all the time, here I mainly used the equalize, and for rare occasions, the boost front/rear shields.

The wingmen (is there a more gender neutral term? Wingpeople? Wingpersons? Those-who-follow-my-lead?) are really good, they are even able to respond to more intimate commands like Disarm capital ships (destroy enemy weapons), or Disable (shut down engines).

Combat, was really very wing-commander like. If not for kilrathi and unknown aliens I'd say this was wing commander. Missiles don't seem to track very well, I rarely see my missiles do proper damage like the guns, but on the flip side, it is quite possible to dodge enemy missiles with the afterburners together with the countermeasures. Even being hit by a missile doesn't seem to do _that_ much damage.

The storyline, honestly is quite straight laced. Attack this, defend that, escort this, blow that up. I think what's missing from WingCommander are no strong characters. You don't really know who the commander is, you don't know who's flying off your wing. It's not like WC where you get hobbes and maniac flying with you for years (why did you kill of hobbes, origin, why?!). I think having characters that grow together with you gives a feeling of protectiveness over your wingmen. I do send my wingpeople home in Freespace when they are in the red, but I'm just not as attached.

The final mission to destroy the big bad invulnerable capital ship, I somehow wasn't able to play (this is dosbox on osx). I could only hear what's going on, but the view of space was blank, with only the hud displayed. Luckily, thanks to my amazing people-who-fly-with-me-on-missions, they took down the big boss with only an "Engage Enemy" command :P

The game also came with the expansion pack. Played the first mission and it left a bad taste in my mouth. Playing as covert ops, we're supposed to silence our own people for the greater good. Bleh. Cmd-Q, thank you very much.

Overall, I thought this was a very enjoyable game. May have to play it again and lose the secondary objectives on purpose to see what happens :P

Tuesday, July 01, 2014

Transformers 4: Damned enjoyable.

As with the last few transformers films, I went in with little expectations, just wanting to drool over the guaranteed-to-be-awesome vfx, but this was a surprisingly enjoyable film. This is the first Herr Bay Transformers film that I didn't pull out my phone to check how long before the movie ended.

-> Warning: Spoilers ahead.

I thought the pacing was great, and oh my melted cheese cakes, the annoying lead actor from the previous three films was gone. I really, really disliked that whiney character, and the new human representatives were pretty good.

Things I thought were interesting (or lame):
- Optimus Prime was first encountered as the old skool peterbilt design. I was like weeee so cool! He stays and fights in that form for a fair while too, which was great. I didn't groan when he switched over to the "new" design.
- Triple changer samurai robot is sooo cool! Not a fan of the car logo on his chest though.
- Not sure who the green autobot is, but robot with robotic cape and built-in parachutes is just so damned cool.
- Seems like they've reduced alot of the transformation sequences - many shots were like, jump cuts to finished/near finished.
- That reminds me, too much advertising in this film, I was particularly rolling my eyes on the beats speakers. That said:
- Rainbow Dash was in the movie! Squeee! XD
- Unknown robot mastermind has a really damned cool sniper rifle transformation sequence.
- Galvatron is a truck. Like, supposed to be the human controlled, upgraded better version of prime. Mucho differnt from his g1 space gun form, but it kind of makes sense, to be parallel to prime, and the explanation of galavatron/megetron kind of actually makes sense.
- "New" transformation sequence by galvatron and the upgraded robots remind me of the Vexille Jags. Even my friends not in the film industry thought that was very low budget lol.
- Hong Kong as a location is pretty cool, nice change of scenery.
- I'm not even sure if the dinosaur bots are dinobots. They like, suddenly got released by prime, prime did a dominance fight and they joined up. They did not speak at all! I was on my seat hoping to get one liners like this:
- Humans are overpowered in this show. Optimus barely holds his own against the bad guy bent on retrieving him, but the lead human character, damn, actually defends himself against the bad guy with a little gun sword! I would have expected the sword to just slice off his head or something. And he was doing some _serious_ damage to the bad guy with just the gunsword. Imagine if all 3 human characters were firing on the bad guy, he'd be taken out like _easy_.
- Optimus gets stabbed by his own sword, but is flying - excuse me, flying, minutes later, with seemingly no damage? And best of all, only minutes later, he attains escape velocity and flies off into space. Uh, so what, did he like forget he could fly?! Since when did could prime fly?! Was it after he because that "Knight" thing with the dinobots? Even so, why didn't he like, fly around earlier?! That was so, so lame.

Some of the destruction sequences were just so drool inducing. I want to work on destruction of that scale one day.