Depth editing and imminent update

Hi folks. Just another Sprite Lamp progress report. Before I go into that, I want to give a shout out to two projects that are on Kickstarter right now that are making use of Sprite Lamp. First off, Hive Jump – a 2D shooter with local co-op, and with plenty of dynamic lighting to show off. Secondly, Elysian Shadows, an RPG with some next-gen lighting techniques – they’re not as far along with their Sprite Lamp usage but I’ve been in touch with them about it and they’ve got some sweet stuff planned. Both projects seem to be kicking some arse already funding-wise but you should still go and check them out.

Next Sprite Lamp release

So, I said in my last update that it would be the last time I do an update via the moderately dodgy dropbox link method, as I’d be moving to Steam. I was hoping to make good on that plan, but getting up on Steam is taking me a little longer than expected, and I’m currently sitting on some features that I want to put into backers’ hands sooner rather than later. As such, there’s going to be one last pre-Steam release, and it will be some time over the next few days. This also means one more release with a dodgy not-so-useful Mac version, unfortunately, but see below for some more encouraging news on that front. I’ve been hard at it on the features though, so this next update should be a good one. For everyone, it will contain the Spine integration that I mentioned a couple of posts ago, which is already pretty cool. For pro users, it will also contain the long-promised depth editing system, which I’m about to talk about. There are also a couple of other small improvements and tweaks to things I noticed needed fixing along the way.

Depth editing tools

As mentioned, this is a pro-only feature. Just wanted to get that in early to avoid any disappointment. One of the major things I’ve been working on is a system for editing and fine-tuning depth maps after Sprite Lamp has created them. As you might know, Sprite Lamp is primarily for creating normal maps, but can also create depth maps from them. However, there isn’t enough information in a normal map to create perfectly accurate depth maps, and in some cases the results could use some tweaking (particularly for elaborate character art or other complex objects). Drawing depth maps from scratch is a pain, though, so I wanted to add tools to build on what Sprite Lamp has created so you can get good results without loads of work. Sprite Lamp’s workflow for tweaking depth maps is roughly as follows:

1. Select edges between pixels where there is a depth discontinuity.

2. Select pixels in the depth map – a process which is aided by the edges from step 1 – that are at the wrong depth (say, the pixels of an arm that need to be brought forward).

3. Move the selected pixels forward or back until they’re in the right place.

4. Repeat until things are as you want them to be.

The depth editing interface looks like this:

DepthEditor

In the preview window you can see the place where you actually interact with the image. The red lines are the edges between the pixels. The cyan lines are contours (their display can be toggled) which helps you see problems with the depth map. Edges can be detected based on various things (such as sharp changes in the normal map or the diffuse colour), or painted directly with the mouse. Selection is also painted with the mouse, although factors such as softness can be controlled, as well as only selected pixels of similar depth to where you started (important for selecting creases and the like). Selection is necessarily soft, because if you have a hard-edged selection and pull bits of it forward and back, you’ll get a big step in the depth function, which isn’t usually what you want.

You’ll also notice that there’s an undo and redo button, which kind of goes without saying with tools like this, but I still wanted to mention it because it was such a pain to implement.

I’ve since gone back to some of the Sprite Lamp test artwork that caused problems for the depth generation algorithm and done some work with the depth editing tools, and so far it has taken me very little time (usually five to ten minutes of messing about) to get things to a good state. I admit I’m not all that sure how many of Sprite Lamp’s userbase will be making extensive use of this feature but I think those that want it will be pleased with the results.

Progress on the Mac port

One of the reasons I haven’t been super talkative about features recently is that I’ve been working on some major refactoring. For the non-programmers reading this, ‘refactoring’ is another word for ‘working really hard and producing no visible results’ – in other words, I’ve been reorganising the guts of Sprite Lamp rather than adding features. This is to make things as quick and painless for the Mac port, which I’m pleased to say is now underway. I mentioned it was underway last time I think, which it was in the sense that I’d confirmed with Rob that he wanted to work on the project and he was looking over the code. Now it’s underway in the sense of code is being written and the MacOS UI is being built. This is pretty exciting for us over here, since Halley (who you may remember as the artist who has done pretty much all of Sprite Lamp’s sample art from the Kickstarter and these blog posts) is a Mac user and is very much looking forward to getting a real copy of Sprite Lamp up and running on her machine. I know there have been some people hanging out for the native Mac version, so I hope the news is good for them too.

Remaining features

The list of tasks remaining on Sprite Lamp isn’t empty, but it is getting pretty short (note that I’m not talking about engine integration stuff for the moment – there’s certainly plenty of work left to do there). I’ve still go a few things I still want to add, though, and I wanted to give people some idea of stuff that is still coming. Two major-ish features that remain on the list, both pro features, are the ability to load custom shaders for the preview window, and the ability to export a mesh based on the depth map you’ve created. Another feature that I really want in is the ability for all the map generation functions to be interruptible – currently they just block Sprite Lamp, which is fine for pixel art because they take a fraction of a second, but it’s a bit awkward having Sprite Lamp basically hang for ten seconds or so while a higher resolution image processes – I’d much rather there was a progress bar and a cancel button. That one’s a substantial task, but I think it would seriously improve the user experience and the usefulness of Sprite Lamp, especially when you’re experimenting with different settings. I also have a few features that aren’t accessible to the command line interface yet that I need to add, namely anisotropy map and palette creation. Finally, if people want it, I’m still up for making a native-looking UI for the Linux build. I feel less urgency on this one, because the Linux implementation of Winforms is actually really stable and responsive as it turns out, but unless people overwhelmingly don’t care, I’ll get to it.

At this point, though, I think that as far as 90% of users are going to care, Sprite Lamp is feature complete, and for the other 10% of users, Sprite Lamp is very close to feature complete. For that reason, I’m going to focus on getting everything aligned for the Steam release and the mac port, and then dive into the more complete engine integration – the features I’ve just mentioned will come after that. I just wanted to mention them in case anyone was worried I’d forgotten about them.

One thought on “Depth editing and imminent update”

  1. Sounds awesome – looking forward to a mac native ui! And further work on engine integration (specifically Unity 😉 ! Exciting stuff!

Comments are closed.