今天在豆瓣上发现了一张很有意思的图,作为程序员同时又是Beatlemania的我很稀饭这张图。据说这周末在Mao Livehouse有向披头士致敬的演出,我有点儿心动了,希望到时能过去。
On Sale
这是我最近的个人状态:On Sale.
已经把自己挂牌出去一个多月了,但今年的市场行情确实不容乐观,纵眼望去,it is the massive scene of layoffs.
为了给自己找到一个理想的买家,最近一个月是在四处散发自己的“传单”,但一部分传单发出去之后就是杳无音信,一部分给了我回复,也给了我纸上证明自己的机会,不过一直自我感觉发挥的不理想。所以到现在为止,还没有一家买家给我face-to-face的机会,更没有收到一份“Purchase Order”。
几家欢喜几家愁,一江春水你往哪儿流啊。呜呼,什么时候才能把自己卖出去呢,我能找到一家中意的买家么。
谁将是我跨出校园后的第一个雇主呢,继续耐心的等待中…
My Footsteps of Programming 3DS Max Exporter Plug-in
Several months ago, I achieved to develop a 3DS Max exporter plug-in. But until recently, I didn’t get the time to jot down something about my experience while developing it. Finally, thank God, I am starting to write this article, in case that several years later I totally forget how I did it at that time.
As you know, 3DS Max is a powerful tool for creating 3D models, especially widely-used in games. But generally we cannot directly get our model from 3DS Max, otherwise, we need a sort of middleware to retrieve specified model data we need from 3DS Max and export them into a specific type of file. This middleware is right the exporter plug-in.
OK, with this concept in mind, let’s get started.
Step by step, I will roughly present my footsteps of programming a 3ds max exporter plug-in based on 3DS Max 9 SDK.
Get familiar with 3DS Max and SDK
As we all know, there are a series of 3DS Max versions. Firstly you need to choose one to program based on. At the time of my embarking on this plug-in, the latest version is 3DS Max 2009. However, I chose Max 9 because it is already a widely-used and popular version. Most importantly, my laboratory was using Max 9.
Before doing some real programming jobs, it is pretty important to gain some basic concepts of 3ds max. We needn’t to be a perfect 3D designer ourselves, but these are the essential concepts we must know.
- what is a Node in 3ds max
- the hierarchical chart of nodes
- how materials are attached to a node
- what is a node’s Modifier
- key-frame animation and how bone nodes are attached to normal nodes
- the Biped technique
The fact is, the more we want to export from 3DS Max, the more we need to concern about it. For example, if we also want to export the data of camera or light from Max(meshes for games usually don’t export these data), we must apprehend what is a camera or light node in Max and how they work with other nodes.
But how the hell could we get the detail of these knowledge? Turn to the Max SDK Document, whenever you have any confusion with Max. Besides, we can also log on to Autodesk’s official Web site for more help.
BTW, the assumption here is that you are already familiar with some 3D concepts, like vertex, triangle, mesh, texture, space transformation, skinned animation, etc. If you are still a 3D newbie, you’d better figure them out firstly.
To be continued…
Predefine mesh file format
Export static mesh data
Export skinned animation
Colours
百忙之中,贴一首我很喜欢的歌,一首喜欢了很久的歌,Colours。
原作是Donovan,但我第一次听到这首歌的版本是他和Joan Baez的Duet版,后来才听到了Donovan的原版。在Duet版本中,Donovan的声音像极了迪伦,以至于我第一次听到时默认为就是贝茨和迪伦的合唱版。
两个版本我都很喜欢,不过更喜欢有贝茨掺和进来的版本,太他妈好听了。
这里我将两个版本都呈上,配着北京今天的阳光,这样的音乐让人忘记了最近所有的不快。
Colours – by Donovan
Colours – a live duet by Donovan & Joan Baez
Yellow is the colour of my true love’s hair,
In the morning, when we rise,
In the morning, when we rise.
That’s the time, that’s the time,
I love the best.
Blue’s the colour of the sky-y,
In the morning, when we rise,
In the morning, when we rise.
That’s the time, that’s the time,
I love the best.
Green’s the colour of the sparklin’ corn,
In the morning, when we rise,
In the morning, when we rise.
That’s the time, that’s the time,
I love the best.
Mellow is the feeling that I get,
When I see her, m-hmm,
When I see her, oh yeah.
That’s the time, that’s the time,
I love the best.
Freedom is a word I rarely use,
Without thinking, m-hmm,
Without thinking, oh yeah.
Of the time, of the time,
When I’ve been loved.
日积月累: Uncopyable & Uninheritable in C++
如何在C++中阻止复制和继承呢,我做了个整理。
Uncopyable
有些类需要禁止被复制或者赋值,这需要显示的禁掉它们的拷贝构造和赋值函数。
摘自《Effective C++》Item 6: Explicitly disallow the use of compiler-generated functions you do not want
class Uncopyable { protected: // allow construction Uncopyable() {} // and destruction of ~Uncopyable() {} // derived objects... private: Uncopyable(const Uncopyable&); // ...but prevent copying Uncopyable& operator=(const Uncopyable&); }; class UncopyableExample: private Uncopyable { // THIS CLASS IS UNCOPYABLE };
Uninheritable
Java提供了final关键字用来阻止被继承,而在C++中没有这个关键字,但阻止继承的类在C++中是同样可能的。
摘自:http://www.csse.monash.edu.au/~damian/Idioms/Topics/04.SB.NoInherit/html/text.html
template <class OnlyFriend> class Uninheritable { friend class OnlyFriend; Uninheritable(void) {} }; class NotABase : virtual public Uninheritable< NotABase > { // WHATEVER }; class NotADerived: public NotABase { // THIS CLASS GENERATES A COMPILER ERROR NotADerived(){} };
囧事一则
今天在公司当我正沉浸在代码的思索中时,突然一位长着一张亚洲面孔的青年走到了我的身边,对我说:“Excuse me, where is the RESTROOM?”
Restroom?休息室?因为以前没遇到过这种说法,所以当时的第一反应本能的就是想这位青年是不是需要到休息室休息一下。于是我指着公司的Pantry,礼貌的说:“Down this way.”
于是这位青年立即向着饭厅的方向奔去。但我马上意识到,这位青年想要去的地方该不会是洗手间吧。于是,我马上打开金山词霸,输入了restroom。
restroom – (公共建筑物内的)公用厕所
刹那间,我囧了。
洗手间,抑或厕所,如果说toilet, men’s room或是washroom,我都能明白,但偏偏这个restroom以前却从没注意到过。
囧事一则,让我对restroom刻骨铭心。
Tracy Chapman
最近新知道了一位歌手,Tracy Chapman。
我是在土摩托的博客里无意中听到了她的歌,是那种一听就很打动人的声音,很安静的民谣,是深夜陪伴孤独的良药。
有趣的是,当我第一次听到她的声音的时候,以为是个男歌手。而且她的名字,前半部分让人想到的是Tracy McGrady,后半部分则让我想到了令人深恶痛绝的杀害列侬的查普曼(真不该这么联想),怎么都没想到,后来去网上搜索“他”的资料,居然是位创作型的黑人女歌手,而且才华相当的了得。
我去电驴子上找她的专辑,下载了她的《Collection》这张(盗版有罪,罪哉,罪哉……)。一般对于新认识的一位歌手或乐队,如果试图尽快了解,选择听的专辑应该是诸如《The Best of XXX》《Collection》,《Anthology》等等这样的合辑。在听了专辑后,发现好几首都是以前听过的,以前听的只是别的乐队翻唱的版本,她才是真正的原作。比如《Baby Can I Hold You》,以前听过Boyzone的版本,而《Fast Car》这首歌的前奏,简直太熟悉了,貌似在很多吉他视频教程里面,是不断的不断的被重复播放的段子,哈哈!
这是原来土摩托博客里所贴的那首歌——《Change》,可以到她的个人网站 www.tracychapman.com听到更多的歌。
If you knew that you would die today,
Saw the face of God and love,
Would you change?
Would you change?
If you knew that love can break your heart
When you’re down so low you cannot fall
Would you change?
Would you change?
How bad, how good does it need to get?
How many losses? How much regret?
What chain reaction would cause an effect?
Makes you turn around,
Makes you try to explain,
Makes you forgive and forget,
Makes you change?
Makes you change?
If you knew that you would be alone,
Knowing right, being wrong,
Would you change?
Would you change?
If you knew that you would find a truth
That brings up pain that can’t be soothed
Would you change?
Would you change?
How bad, how good does it need to get?
How many losses? How much regret?
What chain reaction would cause an effect?
Makes you turn around,
Makes you try to explain,
Makes you forgive and forget,
Makes you change?
Makes you change?
Are you so upright you can’t be bent?
If it comes to blows are you so sure you won’t be crawling?
If not for the good, why risk falling?
Why risk falling?
If everything you think you know,
Makes your life unbearable,
Would you change?
Would you change?
If you’d broken every rule and vow,
And hard times come to bring you down,
Would you change?
Would you change?
If you knew that you would die today,
If you saw the face of God and love,
Would you change?
Would you change?
Would you change?
Would you change?
If you saw the face of God and love
If you saw the face of God and love
Would you change?
Would you change?
FCUK
正如上一篇所写的Bruce Springsteen的歌曲Working On a Dream一样,我也在为梦想打拼。
而这周末,我实现了一个长久以来的小梦想——在拿到我第一个月实习的工资后,我买了一件FCUK的T-shirt。虽然对于这个奢侈的品牌,我现在能买得起的也只有是T-shirt了,不过我还是为拥有了第一件FCUK的东西感到开心。
FCUK,French Connection United Kingdom的简写,来自英国的品牌,是我偶像最喜欢的牌子。我也很喜欢,但不是我最喜欢的牌子,而且我的喜欢存在有点盲目崇拜跟风的嫌疑。FCUK很酷,也很叛逆很不和谐,拜托还是不要穿着它去面见你的上司,不然的话,you are FCUKed.
Working On a Dream
最近一直在听Bruce Springsteen最新专辑《Working On a Dream》,Springsteen这样老男人的声音我很喜欢,铿锵有力却绝不缺乏磁性,热情可以唱得澎湃四射,柔情又可以唱的断人心肠。
专辑的同名歌曲《Working On a Dream》我很喜欢,据说是去年竞选运动时奥巴马的御用歌曲。不过我不在乎它和政客的关系,这是一首很激励人的优美歌曲,是这位被称为“为蓝领工人歌唱”的老摇滚的又一首力作。
试着翻了一下这首歌,翻着翻着不禁感慨,美国的“民工”们,可以哼着这样的歌,爬梯子,敲大锤,边搞建设边做着美国梦。而在贵国,奋斗在建设阵线上的广大民工们,啥时也能听到属于他们的这么热血沸腾的歌曲呢?现在他们只有“两只蝴蝶”。
Working On a Dream 为一个梦想打拼
Out here the nights are long, the days are lonely
I think of you and i’m working on a dream
I’m working on a dream
这里的黑夜很漫长,这里的白天很孤单
我想着你,我在为一个梦想打拼
我在为一个梦想打拼
Now the cards i’ve drawn’s a rough hand, darling
I straighten the back and i’m working on a dream
I’m working on a dream
亲爱的,现在我所抽到的是一手差牌
我挺直了腰杆,我在为一个梦想打拼
我在为一个梦想打拼
I’m working on a dream
Though sometimes it feels so far away
I’m working on a dream
And i know it will be mine someday
我在为一个梦想打拼
尽管有时它感觉如此遥远
我在为一个梦想打拼
我知道它总有一天会属于我
Rain pourin’ down, i swing my hammer
My hands are rough from working on a dream
I’m working on a dream
大雨倾盆中,我挥动我的铁锤
我的双手因为梦想打拼而变得粗糙
我在为一个梦想打拼
I’m working on a dream
Though trouble can feel like it’s here to stay
I’m working on a dream
Well our love will chase trouble away
我在为一个梦想打拼
尽管感觉困境包围着我
我在为一个梦想打拼
我们的爱会赶走困难
I’m working on a dream
Though it can feel so far away
I’m working on a dream
Our love will make it real someday
我在为一个梦想打拼
尽管有时它显得如此的遥远
我在为一个梦想打拼
总有一天我们的爱会让它成为现实
The sun rise up, i climb the ladder
The new day breaks and i’m working on a dream
I’m working on a dream
I’m working on a dream
I’m working on a dream
太阳升起,我爬上梯子
新的一天开始了,我要为我的梦想而打拼
我在为一个梦想打拼
我在为一个梦想打拼
我在为一个梦想打拼
I’m working on a dream
Though it can feel so far away
I’m working on a dream
Our love will make it real someday
我在为一个梦想打拼
尽管有时它显得如此的遥远
我在为一个梦想打拼
总有一天我们的爱会让它成为现实
Recent Comments