3d graphical user interface

The code is written in C++ base on Clutter 1.2.4 library. It shows basic widgets: tabbed container, scrolling container, list box, combo box, check box, edit box, button, label, radio button…

his is my personal project in which I tried to evaluate some new ideas and concepts in using 3D techniques for GUI (Graphical User Interface). It’s quite tiny indeed (about 6000 LOC – line of code), all written by myself in about a month (mostly in my free times at weekends). So please don’t blame me on some un-completed or un-polished features, they are just for testing the ideas only. I would try to examine the trend of applying 3D graphics to GUI, but first, let have a look at the video below.

1.   The first thing to consider is not 3D engines or hardwares, it is about usability. Many traditional (2D) GUI out there are already complex and obstructive. GUI is about information presentation and presentation should be really simple and clear so that even my grand mother can understand and use. I’ve been seeking, trying to explore many new ways invented to represent information in 3D (or 2.5D) space, and I could say only a very very small percent of them could make a usable value. Users have long been familiar with 2D, and yet 3D hasn’t been very much persuasive.

2.   3D hardwares can be categorized into 3 groups (as listed on the left), and the 3D engine can be configured to off-load calculations to hardware. With the 1st type of device, only bitmap operations could be off-loaded. With the 2nd type of device, many drawing operations (the path_xxx functions) can be off-loaded. The 3rd type of hardware is most valuable since we can have its finish for ourselves a lot of work.

It’s important to understand the target device our software stack would be running on. If it is an out-date machine with just some blitters, we should use paint-like (aka: bitmaps) operations, while on most modern PC, draw-like (aka: 2D vector) operations are more encouraging. While bitmaps may offer nicer and more customizable GUI, the cons is it lacks the scalable ability that vector has.

3.   The last is about software implementation. Many of the graphics concepts are first introduced in software, which then embedded to hardware, which then standardized by software (like OpenGL or DirectX) again. Thus, many elements of a graphics pipeline is the production of a long history of interactive evolution. A graphics pipleline is not a general framework, it depends on very detailed, in-depth techniques to be operational in real-world application.

Game & graphics are the domains where most formal software methods would easily failed. 3D graphics developers should have good knowledge on graphics in general (bitmap and vector drawing), geometry, linear algebra & discrete maths, deep understanding on data-structures and algorithms… are strong pluses, advanced tips & tricks in coding and optimization is a must (game & graphics programming has always been a hell of tricks from the age of dawn) and finally good understanding on 3D techniques (model, scenegraph, projecting, shading, clipping, lighting, effects…)

la chanson d’orphée

Le ciel a choisi mon pays, pour faire un nouveau Paradis.
Au loin des tourments, danse un éternel printemps pour les amants.
Chante chante mon cœur la chanson du matin dans la joie de la vie qui revient!

ây rung cảm tâm hồn nhiều khi không cần đến âm nhạc tinh tế và phức tạp. Chỉ một giai điệu, một lời hát đơn giản nào đó cũng đủ để gợi lại cả một khung trời kỷ niệm, ước mơ xa xưa… Chẳng có gì phải xấu hổ khi kể rằng bạn đã từng yêu một giai điệu, một khoảnh khắc nào đó của quá khứ, để rồi mãi cho đến tận hôm nay mới biết bản nhạc đó tên gì, do ai hát!

Lời Anh - A day in life of a fool 
Lời Việt - Bài ngợi ca tình yêu 

Vì có hề gì khi mà giai điệu đó đã (vô hình) đến và ở lại mãi mãi trong tim… Và đó lại là giọng ca đầy ma thuật, khỏe khoắn và quyến rũ Dalida… và cũng như những dáng nhạc đẹp khác, bài hát đã được chuyển thể qua rất nhiều ngôn ngữ khác.

3d

e are building something like this, a 3D user interface. Day by day, we’re witnessing more and more diversities in computer user interface: concepts, designs, look and feel, animations, effects… While some would stick to an bare – bone, obscured text console, the others prefer some fancy, eye – candy GUI with all its bells & whistles. Things are much easier now with many 3D libraries and tools. Remind me about how I did all the 3D things: polygon, mesh, texture, sprite, shading, lighting, scene – graph, etc… with C & assembly on DOS!

đôi bờ

ản nhạc này quá nổi tiếng rồi, không cần phải nói nhiều nữa. Nhưng có xem trích đoạn phim Khát (mà bài này là sound-track) thì mới thấy thực sự cảm động. Một tình yêu thời chiến, giản đơn và rung động, gần như là thiêng liêng (hãy nghe tiếng organ – đại phong cầm – cuối bài hát, khi đôi trai gái chia tay). Phần lời Việt dịch sát nguyên văn tiếng Nga, ngoại trừ một số chi tiết: dịch con vịt thành thiên nga – bệnh hình thức, sĩ diện kinh điển VN! Hãy nghe lời Việt để so sánh.

Đôi bờ - Thảo Vân 

We’re like the two banks of a river, which go side by side but hardly meet each other!

a… joe dassin

rước đây đã có giới thiệu về người nghệ sĩ Mỹ gốc Nga Do Thái hát tiếng Pháp Joe Dassin này qua bài hát Et si tu n’existais pas, một bài hát mà ai biết tiếng Pháp và văn hóa Pháp sẽ phải khóc khi nghe. Bài hát đã được chuyển ngữ sang tiếng Việt: ngày mai không có anh trong đời, trần gian riêng em đâu có vui gì, để yêu đương để nhung nhớ và tha thiết, nỗi yêu thương ôi bao giờ hết…

A toi - Joe Dassin 

Hôm nay post tiếp bài hát đứng thứ hai trong số những ca khúc đẹp nhất của Joe: A toi, tạm dịch sang tiếng Việt là: Cho em (anh) hay Vì em (anh)… một ca khúc tuyệt hay về nhạc và có phần lời khó có thể viết hay hơn được. Thỉnh thoảng nghe lại cả hai bài hát này để A… Joe Dassin vậy!

A toi, a la façon que tu as d’être belle. A la façon que tu as d’être à moi. A tes mots tendres un peu artificiels quelquefois.

A toi, a la petite fille que tu étais. A celle que tu es encore souvent. A ton passé, à tes secrets, a tes anciens princes charmants.

[ REF ] A la vie, à l’amour. A nos nuits, à nos jours. A l’éternel retour de la chance. A l’enfant qui viendra, qui nous ressemblera. Qui sera à la fois toi et moi.

A moi, a la folie dont tu es la raison. A mes colères sans savoir pourquoi. A mes silences et à mes trahisons, quelquefois.

A moi, au temps que j’ai passé à te chercher. Aux qualités dont tu te moques bien. Aux défauts que je t’ai caché. A mes idées de baladin.

A nous, aux souvenirs que nous allons nous faire. A l’avenir et au présent surtout. A la santé de cette vieille terre, qui s’en fout.

A nous, a nos espoirs et à nos illusions. A notre prochain premier rendez-vous. A la santé de ces milliers d’amoureux, qui sont comme nous.

Vì em, vì dáng vẻ yêu kiều ngự trị trong anh, vì những lời nói đầy yêu thương (đôi khi vẫn thoảng chút giả tạo) dành cho anh.

Vì em, vì cô bé em từng là, vì người con gái là em như hiện tại, vì quá khứ, vì những điều thầm kín, vì cả những hoàng tử lịch lãm xa xưa của em.

[ REF ] Vì cuộc sống, vì tình yêu, vì đêm và vì ngày, vì những cơ hội luôn mãi còn giữa hai ta. Vì những đứa trẻ sẽ ra đời, mai đây chúng sẽ trở nên như anh và em.

Vì anh, vì những cơn giận mà em là nguyên nhân, vì những phút nóng nảy chẳng duyên cớ. Vì sự im lặng, vì cả đôi lần anh quay lưng phản bội em.

Vì anh, vì những lúc anh ghé qua tìm em. Vì những cá tính hay bị em diễu, vì những tật xấu anh thường che giấu. Vì cả những ý tưởng điên khùng chẳng giống ai của anh.

Vì chúng ta, vì những kỷ niệm ta đã có, vì hiện tại, vì tương lai. Vì cả trái đất già cỗi này, mà nó không quan tâm lắm đâu.

Vì chúng ta, vì những hy vọng và ảo tưởng. Vì lần “hẹn hò đầu tiên” sắp tới của chúng ta. Vì cả triệu cặp tình nhân như chúng ta trên khắp địa cầu.

la maladie d’amour

a maladie d’amour… tựa này dịch làm sao mới phải nhỉ, Căn bệnh tình yêu?? Nôm na nhưng chính xác phải là: Ốm tương tư… 😀 Dịch nghĩa phần lời: Nó hành hạ trái tim những “đứa trẻ” đang yêu, không ngoại trừ một ai từ 7 cho đến 77 tuổi. Nó cuộn chảy như một dòng sông ngạo nghễ, cuốn trôi theo nó mọi giới, mọi kiểu người. Nó làm đàn ông cất tiếng hát, làm thế giới trở nên rộng rãi hơn.

La maladie d'amour – Michel Sardou 
Lời Việt: Tình yêu vụt sáng – (?) 

Nó làm phụ nữ bật khóc, đôi khi là những tiếng khóc thầm trong bóng đêm. Lại có khi nó khiến con người ta đau khổ suốt cả cuộc đời. Chẳng ai thoát được căn bệnh tình yêu, nhưng đớn đau hơn cả lại là khi người ta lành khỏi căn bệnh đó…

japanese pentatonic

Mais, c’est la guerre pentatonique,
cinq notes au lieu de sept.

ùng một tác giả: Kokoro No Tomo (lời Việt: Khi cô đơn em gọi tên anh), Koibito Yo (lời Việt: Người yêu dấu ơi), Ai No Shinkinro (lời Việt: Sa mạc tình yêu), Ribaibaru (lời Việt: Trời còn mưa mãi), Nokibiri (lời Việt: Tàn tro)… Xem ra nhạc Việt mượn của cô ca sĩ Mayumi Itsuwa này nhiều thật. Nhớ khi nhỏ, khoảng cỡ lớp 7, lớp 8, chưa biết bài gốc tiếng Nhật, thích bài Ngàn năm vẫn đợi này lắm, người khác thì cứ bảo: chỉ là thứ nhạc vàng đặt lời nhảm nhỉ… Giá như người ta hiểu nhạc không phải là lời nhỉ! Nó là cái intangible formation: 1 1/2 2 1/2 2!

Dakishimete (Mayumi Itsuwa) 
Ngàn năm vẫn đợi - Ngọc Lan 

the rain on the leaves

ome interesting recently – collected video documents: Phạm Duy with Steve Addiss on his song: Giọt mưa trên lá (the rain on the leaves) and Phạm Duy with the legendary Pete Seeger and the American folk song Clementine. Center image: the original poster of the song, and the original Vietnamese rendition (by the singer Thái Thanh) on the left.

Giọt mưa trên lá - Thái Thanh 
The rain on the leaves 
Steve Addiss & Phạm Duy

It’s not an abnormal thing to see church – music – influential songs like this to be the first to catch notices from Westerners (the Vietnamese – native pentatonic is harder to digest however). Indeed the song has been thought by some as a translation of a certain American folk song, which is absolutely not. The same is applied to several other Vietnamese songs, such as this Scents of Yesteryears, which easily touch the hearts of listeners outside VN.

for whom the bell tolls

Men of five still alive through the raging glow.
Gone insane from the pain that they surely know.

(Metallica)

xcerpts from the 1943 film following Hemingway’s novel. In some aspects, this is a great film, highly symbolic and dramatical, beautiful staging and casting, but still nowhere closed to the book. So read the book here (zipped text file)! It’s said that Hemingway handpicked the actors and actresses himself for the roles, but he greatly disliked the film due to it’s political content removal.

Excerpt 1: The old guerilla man of El Sordo and his last four men make their last stand on a dead-end hilltop. They’re waiting for their fate to come, and the young Joaquin does the praying when the Russian machine gun barrel turns hot on his shoulder as the planes approach: Holy Mary, Mother of God, pray for us sinners now and at the hour of our death, Amen!.

…Dying was nothing and he had no picture of it nor fear of it in his mind. But living was a field of grain blowing in the wind on the side of a hill. Living was a hawk in the sky. Living was an earthen jar of water in the dust of the threshing with the grain flailed out and the chaff blowing. Living was a horse between your legs and a carbine under one leg and a hill and a valley and a stream with trees along it and the far side of the valley and the hills beyond…

Excerpt 2: Robert Jordan, severely wounded on the way retreat after the mission, says farewell to his lover María. He stays behind to cover the enemy for others to safely escape. The scene removes the detail of Agustín asks if Jordan need a shot or he can manage himself once left behind. Counting the last minutes of his life, in such moment, one can hear the bell tolling for his soul!

Lieutenant Berrendo, watching the trail, came riding up, his thin face serious and grave. His submachine gun lay across his saddle in the crook of his left arm. Robert Jordan lay behind the tree, holding onto himself very carefully and delicately to keep his hands steady. He was waiting until the officer reached the sunlit place where the first trees of the pine forest joined the green slope of the meadow. He could feel his heart beating against the pine needle floor of the forest.

Robert Jordan, as illustrated on this Vietnamese translate book cover, using a Lewis gun, or just called a mácquina as in the book.

songs for free men

…The reasoning behind his persecution centered not only on his beliefs in socialism and friendship with the peoples of the Soviet Union but also his tireless work towards the liberation of the colonial peoples of Africa, the Caribbean and Asia, his support of the International Brigades…

istening to Paul Robeson’s album: Songs for free men… a very lovely basso profondo concert singer (he was one of the few true basses in American music), performing spirituals. Despite being a very famous and successful singer & performer, the man was kept under strict surveillance by US and UK governments for his international activities in Labor and Anti – Colonialist movements. It’s believed that he was unsuccessfully murdered by the CIA while in Moscow. He is now deserved a position in mainstream history by various posthumous recognitions.

The USSR anthem - Paul Robeson 

In the background video above (1945 victory parade in Moscow), Robeson presents the Soviet Union’s national anthem with a translated English lyric (let read the verses). I think, though it’s a very subjective idea, the song is the best anthem in the world, much more impressive than French’s La Marseillaise. The music’s still used as national anthem in Russia now, with a new lyric.

Don’t know why, but the music reminds me of spaces in the mesmerized text of Ernest Hemingway’s For whom the bell tolls (yet another American activist). As a child, I adored Hemingway’s writing style, and remembered many excerpts from his novel by heart, the spirits of International Brigades! The paragraph quoted on the left had been given a wonderful Vietnamese translation, it describes El Sordo’s final fighting on a hill, his thoughts on life and death, yet another picturesque Song for free men!