Back to Posts List

Verold Now Optimizes Your 3D Scans for the Web!

Posted May 07, 2013 by Ross McKegney

At Verold, we are committed to letting you bring any professional 3D content to the web. This means, if you work in 3D Studio Max, Maya, ZBrush, Blender, SketchUp, or any other 3D modelling package, you will be able to bring your work to the web. We also recognize that there's another way to get content - by scanning it. Verold Studio has always supported uploads in STL, PLY, and OBJ formats - the standard formats for 3D scanning and printing. However, results have been a mixed bag. 3D scans capture a point cloud using photogammetry or lasers, then stitch these points together. As you can image, the resulting meshes are not nearly as concise and beautiful as what an artist would produce manually. Consequently, uploaded scans are often clunky and slow. 

We've set about to address these issues, with new features that are just now rolling out to Verold Studio. We're well positioned to do this: our history is in geometry processing, and we at one point had our own photogammetry solution. We bring the same diligence  to this challenge that we brought to solving quad remeshing in ZBrush last year - and the results are awesome! You can give us your clunky scan data, and we'll give you back a runnable, viewable version of your model rendering beautifully in your browser.

We love seeing the Verold embed widget showing up in blogs and forums, but what we're most excited about with this release is to empower a new era of online storytelling. Museums engaging with their audience in new ways, by allowing them to interact with, and co-create exhibits, experiences, and games from scans of their artifacts. This was the topic of my workshop at Museums and the Web in April, and from that we have several projects underway that we will hopefully be able to share soon. 

I'm not going to get into details of how you scan. The hands down leader in the space is Autodesk with their 123D Catch consumer product, and Recap professional product (more on that in a follow on post). Agisoft Photoscan is another great photogammetry option. There are several Microsoft Kinect-based scanning solutions available as well, though as far as we can tell these are all pretty early Beta products. We've got an API, and our solution can integrate nicely with any scanning package; as we test more we'll be sure to share them here on our blog.

For purposes of this article, I'm going to focus on what happens after you get your scan. To do that, I'll start with a nice 3D scanned model from Thingiverse (an awesome site, full of great 3D content):

Marble Statue of a Lion, from Thingiverse 

Marble Statue of a Lion, from Thingiverse 

I'm going to download the STL file. Sometimes, you will get an OBJ with textures, that is even better. The file is already pretty clean, and I could upload it to Verold at this point - but first let's take a sidestep and inspect the model. My favourite tools for touching up models are MeshLab, MeshMixer, and OpenFlipper. For this demo, we're opening up the model in MeshLab. 

Lion model in MeshLab

Lion model in MeshLab

It's useful to open the file in a modelling package like MeshLab, because sometimes the scanning process can leave artifacts. You'll end up with some garbage polygons at a long distance from the model that you want to display. In this case, the model looks pretty clean. 

The other thing to check for is how many polys the model has. In this case, you see the model has 172,246 polygons. Because it's a scan, there's only one mesh part, but that's a very heavy mesh part. More polygons means more data to download, and a heavier load to put on the system when it renders the scene. If all I want to do is upload this model and display it on its own, then I'm probably OK (anything up to 200K polys will render on a modern computer). If I want to put this in a scene with other objects, or if I'm worried that any of my audience has a slow network or older computer, then I will probably want to optimize the model.  

Since the model is already low enough polys, I could just drag and drop it into a project in Verold Studio. However, I want to introduce you to some of the features of our import pipeline that are not yet available to the general public. These features can only be used though our API, designed for partners wishing to integrate Verold Studio with their products, or internal production pipelines. You can learn more about our Uploader API from our GitHub page. To try out the uploader with optimization parameters, grab the Python upload script from there and run it as follows:

python decimate.py -k api_key -d 0.2 lion.stl

You can get your API key from http://studio.verold.com/api. The -d parameter in this case says decimate to 20% of the original size. Decimation is only one facet of our optimization solution, but it can have a significant effect on the final look of the model. Decimate too much, and you will lose some of the visual fidelity of your model. Not enough, and your model remains too heavy and slow to be useful on the web. As with many areas of working in 3D, it's never quite black and white. Since we are projecting high quality detail back onto the decimated mesh, sometimes you can be surprised how much you can decimate your model and still get a great result.

You probably know Verold for our Verold Studio online tools. But that's really the tip of the iceberg: making everything that we let you do possible happens because we've also got some serious geometry processing expertise in the backend. When you fire off your model to us, with the magic decimation parameter, we're kicking off a pipeline of our proprietary tools to do our best to decimate the model while at the same time keeping the features and detail that makes your model or scan unique. All that said - this process might take a few minutes, so if you're using the optimize option on your upload, best to go grab a coffee and come back! 

Now to show you the results! First up, the Lion decimated to 80% of its original size. Better than the 123D output, but still a very heavy model, and as you will see all but unusable for real-time: 

Now, let's get a bit more aggressive. This version is decimated to 20% of its original size. Keep in mind that we're losing quality with the scan, and then again with the decimation - BUT, I think you'll agree that we're doing a pretty good job relative to the original scan on Thingiverse. Very interested in your feedback though! 

What's really exciting about this is that we now have an end to end solution for bringing 3D scans to life on the web. With Autodesk 123DCatch, you can easily capture your models. And now with our pipeline tools, you can optimize and import. For now, these tools are available only through the API, but once they've been refined we'll bring them out of Beta and put them front and center inside Verold Studio. We're actively looking for testcases, so if you have 3D scans, we'd love to work with you to show you how you can repurpose them to interactive experiences. And if you make 3D scanning software, we'd love to help you integrate with our API.