CrazyBump or ShaderMap Pro

Development, OGRE, Tech 8 Comments

I posted about this in the artist’s section of the Ogre forums already, but I figured I’d post it in my blog too.

I’m looking for a content pipeline to generate normal, displacement and specular maps from reference photos, and I’ve been playing with the demos of both CrazyBump ($299) and ShaderMap Pro ($19.99). In my tests, CrazyBump seems to give me the superior results very quickly, and I’ve been impressed by both the default setup and the amount of tweakables it has. It seems to pick up surface details really well compared to ShaderMap Pro, which seems to muddy them a little in most cases.

A case in point (CrazyBump on the left, ShaderMap Pro on the right):

crazybumpshadermap_test

The results are very similar, except that the surface of the stones is more ‘polished’ on ShaderMap; the indentations and scratch marks are always lower frequency, and the fine details are generally being lost. Yes, I know they’re probably using slightly different preview shaders, but the differences are obvious in the textures themselves too. I’ve tried tweaking all the generation settings and yet I still can’t get ShaderMap to register the scratches and scuffs at the level of detail that CrazyBump does right off the bat. CrazyBump also has lots more options generally when it comes to tweaking the results and I’ve found I can get quite customisable results with the input images I’ve tried.

So to me, it looks like CrazyBump is worth the price premium. ShaderMap Pro produces some nice results too, and for $20 it’s very good value, but it doesn’t seem to meet quite the same quality level as CrazyBump. What says the Internet? Any other suggestions?

Tempting fate – a (possibly final) back update

Health, OGRE, Personal 11 Comments

hunchbackI’ve been pretty busy lately, so there hasn’t been much time for blogging – I’ve tagged a few subjects for future expansion in my drafts, being very much a reentrant blogger, but so far meat has only been added very sporadically to those particular bones. By the time I get around to filling in the detail, the subject matter will no doubt be considered ’stale’, but maybe my particular brand of commentary might lend a modicum of life to them anyway.

I’ve deliberately avoided talking about my back for a while, for multiple reasons; firstly, that I suspect it gets a little dull to read, and secondly it seems that whenever I talk about it on this blog, it seems to get worse the day or two following. I’m not a superstitious man by any means, but it’s really quite uncanny; of course, it’s probably just because when it’s feeling better, I’m more likely to overdo something & injure it again.

So, with he appropriate caveats about what might happen in he next 2 days, the good news is that ever so slowly, my back is improving. After several months of following the advice of my physio to concentrate on stretching out and lengthening the muscles and tendons in my mid-upper back, to stop them clamping up and locking my back in enormously painful ways, I’m definitely seeing positive results. I now do about 1.5 hours of exercise and stretching per day, and go to the gym twice a week on top of that for something a little more strenuous. It still hurts moderately every morning and most evenings, and occasionally I get a more serious bout which requires me to take painkillers (usually the day after doing something unwise, or being too immobile such as when travelling for long periods), but overall, I can see positive results. Each month I seem to be a little bit better than the last – it’s not a fast process, but at least it is a process.

As you can imagine, it still plays havok with my daily routine, and I’m almost constantly frustrated at the amount of stuff I can get done these days. Years of sitting at the PC until 2am if that was ‘necessary’ led to a certain baseline expectation of how much I could do in a day. Now, I’m mostly a regular daytime beast, with a few extra hours at the weekend and the occasional evening here and there, so it’s quite different. But, I’m adjusting to it, such as learning to say ‘No’ to work offers that don’t feature highly on my personal priority list (which basically means that stuff that enhances Ogre gets top priority, things that use Ogre next, everything else brings up the rear, if at all), and time-boxing what I do in the community / forums – now, if I can’t do it in the time I have, it probably doesn’t get done (by me anyway), rather than the old situation of me just spending as much time as it took. I don’t like having to pass on work, or get slightly out of touch with some aspects of the community, but on balance it’s an acceptable sacrifice given the alternatives, no matter how guilty I might feel about it sometimes.

So, if I don’t talk about my back much anymore, it’s because it’s just on a very slow but seemingly steady road to recovery, which as you can tell, doesn’t make for very interesting blog posts ;) It doesn’t mean I’m ‘better’ yet, and I’ve accepted that I’ll never be able to return to my old ‘all night coding marathon’ days, (revel in those while you can guys, but definitely think about giving them up before your back ends up like mine did) – but it’s probably time to stop talking about it now. My thanks to all those who sent their good wishes, and helped me out over this rather testing time.

Back from FMX/09

Business, OGRE, Travel 13 Comments

Yes, I got back from FMX/09 last night, after the usual pain-in-the-ass shuttling between London airports to make my connections and the inherent waiting around that entails. I’m constantly disgusted by the amount airports charge for internet access so I left writing this post until today.

I really enjoyed FMX – it was the first graphics conference in which I’d been officially on the speaker bill, so I’m not sure how well other conferences treat their speakers, but at FMX I thought they did a fantastic job; everything was really well organised and went very smoothly. I actually enjoyed FMX more than Siggraph to be honest; it’s smaller and I found it a bit more manageable, and people seemed to have more time to talk. The speakers dinners were great for meeting & talking with various random people – such as having a quick chat with Ken Perlin, creator of the ubiquitous Perlin noise, and who had already heard of Ogre, which was nice.

My presentation went well, I was fussing over and tweaking the content right up to the last minute – was there enough for the time, was there enough technical detail, or too much, and so on – but in the end the feedback I received suggested I got it right. There was theory and arm-waving, I dove into code for a few minutes to illustrate how you build up a simple demo, I showed screenshots of Torchlight and OgreSpeedTree, videos of Venetica, ZeroGear and Dangerous Australians, and ran a real copy of The Book Of Unwritten Tales (and in the presentation tradition, my machine choked on the DVD the first time). In the end the hour flew by and I had to speed things up a bit, leaving 5 minutes for questions, which was just enough, so not bad on a timing front.

The room was also packed, people were standing at the back and sides of the room due to lack of available seating – I had no idea what to expect in terms of interest levels so I was very pleased with the turnout in the end. I also collected quite a few business cards and contacts from people using Ogre or thinking of doing so, which is always good, especially for a free agent such as myself!

I also met up with the guys from Filmakademie (who run the conference) who are developing some really cool tech using Ogre, such as procedural facial animation systems and non-photorealistic rendering. The editing framework they’ve built for these kinds of projects to sit on top of is looking really slick (it reminds me a bit of Houdini), and the good news is that they’re going to be releasing it as open source (LGPL) very soon, so I’ll be sure to link that both here and on the OGRE site when it’s available, because I think a lot of people are going to like it. All in all it was great to meet them and we intend to stay in contact in the future.

I’d like to thank everyone at Filmakademie (Constanze, Volker, David, Stefan, Nils, Simon and Thomas) for inviting me, and making it such an enjoyable visit.

[edit]Oh, and please bear with me if you’re waiting for a reply to something – I did manage to keep up with email somewhat whilst away, but more significant things will have to wait for me to catch up with them in the coming days.

Runic Games using Ogre for new game ‘Torchlight’

Games, OGRE 7 Comments

I’d been tipped off about this possibility a while ago, but couldn’t say anything until now – Runic Games are now OGRE users and have been beavering away on their new game ‘Torchlight’, announced this week:

In case you didn’t know already, Runic formed from the ashes of Flagship Studios, and includes members of the team that worked on Diablo and Diablo 2; games which I personally enjoyed but which my brother in law almost worshipped – he still plays the second one now. Torchlight is along the same kind of lines as I understand it, except that it will come in two forms – a single player game later this year, and an MMORPG in future years, and is being published by Chinese online publisher Perfect World.

Congrats to Runic on their reveal this week, and we wish them the best of luck with the game – it’s already looking great. We’re also very happy that such a veteran team is enjoying using OGRE, enough to put one in only their second public screenshot ;)

Deck13’s Venetica – looking pretty sweet

Games, OGRE 6 Comments

venetica1Deck13 are one of the longest-running commercial users of Ogre in the game industry, having completed 3 full retail games using it now. They have 2 more in the works, and one is Venetica, an action-RPG; and it’s looking really nice. I uploaded a bunch of screenshots to our gallery recently which were passed on to me direct, but they have more on their website too, like the one shown here. It actually reminds me a little of Fable 2, which is praise indeed.

As you can see, they’ve made good use of HDR and post-processing effects (I particularly like the fluid simulation they used for the ’spectral effects’), some nice dynamic texture shadows and their animation pipeline (skeletal and facial) which served them so well in previous games make a welcome return too. It’s worth watching the trailer on the game site to see what I mean there.

Venetica is one of the games I’ll be featuring in my talk at FMX/09 in May, where I’ll talk about a few of the technical details and show a longer video from their beta, which shows off the animation and effects even better.

Once again some great work from Deck13; these days they have a little more company at the upper end of the eye candy scale of OGRE game development (from people like Nimblebit and KING Art, who will also be featuring in my talk), but there’s one thing for sure, they never cease to impress.

OGRE on the BBC web site

OGRE, Open Source 3 Comments

animationdecathlonThis is cool – last weekend OGRE was one of the technologies behind an interactive public event called Animation Decathlon, inspired by London 2012, which involved kids in London playing a kind of version of Track and Field via Arduino-controlled custom ‘thumping pads’ :) The images were projected onto the side of Kensington and Chelsea town hall, and the BBC has a page about it.

If you think the characters look like they were drawn by children, that’s because they were :) The characters in the game were drawn by kids from the borough and animated by the creators, Quadratura.

I love this because a) it’s in the UK, and open source adoption is much lower in the UK than in the US or Europe, and b) because I just love public events / art like this. In recent years it seems OGRE has become increasingly popular for this sort of work, resulting in OGRE-based applications appearing in public spaces all over the world, such as the Science Museum in London, the Calgary Stampede, the Australian Museum in Sydney, and the history museum in Nantes, among others.

As well as being happy to see OGRE in unique set-ups like this which are always interesting, it’s also gratifying because by nature systems of this sort need to be robust – they’re sitting there all day being tinkered with by loads of (untrained) people, so they require a certain level of resilience and stability :) Therefore I treat the fact that people are trusting OGRE to run them as a very positive thing. We’ll keep trying to be worthy of this trust!

Google Summer of Code 2009

Development, OGRE, Open Source 1 Comment

GoogleCodeAs I just announced on the OGRE site, I was really pleased to find out today that we’ll be participating in Google Summer of Code 2009. This will be the 4th year running for us, and it wasn’t at all a given that we’d be accepted again this year – even though I think we’ve been a good mentoring organisation for the past 3 years, there are always new organisations wanting to get onboard and there are a finite number of places, so I wouldn’t have gotten my panties in a bunch if we’d been passed over in favour of letting someone else have a go this year. As it happens though, we’re stepping up to the plate again, and everyone is really looking forward to it.

We have a bunch of great mentors lined up again this year- multi-year veteran Paul ‘tuan kuranes’ Cheyrou-Lagreze, core team member, 2008 mentor and 2007 student Brian ‘Praetor’ Johnstone, core team member and 2008 mentor Assaf Raman, new mentor Benjamin Chauviere from commercial OGRE users WestImages, and, well, me. :) Yes, I’m back mentoring again this year – I took a break in 2008 due to my workload and was just a backup mentor and organiser, but if 2008 taught me anything (with my back problems), it’s that work has to come second to the things you care about. I love the Summer of Code, I think it’s such a unique programme that I can hardly believe it’s running for a 5th year now (we missed the first year) – who would have thought that a company would pay students to work for open source organisations in their summer holidays, regardless of whether the subject matter was directly relevant to their own business?. So I’m glad to be reprising my role as a mentor again, as well as being the overall organisational shepherd :)

There’s a great vibe to the programme, a real enthusiasm that’s infectious. I’m sure that in years to come, all of us, mentors and students from all the organisations that took part, and the Google staff (particularly Leslie) who go well beyond the call of duty, will look back on this period of our lives and think “Hey, you know what? That was pretty darn cool what we did there.”. You can’t ask much more than that of life.

Learning to love CMake

C++, Development, OGRE, Open Source 11 Comments

cmakeThe trouble with developing a project which is not only cross-platform, but is old mature & wizened enough to have users dotted across a whole history of incompatible versions of the same tool, is that you end up having to maintain a ton of project files. Linux makefiles, 3+ versions of Visual Studio, Code::Blocks, XCode, Eclipse – it all gets a little unmanageable. I’ve been meaning to look at cross-environment build managers like CMake for a long time, but the time investment required to port & test, let alone learning how to do it, was daunting enough that it never seemed to make it to the top of my TODO. One of the problems was that despite CMake being well respected (projects like KDE and VTK use it), the documentation is a little impenetrable – most of the online stuff being a pretty dry reference that’s difficult to get started with. There is a book, but it’s hard to get hold of and the prices are just crazy even for a technical book – Amazon sellers were asking 70 quid for it used! As such I was never sure if it was going to work out and didn’t really have the spare time to try it.

But, as is so often the case, here’s where the open source community steps in and helps out. CABAListic (aka Holger) has been working really hard not only to get OGRE building with CMake, but doing a damn fine job of it too, with the kind of attention to detail that really makes all the difference. He’s done all the heavy lifting, and by looking at his work I’ve been able to get up to speed fairly quickly, both with the principles and some good practices, and I’m really starting to like CMake a great deal. Right now, it exists in parallel with the other builds in trunk, but relatively soon we’re expecting to make CMake the primary build system – I’m even skipping updating the old project files for the new paging component I’m writing right now and going straight to CMake, and it’s really very nice to use. Sure, you have to edit text files, but they’re easy once you have a pattern defined, and the way CMake checks them before building & refreshes the generated configuration is pretty slick. And I certainly won’t miss poring through page after page of project settings in VS, sometimes for each build configuration, to manually tweak options for multiple projects.

As well as not needing to update so many project files (the exception is XCode which will be separate for now, since I’ve yet to figure out if CMake can do everything I need it to, given the oddities of frameworks and universal binaries on OS X), it’s nice to be able to give people an interface to creating custom OGRE builds (e.g. enabling threading modes, double-precision, static linking etc), and the ability to build them into external directory structures from one source release. Having the equivalent of a ‘configure’ step (as seen on Linux) everywhere is also very nice, for performing sanity checks on dependencies and the like. Also, the fact that the source build collates the final result in a separate location means we can finally unify the directory structures as viewed by 3rd parties between the SDK and source releases, which will smooth things for people moving between the two or publishing add-ons for people using both.  We can also provide CMake files to make it easier for people to locate OGRE when they want to build against it.

Doing something as major as replacing the entire build mechanism for a project is pretty significant, but I can already see the benefits. Huge thanks to CABAListic for getting this rolling!

A weight off the mind

OGRE, Open Source, legal 10 Comments

Important: the subject matter and parties involved with this legal issue are deliberately not mentioned here; if you are aware of their identities, I ask you not to mention them publicly here in comments, or anywhere else.

As some of you are already aware, over the last few months there has been an ongoing legal issue with a 3rd party having allegedly used OGRE code without respecting the license conditions. I hate getting involved in legal disputes, there are so many more useful things to do with time, money, and emotional energy, but nevertheless as custodian of OGRE it falls to me and my company to take charge of situations like this, however reluctantly.

Happily, the issue was finally resolved today. Details are confidential (so don’t ask), but what I can say is that a satisfactory resolution was achieved, and without me having to remortgage to fund the legal bill. The Free Software Foundation Europe were very instrumental in advising me on the case, and directing me towards good legal representation, so I really can’t thank them enough for their help; but I hope that the donation I’ll be making will go some way to repaying my debt to them.

On the whole though, I’m just glad it’s all out of the way, it’s one less distraction :)

Using Shadowbox.js with Slickr Gallery

OGRE, Web 15 Comments

Obviously I’ve been doing a lot of web work this week, getting ogre3d.org back to how I want it. In a lot of cases that’s meant changing the software wholesale – something you really don’t want to be rushed into, but in this case I had no choice.

It’s been one of those weeks where I feel like I’m desperately doing a headlong sprint, only to run into an invisible brick wall two feet from the finish line. A number of the pieces of software I’ve tried using have been in the ‘almost, but not quite’ bracket. We used Gallery for years for example, but had never upgraded past version 1.5. Given that I’m making sure we’re not languishing on any old versions any more, I obviously picked up Gallery 2.3, spent a fair amount of time re-importing all of our galleries with the metadata attached, integrating it with WordPress via WPG2, and styling / configuring it the way I wanted, only to find that when I put it on the live site, the memory usage was completely unacceptable, even with all non-essential plugins disabled and full optimisation turned on. We’re a reasonably high-traffic site; nothing compared to some of course, but still higher than a lot of places), and it was clear fairly quickly that Gallery 2.x was going to be a dead weight – literally as soon as I enabled it the server’s available memory would plummet like a stone. I wish I had a representative performance testing set up to try these things out beforehand – sometimes I miss having the resources of a larger organisation to tap into in cases like this!

Rather annoyed at the time I’d wasted, I then tried NextGEN Gallery for a little while, but found that inadequate too. Again it was almost good enough, but unfortunately the navigation between albums was not very good, and would require some modding to make it work well. And that was even before I knew how it would perform – I suspected better than Gallery, since it’s a lot less functional, but still, it was an unknown, and I didn’t want to spend time fixing it up the way I wanted (like I did with Gallery) only to find I have to toss it out.

So finally, I settled on hosting our gallery on Flickr instead of self-hosting, and exposing them on the main site via Slickr Gallery. Slickr has a really nice navigation mode and looks very slick (it’s aptly named), and using Flickr for hosting obviously has bandwidth and performance advantages.

The one problem with this solution though was that the lightbox that Slickr uses is a bit weak. It can only handle a fixed-size window (although it will resize to the aspect ratio of the picture), which means the image is almost always too small on a decent sized screen. You can increase the size, but then it’s too large for smaller screens and you have to scroll, so it just ends up feeling unsatisfactory. So, instead I wanted to use Shadowbox.js, which resizes dynamically to the client area of the web page, which is ideal. Unfortunately Slickr doesn’t have an option to change the lightbox, and there wasn’t much information online about it. So, after some tinkering, I discovered how to do it:

  1. You should have Slickr, Lightbox-2 and Shadowbox.js installed.
  2. In wp-content/plugins/slickr-gallery/slickr/slickr.php, replace all instances of ‘lightbox’ with ’shadowbox’
  3. In wp-content/plugins/slickr-gallery/slickr/slickr.js, replace “initLightbox();” with “Shadowbox.setup();”

That’s it.  It’s fairly simple, but it took me a bit of trial and error to get completely right even though the end result was trivial (Shadowbox’s code is a little hard to read). I originally made more changes thinking I had to do more than this, but ended up breaking things in IE, or in certain navigation cases. This simple change seems to work in all reasonable cases (IE7, FF3, Opera9, haven’t tried Safari yet). You could probably make more changes to remove the Lightbox-2 dependency entirely (disabling the plugin breaks Slickr still), but I have other things to be getting on with for now. Like uploading and tagging all the old screenshots!

Edit: here’s the result. Yes, I know the page title says ‘Page Not Found’ (something to do with the way Slickr redirects page entries), will try to figure out how to fix that later.