Blender Python Scripting

July 5th, 2009

Fana’briques was great last week ! Since then I kept working on vintage Lego space models re-creation using Blender.

Blender Python Scripting

As I become more and more proficient with the mesh editing features, I still have to tweak some vertices sometimes by hand in a repetitive way. I knew about the python scripting for a while but never really got into it. The main reason was that I was reluctant to learning the scene/object/mesh API. I gave it a try anyway when I saw that there were some templates available for different purposes.

I was able to create some specific scripts quite easily by simply updating existing scripts and in the end saved me a lot of time during modeling. I guess that this is a starting point and from now on I’ll try to master the API one step at a time.

Bugs happen…

May 17th, 2009

As a software developer, one is sometimes tempted to ignore some marginal risks. Using a timestamp or a random number to generate unique IDs is something common in many implementations, even if it could create collisions in some rare cases. It’s sometimes hard to motivate yourself to create something that’s guaranteed to work in every case when the chances of a bogus use are so low.

I stumbled on a bug yesterday that reminded me that however low the chances are that a known bug could happen, it definitely will some day, and preferably in production and at an inconvenient moment.

When I started MKGI Chess Club, a web based chess interface, I imported most of the game rules implementation from another open source chess project. I reviewed it and in spite of a weird coding style decided to integrate it. The site has been running for a few years now and has almost 1 million moves played on it, mostly without any issue in this implementation. The other day, a player notified me that one of his games was stuck. I took some time to reproduce and analyze his problem and finally found what was wrong in the rules code.

This problem would only occur when:

  • A player had more than 2 instances of a given piece. This can only happen through pawn promotion, how many times did you actually have three queens in an actual game ??
  • The second and third of these pieces should have a common reachable tile. This would not happen with the first one !
  • The user should decide to move one of these pieces to the common square, when he has probably a lot of other possible moves available.

Chess Endgame - step 1Here is the actual position of the player who found the bug. After obtaining his third queen, you can see that the second and third ones have access to the square D5. His actual move was D8-D5. The server acknowledged the move, but displayed it weirdly on the board and did not make a move in return. The move has been considered ambiguous by the engine because a move is composed internally by the piece type and target square. There is a way to extend the move by adding the original position when two pieces of the same type can reach the same square, but this would not work correctly when there was more than two pieces of this kind.

Chess Endgame  - step 2Here is the way that the move was displayed to the user. You can clearly see on the board that the move is not understood correctly by the server. Even if the pieces are at their right places, the green trail which should display the latest move shows G8-D5 instead of D8-D5 and the underlying GnuChess engine simply refused to reply to this move.

Even if I was not the original author of the code, it taught me a good lesson and comforted me in the idea that software should always anticipate strictly these kind of bad odds !

Fanabriques 2009

April 21st, 2009

I will have a booth at Fanabriques 2009, a local Lego enthusiasts meetup. I will present the vintage lego space projects that I rendered with Blender. I will also showcase Blender tutorials during the whole weekend.

It will take place on June 27th and 28th in Rosheim, France.

Lego Space model 885

Finally bought EternityII… in vain ?

March 9th, 2009

The $2 Million challenge
I learnt about this puzzle almost two years ago when it was launched. The principle si quite simple, a 16×16 pieces puzzle and a $2 Million prize for the first who can solve it.
Since that time I was thinking about algorithms and all the possible approaches to find a solution. It looks fairly simple but in fact it’s really tricky. Last december, the 1st results were published and nobody did actually find a complete solution yet.

The solver I am developing can now solve up to 12×12 similar puzzles so I thought I could get out and buy the actual puzzle to give it a try. Alas it is not available in shops anymore. I managed to find it on eBay and got it last week. I was really excited, but the same day, in a post sent on an eternity mailing list was a message stating that a group of hungarian students might have found a solution….. There’s no proof yet, and they’ll have to keep silent if they don’t want to be disqualified. I’ll try to persevere on finding a solution anyway, and we’ll know for sure at the end of the year.

Currently my macpro is running fulltime on its 8 processors, handling 150.000 positions/s…. I hope that using its power I’ll be able to get a close approach to a solution in the next months.

My Eternity editor/solver project at SourceForge

Eternity II Official Site

FOSDEM 2009

February 8th, 2009

I went to the FOSDEM’09 this week end. It is the free and open source developers meeting and took place in Brussels. It was nice to attend a few lectures and meet some friendly people around the booths. I prepared some kind of “Open CV” which holded my contact informations along with descriptions of my SourceForge.net projects.

I used it an open souce business card hoping to find some volunteers to use these or help development. I’ll see if this brings more momentum in the future.

Weapons of Mass Creation

December 30th, 2008


I must have been really nice during this year since Santa brought me this high-end Apple Macintosh setup. It’s a 2xQuad-core Xeon Mac Pro. I opened my most cpu-intensive audio compositions in Logic Studio. They took all the power of my iMac to play, and there, I can’t barely see the cpu bar moving….

On the picture, you can see it with its 30 inch cinema display, besides my current iMac and MacBook Pro.

With this setup, I hope to release more music soon !

Projects Update

October 19th, 2008

I did not post a lot in the last weeks despite having been quite busy. Here are the latest news…

I’m working on having full Ajax behaviour in MKGI Chess Club board widgets which manage player notes and chats. It’s in progress in the current SVN release and there will be a 2.3 version coming soon.

My 3D modelling suite Sculpt is also going well. I did implement an independent rendering window with a settings panel and a bunch of fixes.

I installed https service on the apache server hosting my websites. I did also install mod-subversion to grant public access to my non-sourceforge hosted projects from the web.

I hope to have some more to show here soon… And a new musical piece is coming, so keep connected !

New Features in JSculpt

August 18th, 2008

I have done a lot of work on JSculpt, a 3D Modeling software written in Java that I’m developing.

Annotations

Selected items in the scene tree are now highlighted in the 3d viewports with annotations. These will help the script developer to better understand the underlying structure of his objects.

I will try to implement more annotations types, to make the viewports as instructive as possible about object data.

Complete Boolean Operations

Objects may now be combined using all kind of complex structures of unions, intersections, merges and differences. For instance this cube whose centers were extruded by difference operations.

This may look trivial, but generating optimal meshes for these operations is really a challenge. I still have a few issues to solve, but it is functional in the latest SVN version.

See JSculpt project at SourceForge

Final Fantasy XII Prologue for Guitar

August 5th, 2008

Fran, a character from Final Fantasy XIIA new guitar arrangement is available. This tune comes from the soundtrack of Final Fantasy XII. It can be heard during the opening titles. I think that it is featured in other episodes of the series as well, but can’t say which ones for sure.

I did credit Nobuo Uematsu as the original composer, but I’m not sure either that it’s him who wrote this piece initially. Since he did most of the classic episodes soundtrack, I would guess that it’s one of his compositions.

It is available for solo acoustic guitar, as tablature and standard notation.

Get it from the guitar arrangements page.

The Most Aggressive Ringtone ever created

July 20th, 2008

I noticed recently that some people enjoyed having violently disturbing ringtones set on their mobile phones. I don’t know if my mind is a bit wrong, but it made me think about what could be the most aggressive sound that could be used this way.

I thought about it for a few weeks and ideas came. It ended up in an ultra-violent 17 seconds recording that will make get all your work colleages jump on their chairs every time you’ll get an incoming call !

Download it for free at my ringtone page.