From Furniture Websites To Sweet Home 3D

It isn’t a mystery that my wife and I started looking at properties last year — I have announced it in March, mentioned it when thinking about transports, and given how angry I sounded about property managers, it would be surprising otherwise.

One of the things that was quite important to us in the selection, was to figure out how our furniture (we’ve been mostly renting unfurnished) would fit in the new space, so to know which furniture to rehome early and what we would be getting — spoiler alert, the awful IKEA Markus I brought over from Dublin is not coming with us.

Thankfully, most of the developers in the UK would provide some sort of non-binding floorplans together with the various model of houses they build — there’s usually only a handful of options you have available, and as soon as you start filtering for a specific number of “bedrooms” (we’re not going to use them all as bedrooms) then the choice is indeed quite limited. But how do you try fitting items into these?

I did remember that Adam Savage suggested at multiple points in the past to build a scale model – in foam or card board – of your house when choosing furniture. Unfortunately, I’m not as good as him when it comes to physical builds, and while I would love to train a bit for that, it is not a great idea to start this, particularly not as a way of comparison. So I thought instead of doing that over the computer — namely, at least originally, Fusion 360, since I have been using that for my designs for 3D printing already.

Fusion 360 allows you to both import an image (“canvas”) and scale it by calibrating it against a known dimension — this is actually a very common operation for most 3D modeling tools, and you’ll see exactly the same pattern in most of the tools I’m going to be talking about over here. I have indeed managed to draw up a set of walls based on a couple of floor plans within an evening. But the problem with that was trying to add (reusable) furniture onto them — I did a quick mock up of our TV stand and the TV itself for one floorplan, but moving that over to the other floorplan was a royal pain.

After that I first tried an Android floor plan utility that had decent (human) reviews and the ability to load some brand-name furniture onto your drawn floorplan. It was awful, both trying to draw the walls in (no way to type in the sizes instead) and trying find the furniture — except for the usual IKEA pieces. Supposedly you can get AI-assisted generation of new pieces based on online retailers but that turned out not to really be a worthwhile usage of one’s time since the end results are just awful.

So instead, enter Sweet Home 3D. This is a Free Software interior design tool, and while it is not free as in beer if you want a pre-built binary with a large library of sample furniture, I found the £15 it costed me were more than well spent to get get back on the comparison — and for plan ahead once we found the house we actually wanted to buy.

Sweet Home 3D is definitely a much better for what I was looking for, and made my life a lot easier: it also allows importing the floorplan image (as a background image) and scale it based on a known dimension — indeed that is so expected of you that it is a wizard that allows you to provide the correct scale with nice zoom capabilities.

As I said, I paid for the larger library of furniture — this does include a number of sample furniture so that you can kinda find something that fits for what you’re looking for — but it does not really include much in terms of real-world items. There is, if you look around, a sold package of IKEA furniture — I did end up buying it (it was just a handful of euro, and when you’re looking at buying a house, those do end up being rounding errors — particularly if they can save you from very expensive mistakes with furniture) but it turned out to be not only quite out of date (I believe it hasn’t been updated in close to ten years) but also is missing many of the staples of IKEA shoppers — no Malm chests of drawers, for example.

So I was a bit on the annoyed side — until I remembered I’m a reverse engineer by hobby and looked at the Malm chest of drawers that we already own on the IKEA website, which has a nice and interesting “View in 3D” button right there! What are the chances that I can reuse the same 3D they are rendering for me in Sweet Home 3D?

Now, I should point out here that 3D modeling and rendering are not my field of expertise at all. I have a little bit of practical experience by now with 3D printing, but pretty much all of it has been functional and mechanical, which is not what this project was at all about. It also means that the only type of 3D models I have dealt with have been STL and 3MF files that are usually designed for print, not render, which means things that might sound obvious to folks in the industry, were quite not obvious to me!

The first thing I did was get a hold of the requests that the IKEA website does when you request to see the 3D model — you can do this with your browser of choice but, despite me being a Chrome user, I found that this is slightly easier with Firefox, as you can save the response directly without having to re-fetch it with curl or similar. When looking at the fetched URLs, I was looking for something… substantial, in terms of size, since at that point I had no idea what type of filenames, formats it used, and whether these are even at all standard, and not just some proprietary JavaScript.

Turns out the answer is that the IKEA website uses glTF files, which are pretty much standard files used for WebGL rendering — all very plain and standard. While Chrome does not appear to show the type explicitly, Firefox Dev Tools show it as gltf-binary — and you can download the file either by copying the URL and curl, or by saving it directly from Firefox. On the negative side, this is only working for active products, and it turns out that a number of our furniture is discontinued – starting from the Not uplighters – and for instance the pendant lights are missing the 3D view.

Technically, I have hacked up a quick Python script to download the files from the IKEA website based on the product ID — but I don’t really feel like I should be sharing this to make it too easy to abuse… maybe once I don’t care about it anymore!

Unfortunately, Sweet Home 3D does not allow you to import furniture in glTF format. But it should just be another format, right? Well… turns out that glTF reminds me of ePub: it’s almost a meta-standard, since it provides extensions, and while the first few files in the IKEA website opened just fine with Microsoft’s 3D Builder, some of them didn’t, at all. This turned out to be because a few years ago Google released Draco, an extension that is used to (lossily) compress meshes to reduce their size and complexity — Microsoft’s 3D Builder does not support these extensions, so you just get errors back.

What most software is happy to ingest are OBJ files — a format born out of Wavefront in the ’80s, and that is basically a set of text commands to describe the 3D mesh. A classic by all means. So how do you convert from glTF (with or without Draco compression) to OBJ files? Well, this turned out to be quite a bit of a task.

Because of the nature of glTF being bound to WebGL, the vast majority of the tooling around it has been written in JavaScript — unsurprising given that even the binary version of the format relies on JSON data. But Google’s Draco library is written in C++, so it does not appear most of the implementations outside of browsers themselves cared to implement support for it. And to make matters worse, Google’s results being poisoned by LLM-generated pages didn’t help — when looking for gltf2obj, which seemed the obvious name for the tool I needed, the only reference Google provided me was a website that suggested installing it with npm and explaining the usage by being basically gltf2obj file.glb file.obj — which would have been lovely, except that there is no such package in npm. Instead, Kagi found a GitHub repository that appears to be exactly what I needed — except it doesn’t seem to work.

Instead, since I was going to just convert models I got from the IKEA website (and a couple of other furniture stores, as I’ll get to) and thus had no privacy concerns about them, I used two different online converters — because neither one of them seems to be able to parse all of them. Aspose.3D appears to be a .NET library that supports most of the conversions I’m talking about, except for Draco-compressed meshes. 3DPEA appears to have a Draco conversion tool but it fails with a number of other glTF files.

So I’m basically trying both every time. If for whatever reason I find myself doing this still in a month or so, then I’ll probably start looking into fixing gltf2obj so that it can reliably produce output, so that we can have an easy path forward for doing this without going to third party services, whether privacy is involved or not.

Once you have a working OBJ file, importing it into Sweet Home 3D is easy as going into the Furniture menu and selecting Import Furniture. The only thing you need to be careful about is to put the right dimension into it, because at least in my case all the imports gets the wrong dimensions and show up at 1/100 scale. Getting the right dimension is easy if you check the 3D view on the IKEA website – do note that the model often includes the optional mounting brackets, which add up from the dimension of the piece, so you really want to check what the model looks like, and input the right dimension, keeping the rest in proportion.

Now, I didn’t just download the models from the IKEA website. Another piece of furniture we’ll be moving is my Steelcase Gesture, an office chair I will never do without — I used to use a Markus, but as I said above, we’re not taking that with us. The Markus pretty much gave me continuous back pain during lockdown, and while the Gesture looks like a hefty price at first, I now own it for over four years, it’s in perfect state, I never had to disassemble to oil it (unlike the Markus) and my back stopped hurting. Friends don’t let friends ruin their backs on a Markus! I used to recommend looking at 2ndHnd for these, as they used to be half price, but with the whole post-lockdown economy, they went out of business so that’s not an option anymore, check your local second hand office equipment warehouse instead.

Turns out that unlike IKEA, Steelcase understand that knowing the fit of a piece of furniture is important, so if you scroll down the product page until you see their Augmented Reality section, you can click on the download button to get the glTF file directly, without having to use dev tools or write Python scripts for it. Kudos to Steelcase!

A lot fewer kudos to Natuzzi. Natuzzi makes a fantastic, and very expensive, recliner called the Re-Vive. This recliner is the luxury we have added to a “maybe” list for our move, and I wanted to at least see how it would look like in a “reading room”. Their product page has a “3D view” that is a much simpler cube-photo viewer (the kind of “360 photo” you can make with your phone, and you can spin around, just done convex instead of concave), but it does have a “view in AR” mode that loads a WebGL view.

But when you look at the developers tools network loads, you don’t see any glTF file, so where does it come from? Well the answer is that they load the glTF file minus the header, which includes the file signature and size. I had to reconstruct that manually – thankfully it is trivial – and was able to import that as well. The process for it was annoying enough though, that I don’t really want to document it too close, as I kind of expect them to break it further if I do.

And that’s it — nothing really much more to this right now: many furniture stores websites right now provide a 3D or AR view of their products — and thanks to WebGL this means they’re using a standard format, which we can leverage by converting it to something Sweet Home 3D can import and place for us. Which is a lovely side effect of this type of feature being implemented at the browser level nowadays, instead of requiring custom components, whether they are Flash, ActiveX or Java applets. Yay!

Exit mobile version