Is anyone else seeing Japanese ads on YouTube? I don't mean a YouTube video of a Japanese ad*. I'm actually getting Japanese ads (given the previous link, ironically) for the Japanese coffee brand Georgia (a Coca cola brand).
At first, I thought that maybe YouTube has erroneously got my language as Japanese, but no, its still English. OK, and I still get English ads too. And to top it all, the Japanese ad preceded an English video...
My guess right now is that it has something to do with my posting Japanese into a video I uploaded**, which apart from having a Japanese title, also has Japanese in the subtitles and description (it took far more work than it was worth to make that).
So, of course, YouTube isn't reading my mind, but it damn well feels like it sometimes. I'm kind of impressed that Google's system can (to some degree) be aware of my fluency in Japanese***. On the other hand that is seriously wasteful advertising, given that I'd have to be really, really determined to get hold of that coffee over here... And anyway, my loyalty is with Boss, and that has nothing to do with the taste!
*Gotta love Tommy Lee Jones
** its completely irrelevant here, but here's a link if you're that inquisitive...
*** Or this is happening to everyone, and I don't know it yet. Or it really is a bug.
Sunday, April 28, 2013
Saturday, April 27, 2013
Heroes of Imperial Japan?
So, I was thinking earlier in the week about the apparent tendency for Japan to brush the evils of World War II under the carpet, and wondering about the lack of Japanese war heroes.
When I say Japanese war heroes, I don't mean "inflicted n amount of damage on his adversary", what I'm thinking of is Japanese people who risked their lives to stand against the evils of Imperial Japan, first hand.
Doing a Google search on "Japanese world war 2 heroes" doesn't really return a lot, and requires some filtering because it turns out there were lots of Japanese american war heroes. Moreover, since they were almost all military this kind of "heroism" tends to fall under the "inflicted n amount of damage on his adversary" kind of heroism.
Perhaps the problem here is that I'm imagining some sort of Oscar Schindler character; an ordinary person who rises above his surroundings, transcending the pragmatism of his character to keep the dark at bay...
But then again, why shouldn't there be someone like that in Imperial Japan? The Japanese are equally capable of doing good, example: Chiune Sugihara. But while he opposed Japan's actions in Manchuria, he didn't help there in the same way he saved lives in Lithuania. That said, the work he did in Lithuania was spectacular, that link is really worth the read.
Trying a different tact, I tried to find out who Imperial Japan's domestic enemies were. Being a highly militaristic society in WW2, I reasoned that the kind of people getting tried for treason were probably the same people trying to stop Japan's aggression in China.
As it turns out, I had more success than I'd expected with that train of thought, and pulled up the name Sanzo Nosaka. Nosaka heavily criticised Japan's involvement in China, and even went so far as to help setting up a spy network in Japanese-occupied China. The idea of heralding this man as a hero seemed not too far off, until reading that he effectively had his (adulterous) friend murdered. Then there are his links with Stalin's regime... Hmm, perhaps not a brilliant example after all.
But if nothing else, this did introduce me to the fact the Japan's (underground) communist party was opposed to Japan's role in China, and supported the independence of Japan's overseas colonies.
I'm not overly keen on communism myself, it reeks of schoolboy naivety that somehow that 1% of greedy people will stop seeking power (what I like to think of as "floater" politics*), or that the greediness inherent in all of us will just disappear with a change of government. However, it is somehow endearing, and the thought of a hero that wants everyone to be equal in society is poetic, if nothing else.
*Yes, its toilet humour!
When I say Japanese war heroes, I don't mean "inflicted n amount of damage on his adversary", what I'm thinking of is Japanese people who risked their lives to stand against the evils of Imperial Japan, first hand.
Doing a Google search on "Japanese world war 2 heroes" doesn't really return a lot, and requires some filtering because it turns out there were lots of Japanese american war heroes. Moreover, since they were almost all military this kind of "heroism" tends to fall under the "inflicted n amount of damage on his adversary" kind of heroism.
Perhaps the problem here is that I'm imagining some sort of Oscar Schindler character; an ordinary person who rises above his surroundings, transcending the pragmatism of his character to keep the dark at bay...
But then again, why shouldn't there be someone like that in Imperial Japan? The Japanese are equally capable of doing good, example: Chiune Sugihara. But while he opposed Japan's actions in Manchuria, he didn't help there in the same way he saved lives in Lithuania. That said, the work he did in Lithuania was spectacular, that link is really worth the read.
Trying a different tact, I tried to find out who Imperial Japan's domestic enemies were. Being a highly militaristic society in WW2, I reasoned that the kind of people getting tried for treason were probably the same people trying to stop Japan's aggression in China.
As it turns out, I had more success than I'd expected with that train of thought, and pulled up the name Sanzo Nosaka. Nosaka heavily criticised Japan's involvement in China, and even went so far as to help setting up a spy network in Japanese-occupied China. The idea of heralding this man as a hero seemed not too far off, until reading that he effectively had his (adulterous) friend murdered. Then there are his links with Stalin's regime... Hmm, perhaps not a brilliant example after all.
But if nothing else, this did introduce me to the fact the Japan's (underground) communist party was opposed to Japan's role in China, and supported the independence of Japan's overseas colonies.
I'm not overly keen on communism myself, it reeks of schoolboy naivety that somehow that 1% of greedy people will stop seeking power (what I like to think of as "floater" politics*), or that the greediness inherent in all of us will just disappear with a change of government. However, it is somehow endearing, and the thought of a hero that wants everyone to be equal in society is poetic, if nothing else.
*Yes, its toilet humour!
Friday, April 26, 2013
Atmospheric effects in openGL
And now for some programming...
Long story short:
Here is a technique for drawing an atmosphere, which is especially useful if you want something that is quick but you're not planning on the camera moving around. Enjoy.
Anyway, some considerable time ago I wrote about making the world in 7 days using openGL and java. Of course, in reality, I'd only synthesised a tiny region, not even the size of an English county... What I'd really love is to have a whole planet to look down on.
Actually, this is a much, much simpler task, so long as you don't want to visit anywhere on the surface, as from 300km up, everything looks flat anyway (approximately).
The real trick to making a planet look lovely is the atmosphere (and bump mapping*).
Lately I've been using libGDX for my graphical work (I'm a softy for portability, and when I adopted it, it was probably the most portable graphics library around), but hopefully what I attempt here will be fairly universal.
The basic layout for me is like this:
1)Earth = sphere with earth texture in centre of screen
2)Starmap = sphere centred on camera with star texture
3)Clouds = sphere surrounding earth with cloud texture
4)Atmosphere = cone extending from the horizon of sphere (1) to behind the camera
And now for a pretty diagram:
... What can I say... I'm a biologist.
Long story short, the key is to have the cone completely transparent, but draw it with fog. You end up with something that looks a bit like this:
Which is (I think) a reasonable approximation of Earth from ~300 km up. OK, so this is a bit hacky, but it is really quick and conceptually simple**.
If you want more detail, here are the components in more detail:
1)Earth
Since I personally never plan to leave orbit, instead of using a sphere, I've cheated and used a convex shape to reduce the number of triangles rendered. Thus, instead of having a sphere rotating, I've had to move the texture coordinates instead. But honestly, that is simple enough. It also means that I don't need to have the whole earth texture loaded into memory, I only have a thin strip for a texture that corresponds to the area over which the viewpoint travels, assuming that I always pass the same terrain***.
I use a night (city lights) texture too, which is only visible when the sun starts sinking below the horizon.
2)Starmap
You can't see it so well in the screenshot, but at night I make the stars more vivid by increasing the brightness. The stars are another NASA freebie (I love NASA). There's not much else to say here
3)Clouds
Just a png texture of clouds mapped onto another convex shape with a slightly different speed of rotation, so that the same area isn't always covered by the same clouds.
4)Atmosphere
As mentioned earlier, the atmosphere is just a transparent cone that extends from behind the camera to the horizon. To make it appear as the atmosphere all you do is enable fog, then draw the cone. Finally, you draw the planet in front of all that.
The density of the atmosphere can be changed by modifying the opengl fog density/fog start parameters.
If I recall correctly, the draw order was important: stars, then atmosphere cone, then planet.
Of course there are major caveats with this method:
1) if the camera moves relative to the planet, the cone has to distort accordingly
2) if the camera moves, the fog density/fog start parameters must be adapted otherwise the atmosphere will appear to grow as you move away from the planet
Which is one reason why I haven't bothered allowing the camera to move! But it makes a lovely background ;)
*Sorry, I won't be discussing bump mapping as I don't use it yet. I have reasons for this, but I advise that you use bump mapping if you can, because it looks great! But anyway, bump mapping is a fairly standard practice nowadays (here's what google thinks is the best site on the matter, but because I'm too busy to see if it actually is, here is what it thinks is the second best site on the matter. In the very least I've used NeHe's site before, and liked it...)
**Bearing in mind this is all designed to run on mobile phones...
***Yes, I've cheated and have my viewpoint make the impossible orbit along a constant longitude in the Northern hemisphere. I should have put the orbit around the equator. Sorry about that. I like the Northern hemisphere.
Long story short:
Here is a technique for drawing an atmosphere, which is especially useful if you want something that is quick but you're not planning on the camera moving around. Enjoy.
Anyway, some considerable time ago I wrote about making the world in 7 days using openGL and java. Of course, in reality, I'd only synthesised a tiny region, not even the size of an English county... What I'd really love is to have a whole planet to look down on.
Actually, this is a much, much simpler task, so long as you don't want to visit anywhere on the surface, as from 300km up, everything looks flat anyway (approximately).
The real trick to making a planet look lovely is the atmosphere (and bump mapping*).
Lately I've been using libGDX for my graphical work (I'm a softy for portability, and when I adopted it, it was probably the most portable graphics library around), but hopefully what I attempt here will be fairly universal.
The basic layout for me is like this:
1)Earth = sphere with earth texture in centre of screen
2)Starmap = sphere centred on camera with star texture
3)Clouds = sphere surrounding earth with cloud texture
4)Atmosphere = cone extending from the horizon of sphere (1) to behind the camera
And now for a pretty diagram:
... What can I say... I'm a biologist.
Long story short, the key is to have the cone completely transparent, but draw it with fog. You end up with something that looks a bit like this:
Which is (I think) a reasonable approximation of Earth from ~300 km up. OK, so this is a bit hacky, but it is really quick and conceptually simple**.
If you want more detail, here are the components in more detail:
1)Earth
Since I personally never plan to leave orbit, instead of using a sphere, I've cheated and used a convex shape to reduce the number of triangles rendered. Thus, instead of having a sphere rotating, I've had to move the texture coordinates instead. But honestly, that is simple enough. It also means that I don't need to have the whole earth texture loaded into memory, I only have a thin strip for a texture that corresponds to the area over which the viewpoint travels, assuming that I always pass the same terrain***.
I use a night (city lights) texture too, which is only visible when the sun starts sinking below the horizon.
2)Starmap
You can't see it so well in the screenshot, but at night I make the stars more vivid by increasing the brightness. The stars are another NASA freebie (I love NASA). There's not much else to say here
3)Clouds
Just a png texture of clouds mapped onto another convex shape with a slightly different speed of rotation, so that the same area isn't always covered by the same clouds.
4)Atmosphere
As mentioned earlier, the atmosphere is just a transparent cone that extends from behind the camera to the horizon. To make it appear as the atmosphere all you do is enable fog, then draw the cone. Finally, you draw the planet in front of all that.
The density of the atmosphere can be changed by modifying the opengl fog density/fog start parameters.
If I recall correctly, the draw order was important: stars, then atmosphere cone, then planet.
Of course there are major caveats with this method:
1) if the camera moves relative to the planet, the cone has to distort accordingly
2) if the camera moves, the fog density/fog start parameters must be adapted otherwise the atmosphere will appear to grow as you move away from the planet
Which is one reason why I haven't bothered allowing the camera to move! But it makes a lovely background ;)
*Sorry, I won't be discussing bump mapping as I don't use it yet. I have reasons for this, but I advise that you use bump mapping if you can, because it looks great! But anyway, bump mapping is a fairly standard practice nowadays (here's what google thinks is the best site on the matter, but because I'm too busy to see if it actually is, here is what it thinks is the second best site on the matter. In the very least I've used NeHe's site before, and liked it...)
**Bearing in mind this is all designed to run on mobile phones...
***Yes, I've cheated and have my viewpoint make the impossible orbit along a constant longitude in the Northern hemisphere. I should have put the orbit around the equator. Sorry about that. I like the Northern hemisphere.
Thursday, April 25, 2013
Hanwriting reevaluation
Having used hanwriting for android a little more extensively, I've decided that its physical keyboard support is terrible after all. I was already dubious about it, but what really kills it for me is the way it provides suggestions.
For English, hanwriting's suggestions are OK, and although a bit fiddly, you can kind of get around stupid suggestions by simply dismissing them.
For Japanese however, you need the suggestions to convert your hiragana into kanji, and the only way to do this is to either accept the default suggestion, or physically press the kanji that you want to use. In other words, there is no way to select the kanji using a physical keyboard.
In essence this means that writing Japanese text will sound like "hack hack hack - tap - hack hack hack - tap - " etc. Not that the noise annoys me, its the constant flipping between typing and poking that I can't get used to. After all, once you've taken your fingers off the keyboard to poke the screen, you've got to get your hands back into the typing position by finding the F and J buttons, which somehow feels like a huge impediment to the fluidity to writing something.
For the sake of being able to actually write an email to my wife without going insane, hanwriting is no longer my default IME.
That said, if you spend much time looking up complicated Japanese characters, hanwriting still has its handy kanjipad.
EDIT: Got an email back from the developer, apparently the next version will be clear of these bugs! On the other hand, that means I might be obliged to write a rereevaluation post... I've really done it to death already.
Looking forward to that update though!
For English, hanwriting's suggestions are OK, and although a bit fiddly, you can kind of get around stupid suggestions by simply dismissing them.
For Japanese however, you need the suggestions to convert your hiragana into kanji, and the only way to do this is to either accept the default suggestion, or physically press the kanji that you want to use. In other words, there is no way to select the kanji using a physical keyboard.
In essence this means that writing Japanese text will sound like "hack hack hack - tap - hack hack hack - tap - " etc. Not that the noise annoys me, its the constant flipping between typing and poking that I can't get used to. After all, once you've taken your fingers off the keyboard to poke the screen, you've got to get your hands back into the typing position by finding the F and J buttons, which somehow feels like a huge impediment to the fluidity to writing something.
For the sake of being able to actually write an email to my wife without going insane, hanwriting is no longer my default IME.
That said, if you spend much time looking up complicated Japanese characters, hanwriting still has its handy kanjipad.
EDIT: Got an email back from the developer, apparently the next version will be clear of these bugs! On the other hand, that means I might be obliged to write a rereevaluation post... I've really done it to death already.
Looking forward to that update though!
Wednesday, April 24, 2013
Forgetting the East Japan Earthquake
I was thinking the other day that you don't hear much about the East Japan Earthquake any more. This makes sense, in that as the immediate danger has subsided and other things happen in the world.
You can even graph the international sentiment ebbing away:
Above is a graph of UK google searches for "Japan earthquake". Below is the same for Japanese searches for "日本 地震":
You can see that, even in Japan, the public eye has wandered onto other issues a surprisingly comparable amount. Us people are great at forgetting about things, but the next time something like this happens, bear in mind that the situation is constantly unfolding, and when you remember it n years from now, it will still be unfolding. Remember that, and how lucky it was you weren't involved.
You can even graph the international sentiment ebbing away:
Above is a graph of UK google searches for "Japan earthquake". Below is the same for Japanese searches for "日本 地震":
You can see that, even in Japan, the public eye has wandered onto other issues a surprisingly comparable amount. Us people are great at forgetting about things, but the next time something like this happens, bear in mind that the situation is constantly unfolding, and when you remember it n years from now, it will still be unfolding. Remember that, and how lucky it was you weren't involved.
Monday, April 22, 2013
Ignoring Japanese war atrocities
Having read this news article about the recent visit of Japan's PM Shinzo Abe to the Yasukuni shrine, and the corresponding conversation with my dad, it reminded me of a strange conversation I had with my wife some time ago.
First, some context, if you're unfamiliar with the Yasukuni shrine, you should in the very least know that it houses the "spirits" of a number of World War II war criminals, I also recommend reading at least this section of the almighty wiki.
A year or two ago, I was watching the film "City of Life and Death" (or "Nanjing! Nanjing!"), on the recommendation of a Chinese friend. The film is centred on the life & death struggle of people caught in the infamous "Rape of Nanking".
My wife asked what I was watching, and I tried to explain it to her. I wasn't entirely surprised (considering the infamy of the Japanese history education) that she didn't seem to know what the Rape of Nanking was, so I explained that to her as well. To me, her response was astonishing:
To be honest, I was so taken aback by that response (and kind of still am) that I forget how I responded. I think the thing that surprises me most is that there is absolutely no reason at all anyone should come up with an answer like that. You can't simply "fake" a horror on the scale of the Rape of Nanking, but then how the hell do you respond to a statement like hers? Its not like I'm in a great position to start rummaging through the evidence and prove it to her, all I can do is say "I've read this and that", and explain that its the prevailing view of events through the rest of the world...
Having been to Germany and seen plaques honouring those who defied the Nazi regime, a kind of solemn celebration that even in the midst of a terrible regime there exist those willing to fight Evil. It seems very strange then, to see the Japanese brushing events under the carpet. Where are Schindler's lists of Japan?
The closest example I know of is Admiral Isoroku, but as much as he didn't want to go to war with America, he still masterminded a good deal of it... No. I don't have a good example, and it worries me that Japan doesn't seem to have it's own heroes who fought against the Evil of the Japanese Empire*.
If Japan isn't going to educate about its war atrocities, its people aren't going to understand properly why its neighbours are so cold towards them, and if they don't debate the Goods and Evils that occurred, what is to stop them making the same mistake in the future?**
*Although, my knowledge of Japanese history is still very lacking.
**Though I doubt things will escalate enough to really warrant this fear..
First, some context, if you're unfamiliar with the Yasukuni shrine, you should in the very least know that it houses the "spirits" of a number of World War II war criminals, I also recommend reading at least this section of the almighty wiki.
A year or two ago, I was watching the film "City of Life and Death" (or "Nanjing! Nanjing!"), on the recommendation of a Chinese friend. The film is centred on the life & death struggle of people caught in the infamous "Rape of Nanking".
My wife asked what I was watching, and I tried to explain it to her. I wasn't entirely surprised (considering the infamy of the Japanese history education) that she didn't seem to know what the Rape of Nanking was, so I explained that to her as well. To me, her response was astonishing:
"Yes, but you can't really know these things, since you weren't there"
To be honest, I was so taken aback by that response (and kind of still am) that I forget how I responded. I think the thing that surprises me most is that there is absolutely no reason at all anyone should come up with an answer like that. You can't simply "fake" a horror on the scale of the Rape of Nanking, but then how the hell do you respond to a statement like hers? Its not like I'm in a great position to start rummaging through the evidence and prove it to her, all I can do is say "I've read this and that", and explain that its the prevailing view of events through the rest of the world...
Having been to Germany and seen plaques honouring those who defied the Nazi regime, a kind of solemn celebration that even in the midst of a terrible regime there exist those willing to fight Evil. It seems very strange then, to see the Japanese brushing events under the carpet. Where are Schindler's lists of Japan?
The closest example I know of is Admiral Isoroku, but as much as he didn't want to go to war with America, he still masterminded a good deal of it... No. I don't have a good example, and it worries me that Japan doesn't seem to have it's own heroes who fought against the Evil of the Japanese Empire*.
If Japan isn't going to educate about its war atrocities, its people aren't going to understand properly why its neighbours are so cold towards them, and if they don't debate the Goods and Evils that occurred, what is to stop them making the same mistake in the future?**
*Although, my knowledge of Japanese history is still very lacking.
**Though I doubt things will escalate enough to really warrant this fear..
Saturday, April 20, 2013
Japanese kanji with Hanwriting, again
So, I've had a good long while playing with hanwriting now, and I think its worth mentioning a couple of points:
First, a little tip on hard keyboards:
It can be annoying when using a hardware keyboard to type, when hanwriting decides to autocorrect the word you typed in (hanwriting will become "handwriting"). However, you can circumvent this problem by pressing an arrow key instead of the spacebar or punctuation, and this immediately dismisses the suggestions.
Secondly a new gripe of mine:
I've noticed that, despite hanwriting's superb ability at recognising complicated characters, there are some face-palmingly easy characters that it seems to have trouble with:
千 柔
perhaps unsurprisingly the first of those was quite easy in aedict's kanjipad, though there is something about the second one that I just can't seem to get right in either program.
Also, for a program that professes to be a handwriting app, its pretty appalling at hiragana.
That said, hanwriting is STILL my default IME at the moment; to me, the advantages still outweigh the drawbacks, and by a fair margin too.
First, a little tip on hard keyboards:
It can be annoying when using a hardware keyboard to type, when hanwriting decides to autocorrect the word you typed in (hanwriting will become "handwriting"). However, you can circumvent this problem by pressing an arrow key instead of the spacebar or punctuation, and this immediately dismisses the suggestions.
Secondly a new gripe of mine:
I've noticed that, despite hanwriting's superb ability at recognising complicated characters, there are some face-palmingly easy characters that it seems to have trouble with:
千 柔
perhaps unsurprisingly the first of those was quite easy in aedict's kanjipad, though there is something about the second one that I just can't seem to get right in either program.
Also, for a program that professes to be a handwriting app, its pretty appalling at hiragana.
That said, hanwriting is STILL my default IME at the moment; to me, the advantages still outweigh the drawbacks, and by a fair margin too.
Subscribe to:
Posts (Atom)

