Showing posts with label 3D. Show all posts
Showing posts with label 3D. Show all posts

Thursday, January 7, 2016

MeshLab in javascript

We are proud to present the first beta, experimental, buggy, incomplete version of MeshLabJS, the client-side, run-in-browser port of MeshLab. 
Yes, a version of MeshLab that runs directly inside the browser.


It is still rudimental, very minimal, but yet it is a nice example of how current browsers are able to run C++ code compiled into a javascript (thanks to emscripten) at a pretty decent speed. WebGL (via three.js) is used for the rendering. 
Just to clarify it totally runs inside your browser, no 3D data is transferred to a server for processing, all the computation are done (in javascript) locally. Your data is safe as in a classical desktop app. 
It is a bit more than an experiment, there are only a few tens of filters (more to come!), and no fancy tools, but some classics like the renowned quadric simplifier and radiance scaling rendering mode, are available.

As usual everything is opensource, this time on github. If you like it star it on github and if you need some specific meshlab filter, just ask for it on the github issue page.


Wednesday, March 25, 2009

Creating Interactive 3D objects inside a PDF

One of the nice feature of MeshLab is its ability of saving meshes, in a variety of formats. Support for saving meshes in U3D format is useful for creating, using LaTeX, cool appealing PDFs with embedded 3D models.

Yes, that means that when, using a plain Acrobat Reader, you open a pdf like this one, you will be able to freely interact with the 3D model, directly inside the text.

To generate such a pdf you simply need to convert your mesh into u3d format, and include the small snip of latex code generated by MeshLab with the right viewing parameters, in your latex document and simply compile it with pdflatex. Thanks to the Movie15 latex package, you will have your u3D embedded in the pdf. Note that the u3d file format is quite compact; for an example you can look at this pdf that contains the 50k triangle mesh of the Laurana's bust squeezed to less than 250 kb. A zip with sources (latex and u3d file) can be found here.

A couple of notes. The conversion process is done through the use of the Universal 3D Sample Software by directly using the IDTF converter provided with the sample library. The conversion process can take a fairly long processing time (many seconds for a mesh composed by 50k triangles) so be patient! Moreover be careful that the process can fail when involving pathnames with non trivial chars. Moreover very large meshes take a LONG time to be converted, be patient... Acrobat reader support this kind of files since ver. 7.