This post is demo-ing the capabilities of a 3D JavaScript based library, Threejs and WebGL.
You need to use a browser supporting WebGL for the demo to work, so it only includes Chrome, Firefox and Safari.
And you also need to have WebGL enabled on those browser. See here for more details about how to enable it.
The full source code is available here:
Here are some .json file I created with Inventor to play with: download them locally and drop them in the upper zone...
Commands:
Z + Mouse to Zoom
P + Mouse to Pan
R + Mouse to Rotate
Hey Philippe,
This really is ultra super cool.
Congratulations!
Is it easy to identify sub-components within the model?
Associate data with them?
Would it theoretically be possible (or maybe even easy) to expand this to simple editing operations?
I assume this system would work just as well on any device, including tablets and phones etc., providing the browser supports WebGL?
What browser with that functionality would you recommend for the iPad?
Thank you!
Cheers, Jeremy.
Posted by: Jeremy Tammik | 06/28/2013 at 04:33 AM
Yes identifying the components is easy and any data could be attached to them. The format used is the same than the one in the devdays viewer.
The data displayed is a mesh, so editing would be quite challenging I guess...
This will work with any browser supporting WebGL: http://caniuse.com/webgl
Posted by: Philippe | 06/28/2013 at 05:46 AM
Great!
Thank you.
Another question: where can I find a definition of the JSON format you are using?
I analysed the files you provided and see the FacetCount, VertexCount, VertexCoords, VertexIndices, Normals, NormalIndices, Center, Color and Id properties they define, and that all makes perfect sense.
Still, it would be nice to know exactly how those are defined and whether some are optional before I go ahead and start implementing such an exporter for Revit... :-)
Cheers and happy weekend to you!
Posted by: Jeremy Tammik | 06/28/2013 at 08:16 AM
Hello,
great job ! How do you obtain the json file by an obj file or whatelse 3D format ?
Posted by: Gulp | 09/11/2013 at 07:41 AM
Hi,
In that example the json file was generated by some custom code. I used the Inventor tessellation API CalculateFacets to get coordinates of the vertices, then exported it in my own format to json using that lib: http://james.newtonking.com/projects/json-net.aspx
Posted by: Philippe | 09/12/2013 at 12:22 AM