Hello there 🙂 Happy 2011 for everyone. Today is the last day of January, and it happens to be a day where I’m inspired for our first post this year. In this blog there is no such a thing as apologizing for not writing. As Gandalf once said, a wizard is never late, nor is he early, he arrives precisely when he means to. Good luck explaining that to your girlfriend.
The end of last year was a bit busy. October (as you can read from the last post) was filled with too many travels, talks, workshops. That takes a lot of time and drains a lot of energy. On top of that it makes me re-think a lot whatteheck I’m doing here. I don’t want to rely on one single tool, but the more you work with something the more you are required on that. You specialize into something and that start to be part of your life and identity. And what happens when the tool you love doesn’t seem to be going well? Well who guessed that I’m talking about the Blender Game Engine guessed right. There is nothing to worry about, it’s only that there are so few developers out there engaged in this project that I couldnt see a bright future ahead.
This year I’m to publish a book with my friend and college Mike Pan. The book is focused on the Blender Game Engine and its application on real projects. I can proudly say that I pay my rent with BGE work and I hope in a near future more people can do the same. Actually the motivation behind this project is to provide substantial information on quirks, way of thinking, how to plan, for the BGE. I myself would love to have access to such a book when I was starting, and even later while working harder with it I could certainly use some guindance. So rest assured that the book is being written with a lot of love and with a commitment for quality – the “so you don’t make the mistakes I did” thing. Ah and they are some jokes too. Not many, maybe more on my part, I don’t know. What I know is: the book is available for pre-sale with 36% off. Go get it ! It will be published after the final Blender 2.5 stable release so it can cover everything.
The thing about writing a technicall book is that you go over every single detail of the specific software. While that is fine for regular users, this is quite angusting for someone like me that knows things could be done differently. Working with the same tool daily already raises those growing discomforts. Writing about them even embarrass me. One of those things is the way of rendering texts in the Blender Game Engine.
Blender Game Engine uses a bitmap font (created from a software hidden in the deep corners of the internet) applied to a face. You cannot apply scales for the face that it messes the drawing. Neither can you change the UV map. And the available characters are is way too small. C’mon Portuguese is my mater language, we need accents and latin simbols – çáúíé.
Frustated with that, and with the blessing of my boss (which is starting a cooperative program between UBC and Nippon Foundation therefore could see the longterm usage of native unicode support in BGE) I got my hands dirty and put something together. It certainly helps to have friends smarter than me, and Diego Borghetti – who I met after the Che Blender 2009 in such a great time visiting Buenos Aires and Licuadora Studio – was the one to help me with the Blender way of doing text. He implemented the new ttf drawing code for the Blender interface, so definitively the one ackowledged on that. That plus Benoit Bolsee (the BGE coordinator and my personal guru :)’s review and suggestions and voi lá (image cortesy of Mike Pan showingcase the feature).
And then today I was reading a blog on game development and ran again into the same topic. Check it out:
“You’ll need to be able to render fonts. I use AngelCode’s excellent BMFont utility to convert any font into a PNG with a text data file. Font renderers will need to support all justification modes, and it is very handy to have a render-in-box method that will word wrap text into a box area. This comes in handy for drawing requesters. I also like to have support embedded commands like change text colours or jumping to a tab position so you can easily syntax highlight messages without having to split it into font draw calls.” – Rolling an iOS Game Engine Without Breaking the Bank : #AltDevBlogADay
So I googled it and found this BMFont from AngleCode – http://www.angelcode.com/products/bmfont/
I’m yet to see if this work in the BGE out of the box. It seems that it supports some Asian characters. I keep thinking that this should be happening under the hook, with you providing the ttf and the Game Engine doing the conversion. Then eventually for releasing you export it as a bitmap font.
I’m still convinced that real true type fonts are the way to go. From the artist perspective is way more logical to work with. Maybe my generation is spoiled and the current workflow for bitmap fonts is better. I don’t know but I simply can’t convince myself on that. In the mean time, Blender Game Engine can handle both. At least no one can complains.
I can see how some ttf fonts may restrict the distribution of the source. But if the file is packed into a Blender file it shouldn’t be a problem, right?
More on Blender Game Engine development
At some point in the end of last year I had to decide between help making Blender Game Engine a better tool or to write about it. You can’t write about something that is constantly changing nor I have all the time in the world to dedicate myself for both projects. To set my mind in peace I started a small short term roadmap that I would like to see addressed before the final Blender 2.5 release. The list is this public google document. A friend of mine, from the Brazilian Blender community decided to look at some of the items. Vitor Balbio is known by his award in the Blender Game Contest 2010 with his Lucy and the Time Machine. He is also interested in coding for my roadmap quite attractive for him. He first implemented the option to set/unset the mouse visibility from the UI. Although it sounds simple (and the implementation is trivial for someone acquitanced with the source code) it does envolves changes in the DNA,RNA and UI files of Blender. Ok that may have sounded gibberish but those are important parts of Blender code that any big change has to touch it. After some help (I did the blenderplayer part and changed some small things in his patch) we got the patch into trunk and Vitor’s motivation was way up high 🙂 For Portuguese readers you can find in his blog a testimony of this experience. It reminds me of my excitiment with my first compiled Blender, the first changes, the first patch … 2008 was a changing year in my life. I’m glad to pass the torch and spread the hapiness and share the knowledge.
Next in line was TexFace.
One of the things that embarassed me to explaing how to make a Text in the Blender Game Engine is that one needs to (0) magically get a bitmap font somewhere (1) go to edit move (2) create a UV (3) go to the mesh panel (4) toggle Text there. How many times didn’t I create a UV for an object only to turn its collision off? It’s so disturbing. Please don’t take me wrong. I really appreciate all the effort that has been made into Blender/Blender Game Engine.
The problem I see is that it seems to me that Blender has growed up and the Game Engine didn’t catch up. More than that. The beauty of the BGE is its integration with Blender. But then how one can explain duplicated options in both systems that simply do not “talk to each other”? So one day during lunch I brought my sketchbook under my arms and had Mike and I brainstorming on how things could be different. We got to an initial design based on moving almost all the options to inside the Material panel. The nice thing about this is that some options were there already. For example, instead of setting Light for a face, we can use the Shadeless option from the material. Instead of Collision, why not to make the whole Physics settings (friction, force, …) a toggleable option? Ob_color was indeed there already too.
With that idea in mind that things were possible and could have a better design I dared to present this for some developers and users at the Blender Conference. Ton (Roosendaal) pointed out in the coders meeting that some of those options were optmization tricks for the Playstation (1? 2? I’m not even sure). And although a bit relutant even him agreed that they could go away if a good design comes in to take its place.
Well what you see up here is the first stage of the design of Mike and me, the efforts from Vitor and some couching from my end. A lot of tools in Blender lack just that, a better design. It’s easy to complain about something, but to but time to think on all the consequences of an eventual solution, this is something missing. And this is not exclusive to programmers, more and more I see artists helping with feature design and UI planning.
Getting back on track: the next step is to implement the actual functionality – what you are seeing is not only a mockup, but still it only defines saveable properties with no real effect whatsoever. My idea is to keep the BGE internal structure and convert those material options to the old mesh properties. That way we take a safe route and avoid deep rewriting (it’s going to be already a big challenge for Vitor or whoever had taken over this task). I’m excited. And frankly I will be glad to rip off whatever I have written in the book on TexFace to open room for the new material options. Let’s hope he succeds!
There is one big drawback with this change. There is no possible way of doing backward compatibility. In other words, Blender 2.49 files that were relying on those options will have to be updated manually. That shouldn’t be a big of a deal and in my humble opinion it’s a good trade-off. And if we don’t do things now, when will we do?
feedbacks are appreciated
I don’t know, those are only late night rants and pondering
By the way, I just re-watched Ratatouille. I know realized that I really like Brad Bird’s work. From Iron Giant to the Incredibles and Ratatouille. He is great. I’m saying that because Toy Story, although my favorite movie of all times, disappointed me a bit on its 3rd film. I probably had my expectations set way too high there. I will watch it again and again to see what is behind that. At some point I may like it =)
Speaking of mixed feelings on Pixar movies. Wall-E is a beautiful movie. The first part is a masterpiece for me. But there is something in the second half of the movie that simply gets too carried away for me. My current guess is that the kind of “patriotism” shown there seems too much “American” (and by American I mean North American, which does not include Brazilians like me). It reminds me of Spider Man 2 when they replaced the scene where a disasters happens (involving a trains or a plain, I don’t remember) with a cheerful scene with New Yorkers helping Peter Park against the bad guy there (was that still the green goblin? I think so). All that only because of the 9/11. You know we, Brazilians are very patriotic. Some may dare to say that we are even way too much. But when you have to show it in a public way like this seems a bit over the top. Be proud for some real thing, not this “we are Yorkers ehhhh o/” talk. Dark Knight has its moments of that too, but I will take it easy on my rant here. It’s a good movie after all (although I was hoping for both boats to explode).
I just realized that I got side-tracked here (: What I wanted to talk about Wall-E is:
1) the book Art of Wall-E is sensational. The movie itself is full of pantomima. It’s a silence movie on its best. It makes me watch more Chaplin with new artistic eyes. The book explain a lot how was difficult to convey a world that does not exist and where there is not much dialog (no dialog at all when it comes to Wall-E and EVE). A must have/borrow/take from the library. I got mine for CAD14.00 – I love when those books go on sale.
2) the Blu-Ray is unique. It really is. Instead of only voicing-over the movie with the director explanation, you can see the reference images the artists used for the initial scenes on top of the screen while the movie plays. That’s finally a good use of Blu-Rays. I hate BluLive and I hate even more DRM. But I can’t help staring breathless for a HD crystal clear image. It’s the magic of our times.
Books and Blu-Rays. Technologies so far apart in the modern man evolution and at the same time equally fascinating.
That’s life, this is 2011 coming up at full speed
May this be a great year for all of us.