GLTF - JPG Like Format for 3D Objects in WebVR / Aframe

in #webvr7 years ago (edited)

gltf.jpg

***** UPDATE ****
20181116
I have spent some time researching the state of GLTF since this article was posted. SketchUp now has add-ons that can convert directly to GLTF from the program. I did a test and found a reduction in size to 5MB from 15MB.
This again is a binary file and so loading time on a normal web connection is about three seconds. THis GLTF file had no materials attached. Things seem to be progressing. I am frustrated with AFrame and it's lack of updating. I assume that WebGL turning into a different standard might have something to do with it. Also WebXR and whatever that turns into.


In the image above I added a very large 3D the model of our building into a procedurally generated landscape. The landscape is made with a new component that allows you to add a scene with one line of code in the html. The component is javascript based.

The GLTF model was created by designing the building in Sketchup and exporting it as a .obj and .mtl file. I then created a Sketchfab account and uploaded the model. Sketchfab has a great GLTF converter. So, I set the file to allow download and as I do it asks what type I would like to download and I chose gltf. You can see the example here: http://www.cablecenter.org/vr/gltf/ ( Right-click and view source in the html to view the code. )

The file is 15MB in size and yet it loads on a good connection in three to five seconds. I could, in the future, optimize the model. I am considering rebuilding the model in VR using Gravity Sketch,

. I would rebuild it in three parts allowing for three downloads as opposed to one large one.

GLTF is now in version two which allows for animation. This works in AFrame version 7. If you want to use GLTF in 7 that is an older format you need to load an extension that allows GLTF version one to show up.

Update: Now you can also tell GLTF which parts to load in code. GLTF also allows for animation.

Links:

Coin Marketplace

STEEM 0.18
TRX 0.13
JST 0.028
BTC 56934.21
ETH 3091.02
USDT 1.00
SBD 2.38