Last week, snowed in Tokyo !
Recently I had an hard-disk crash. Was the main HD of the server (mostly just the OS). It was a Maxtor (ehh !).
In light of that, I went on and bought a TeraStation. It’s a NAS (Network Attached Storage). A stand-alone system that holds 1 Terabyte of data on 4 250GB hard-disks.
Cool, but, I did the mistake of using it as RAID Spanning. Only later I fully realized that RAID Spanning is for speed and nothing else: it slices files in blocks of 8KB and spreads them on all the HD’s of the RAID.. without any parity ! I just wanted the RAID to be a continguous 1 TB of storage, no striping. I figured that the important data could be backed-up independently,
Apparently that’s not possible, so now I’m going to move data out, reformat the RAID as RAID 5. With RAID 5, 1TB becomes 750GB with parity, if one HD breaks, no data is lost.
I recently, succesfully used DSharingu to do mainteninance on my sister’s computer. It worked well, although some problems arised with her wireless LAN connection (what was the cause it’s beyond me !).
I’m working on a rewrite of the GUI. Moving onto wxWidgets. I don’t like wxWidgets reliance on inheritance. It’s actually a pain in the ass. The event table thing also looks kind of lame. But it’s the best option out there and I certainly prefer wxWidgets to MFC or plain Windows GUI programming.
I’m actually just trying to get a toolbar and other things like that. Nothing too fancy, functional stuff.
At work I finally re-implemented my spherical harmonics routines. Code written for PS2 has been ported on XBox 360. VLC asm to HLSL (high level shaders language, looks very much like C, practically same as Cg. Speaking of flakiness of memory.. I actually forgot in the process to properly port some code that was doing space transformation. That was something I had problems with in the past, a problem that I spent some time trying to solve, and then I completely overlooked it recetnyl as I was porting. Basically I had to “sandwich” a matrix between object<-world and world<-object (inverse of former), but, of course, I forgot that and started having problems.
In detail, the spherical harmonics matrices of the light-map were calculated in world space. To move them into object space, it goes:
obj_space_light_mtx = object<-world_mtx * world_space_light_mtx * world<-object_mtx
It’s 2AM.. we zzzzz !!!
Posted by Davide Pasca as Programming, 3D Graphics, Diary at 2:09 AM EST
5 Comments »
The past few days have been quite complicated.
Recently my grandfather’s health has worsened. He’s fine, I’m told, but was definitely better before.
With that in mind, I started asking for days-off. I normally go back to Italy once a year, but last summer I had to work. Some days were given back later on, at the end of the project. But I had an expired passport because during the project I was literally busy from morning to night, every single day. Also going abroad is somethign that one has to plan a little better.. not to mention that I actually needed some time to collect myself and start living a normal life again (Sunlight, etc).
To make a long story short, my new request for a vacation has been denied ! The situation got somewhat comic, as I negotiated down to the to get a Friday & Monday off, in a bid to make a round-trip to Italy.
I let the things go for the rest of the day, went out with some friends (although not really being able to enjoy myself) and, as I got back home in the morning, I proceeded to detail the situation and my thoughts on my diary on mixi (the Japanese community that also connects me to hears of people in the company where I work). I also cross-posted it on the Italian message board for game developers, playfields.net. The post is here. It’s written in Italian, English and Japanese.. badly rushed out, definitely not a professional piece !
Both on mixi and on playfields I got a lot of support. I actually would have preferred not to have to publicize such a personal matter. But I had to somewhat complaint, especially on the Japanese diary.
A friend and coworker that usually helps me deal with the company, took the matter at heart and tried to help me. As a result, it seems that now I may be able to take those days off (I’m hoping for at least one week). Which is great.. although that leaves me bruised and worried for the future.
From now on, I’ll have to make sure that I’ll work under contracts that guarantee me some basic freedoms. I’ll also have to make sure that things go constantly by the numbers: actually figure how many hours I work, how much money I make, how many days-off I’m given.
I can’t be lazy anymore about this. I hate to contract things, but nobody is going to give anything, unless I demand it.
I’m also hoping to find a way to get more time off from work, even if I have to go as far as getting unpaid days.
I don’t necessarily have to work in the field of video-games, because it doesn’t seem like there is much chance to do what one likes anyway. The most important tasks rarely involve much fun. There is so much that I want to do and work on..
Posted by Davide Pasca as Diary at 9:46 PM EST
9 Comments »
Luckily, I’m in a stage at work where I get again to actually design something, rather than rushing code out of the window.
I’ve continued to develop on M4D, but now I’m at the point in which M4D also has to produce some performing rendering.
M4D was meant to be some sort of scene graph. Also with code to deal with geometry more like a 3D creation software and less like a game engine. In fact, I’m convinced that I need to push the idea of creating code that helps to create 3D scenes, rather than a simple playback.. where one takes a scene created by an artist with a 3D package and attempts a faithful playback of the animation and quality of rendering.
I don’t want to create a new POV, but POV surely gives a hint to what 3D graphics can be about: coding and design can and should go along.
Nonetheless, I need to pull out some decent real-time performance, and so I’m working on a renderer interface for M4D. M4D gets to the point to generate vertex-packets and triangles. Where for a vertex-packet I mean a vertex which has all the attributes so that a triangle is defined only by three indices.
Further from that step, there is the actual geometry feed to the basic 3D API (OpenGL for PC and Direct3D for XBox 360). Vertex format, vertex streams and material selection.
M4D’s meshes, particle objects, materials and textures, have parallel objects on RendM4D (the rendering interface). This seems almost suitable for inheritance.. but not really ! Or at least, I can’t imagine it working.
I have M4D::Scene and M4D::Mesh. Now, with inheritance, I would end up with a RendM4D::Scene and RendM4D::Mesh. The problem is that, M4D::Scene and M4D::Mesh are directly related. A M4D::Scene links a bunch of M4D:Mesh…
For that reason, I went on to link renderables dynamically.
class M4D::Mesh
{
void *_client_objp; // store here the pointer to RendM4D::Mesh
…
};
class M4D::Scene
{
void *_client_objp; // store here the pointer to RendM4D::Scene
…
};
class RendM4D::Mesh
{
M4D::Mesh *_base_meshp;
…
};
class RendM4D::Scene
{
M4D::Scene *_base_scenep;
…
};
M4D::Scene and M4D::Mesh both have pointers to generic client objects (in this case the equivalent RendM4D objects). RendM4D::Scene and RendM4D::Mesh have the pointers to the original objects.
Now, a RendM4D::Scene can scan the scene tree by _base_scenep, which gives a bunch of M4D::Mesh, from which one can get the relative RendM4D:Mesh.
Seems like a bit of work, but it doesn’t get much simpler when dealing with dynamic links.
I also added callbacks for deletion and changes. For example when an M4D::Mesh has its geometry changed, it will call the OnModify() call-back routine with the given client object (the RendM4D::Mesh pointer).
In my case OnModify() points to a RendM4D method, and the client object is still the RendM4d::Mesh pointer. So that the renderable knows when source object’s geometry changes, and can update itself.
Same goes for the object deletion. A delete M4D::Mesh, will trigger an OnDelete() callback, which will call the relative RendM4D::Mesh and tell it to delete itself
I have a callback from the bed… time to sleep !
[Edit: I had forgot to specify _base_meshp and _base_scenep as pointers !]
Posted by Davide Pasca as Programming, 3D Graphics at 2:16 AM EST
5 Comments »
First of all, I’m thankful that I’m not a donkey. Also I’m thankful that I wasn’t born a medieval peasant. Breaking my back all day, not being able to take a shower in the morning.. worrying about what to eat everyday. Those are definitely bigger problems.
Form that point of view, I’m such a lucky person. However, I’m instinctively greedy.
Recently I realized that one or two years went by, and nothing really changed. I mean, my Japanese has somewhat improved. I have more experience as a programmer. I met new people, done things. But mostly really just a routine.
Perhaps I should have traveled more, I should have had some passionate and traumatic love relationship to sign me (some people seem to augment relationships perhaps with that goal in mind).
I could have done more to break the routine, but that’s not really a good solution to me. The problem is my brain. When compared to modern digital storage media, it really lacks behind.
It’s no wonder that Google is the hot thing of these times. I find myself more and more relying on it as an extension to my memory.That’s a big improvement from already 10-15 years ago, but still not what I wish.
Time goes by and I don’t really make much of it. I can take more pictures, I can film more things but, ultimately, I feel like I’m a stupid neural network. A blackbox that gets so much input but that only keeps a tiny fraction of all the information its exposed to.
The ability to forget things is sometimes useful. Makes one feel less pain in certain cases, but it’s also less truthful.
I’m not happy with being a mere human and I would like to fix this !
Perhaps I should look for a job at Microsoft 8)
Posted by Davide Pasca as Diary at 11:15 PM EST
6 Comments »
It’s already 2AM and I must go to sleep soon !
Yesterday (or was it two days ago ?) I released the 0.2a and today the 0.3a of DSharingu.
The new version allows for remote control through the mouse. A problem arises when opening a modal dialog on the remote’s instance of DSharingu. For example, one clicks to bring the Settings dialog. Being that a standard modal dialog, the application will stop waiting for it to be dismissed.. therefore not sending screen updates. So the remote can still move the mouse (mouse input is running on a separate thread already), but can’t have visual feedback !
It’s not a major issue, but it needs to be solved. The solution is to run a separate thread for the screen-grabbing and sending system.
Screen grabbing is done with DirectDraw. That’s the only place where I use DDraw, so I don’t really need to share any of those COM objects. Data transmission however is based on an API layer of mine.. which inevitably needs to become multi-thread safe.
So far I’ve been using Win32 mutexes, however, I’ve been reading that the Critical Section method is possibly better. Performs better and it runs in user-space (doesn’t put on hold other processes, like I feared it would do).
I found a nice system, involving a couple of classes and a macro 8) on The Code Guru. It’s nothing too new, but a nice way to minimize the code modifications.
Yesterday I went to the gym, after probably 2 weeks of absence.. and I was 70.35 8) That’s not bad at all. It comes to reinforce my belief that it’s the forced daily lunch routine what really makes me fat (recently, I had several holidays).
Better go to sleep now !
zzzzzzzzzz
Posted by Davide Pasca as Programming, Diary at 2:19 AM EST
2 Comments »
It’s 4PM and I just woke up…. another night spent… coding ! 8)
The plan for yesterday night was to go out partying, but people around me seem all to be getting towards the age of marriage. That and other things.. but mostly it’s all about women. It’s the women that really dictate men’s behavior !
It’s however, important to be able to take the best out of any situation, so I decided that perhaps the night was intended for coding, and so I proceeded until 8PM.
At this stage with DSharingu, I have several things to rewrite. Yesterday night I went about the Settings dialog. It was initially built using some sort of automated system to create a dialog and save settings data in a config file. I trashed most of that. I kept the file saving routines but, for the GUI, I reverted to the good old Windows Resource Editor and WM_COMMAND switch-case.
The idea of an automated dialog maker is nice, but there are just too many exceptions for the use I need to make. I don’t want to have too many dialogs. The few I have also have to be simple. Building and expanding a whole system to do all that is just overkill.
I’m pretty close to release the next version. Basic features are there and it’s probably time to go back to compression and iron down those special cases where bandwidth is an issue (the whole screen transmitted is a 280KB transfer !).
I really want to make a new release and let things go by themselves, so that I don’t have to keep answering to people that ask me “why are you doing it ? There must be already other products like this around !”. Recently I’ve been somewhat moody.. and one of these days I may come up with an answer along the lines “why are you living ? You are just another human among billions on this planet !”.
What I think pisses me off, is the fact that people have this tendency to want me to become a user. I want to be a developer at all costs. Life as a user is boring to me ! Make me write the software I want, the software I need as a user and as a learning developer. Sometimes it’s good to “reinvent the wheel”.
Now, back to the “not being able to go partying issue”: I think that what upsets me there is that I project myself in the shoes of the pussy whipped friends. I see them wasting a great deal of time doing stupid things (shopping, generally living as a couple) and then not being able to be themselves. Having to hide truths, even cheating on their girlfriends (at least until the woman gets a real grip on them). I see myself in there (cheating aside, fack lies), seduced by a girl to embark on a family life with things to do, jobs to hold onto, money to make, screaming kids, women telling you what to do and what to wear ! In this society, women are obsessed with their looks and they will project that on men. Here in Japan I see a lot of men turning faggy. Those so-called men, spend countless hours browsing fashion magazines, messing with their hair and putting shit on their faces. I worry about my looks too.. but women can turn your worries into paranoia. They spot a defect, make you notice, and then you spend a week or even a month in front of a facking mirror !!
It’s OK to be honest, but one should also try to be more supportive. If you think I have an ugly face, tell me I have nice hands.
So, when I talk to a friend, it’s OK to exchange some anecdotes about family life, but eventually I want to know what he has been coding, doing, realizing. I want to talk about productive topics, not chit-chat about mundane bullshit. I can do that with everyone.. my brain needs real stimulation !
I learned a couple of years ago to always bring either an MP3 player or a book (usually both) with me.. you never know when someone will start boring you to death. I hate people that make me waste my time. Time is the most precious thing.
Posted by Davide Pasca as Programming, Society, Diary at 5:27 PM EST
6 Comments »
dsharingu/dsharingu_06_01_04.png
It’s past 5 AM. Today I dedicated quite a bit of time to DSharingu (still old release). I finally got some interaction going. The screenshot shows the view that I have of the home server on the PC in my bedroom. I launched Firefox remotely and browsed around.
It took me some time to get to the right function.. SendInput(). Once I found out about it, it wasn’t too hard to use it. However there is still a problem: when interacting with the remote DSharingu window, the remote instance locks !
I think that it’s probably due to the fact that the main loop receives input event remote messages synchronously. So, I tried to relocate the network message input system from the synchronous main loop, into a separate thread. That should solve it, but I’m still not done. I really want to use multi-thread only for those messages that need it, the simulated input messages.
Compression needs more work. I have some interesting ideas, but right now, I want to focus on basic features… optimizations can wait.
I also modified my windowing system. I no longer simulate sub-windows (like the translucent shell frame form the previous version). Every sub-window is now an actual Windows’ child window. This saves me a lot of work… I like to do some basic wrapping, but it’s too easy to fall into the trap of wanting to write a whole sub-OS. Right now, I just need to get things done !
Thanks to my friends in Italy (Jag and Rasty !), my family is getting back to wireless Internet use. Now, more than ever, I need this remote administration thing. Once all features are up (no self-locking and keyboard input), and once things are optimized for the right bandwidth, I should be able to remotely show and fix things !
The program as it is now, will allow me to accept connections, because I have full access to network ports at home.. however, this may not work in the office, where I’ll be firewalled like my parents are.. both can call out, but neither can accept a call 8(
For cases like that one, I plan (hopefully with some help !) to convert DSharingu to work as a Skype plug-in. Skype is very flexible, making it easy to transfer data without having to worry about firewalls.
We’ll see !
zzzzzzzzzzzzzzzzz
Posted by Davide Pasca as Image-processing, Programming at 5:44 AM EST
11 Comments »
I look at the clock in the taskbar of Windows, and it’s actually 2006 !!!
I somewhat overlooked that as I spent this new year’s eve the Japanese way, in a temple near home (very near actually, 6-7 minutes walk).
This is the second time I go to the temple of my area, last time it was 2 years ago. I kind of like going to the temple. Spending time relatively quietly, rather than trying to go wild. Fack the countdowns, the mega-plans to do mega-parties.. bha !
In my town’s temple there is also a Japanese drums performance, or taiko (太鼓). This year the lighting was better, so I could shoot better footage. I’ll be editing the clips I took and we’ll see what comes out. I also have some pictures taken by a friend which I’ll post later.
Recently I’ve been thinking to buy a new camcorder and digital camera. But I’m really not happy with the current technologies. Especially with the camcorders. They all seem to stick to Mini DV tapes. To edit anything one has to reverse a tape on the PC.. at normal playing speed !! Thats sucks !!
With both camcorder and digital cameras.. the compact choice is always disappointing. You either go around with a “bazooka” or be happy with noise-ridden images or footage.
On the 28th I went to see Ferry Corsten at a club here in Tokyo. Same place where Armin Van Buren performed. Only, Ferry Corsten was much more fun. He played a better selection of tunes, including those he made himself, which I think are really good.
A DJ’s job is to select other DJs tracks to play, remix them and to create own tracks as well. I think that Ferry Corsten is really good in general. People at the club seemed very excited. He definitely has some hardcore fans. Although world-trance isn’t really that popoular in Japan, hence DJs coming more often on weekdays rather than on weekends.
I noticed that all those famous DJs are pretty popoular in the US. I suppose that it all happened after I left the country. It’s interesting. I always felt very much different form the average American guy, but it’s cool to know that there are hordes of guys that like the same music I do ! It’s been said that music unites people.. I can feel it now. It basically means that people feel closer as they realize that they have interests in common.
Anyhow… I took some pictures, what I could with the cell-phone (no cameras allowed inside, of course). They don’t really show much, but they are still something to share, I suppose. Here is the album: ferry_ageha_2005.
As a final note… I quietly released DSharingu. It’s still only about seeing the other person’s desk, still no interaction, but it’s a release !
The actual interaction isn’t too complex to implement, and I think it’s about time that I implement that ! …possibly for the next release, which shouldn’t be taking more than a week. …it’s important to keep the releases going now, or things will cool down quickly.
zzzzzzzzzzzzzzzzzzzzzz
Posted by Davide Pasca as Diary, Japan at 5:50 AM EST
No Comments »