glTF 2.0: Episode Three
Originally posted on Cohost: 2024-06-17the glTF adventure continues?
this time we're going animated
(there's a lot of moving images in this post)
previous episodes: ep1: google meet ep2: ikea furniture
google search
If you've used your phone for searching up an animal on google search in the past three years or so,
you might have seen a button telling you to meet said life-sized animal up close, and pressing it will
launch a model viewer with a model of the animal. The viewer also has an AR mode which will indeed let
you view the animal life-sized up close (through a phone screen)
Of course, this button will only show up on a mobile device with a camera, because it's geared towards AR. Google doesn't think anyone would like to view 3D models on a desktop, but thankfully we can TF our browser into a mobile one by using the Responsive Design Mode available from the devtools. This mode changes the viewport into a more phone like one and alters the User-Agent string to appear to the website as a mobile device. With this mode, the "View in 3D" button does appear!
Clicking it won't make anything happen, but on a mobile device it would invoke the model viewer that
would then download the model and view it. If we Inspect Element the button, we find that it has a
data-url
attribute that starts with
intent://arvr.google.com/scene-viewer/1.2?file=https://storage.googleapis.com/ar-answers-in-search-models/static/cats/Mainecoon/Mainecoon.glb
.
The file link in there is indeed the link to the glTF file we're interested in. Plop it into blender
and you get a cat walking around the viewport...
microsoft 3D viewer
Of all the programs that ship with windows, 3D viewer is one of the few that can be actually useful - it lets you view 3D models and peek at their high level stats and attributes. It has support for the most common "interchange" 3D model formats, preferring glTF but also being able to open OBJ and FBX (though FBX support was put behind a toggle back in february 2024 because of a vulnerability with the FBX format). Opening the Mainecoon.glb from above works just fine, and the cat is enjoying walking around and meowing in this viewport as well
So it works with local files, but there's also a little button on the top there that says "3D library", which is Exactly What it Says On The Tin: it's a library of 3D models. This is the same library that is available from Paint 3D or any of the Office programs. Because this post focuses on animated models, I'll pick the "Rampaging T-Rex" model because dinosaurs are cool 🦖🦖🦖
the elites don't want you to know this but the glTFs at the 3D library are free you can save them to disk I have 458 glTFs
Google search also has a T.Rex so now we have two of them () and we can let them meet each other. While we're at it, let's get a few more animated critters from google search like a bear, a shiba inu and another cat, maybe even a hamster...
ok now im just goofing around
The shiba inu comes with a butterfly but we can replace the butterfly with a sailor
vaporeon
the hamster comes with a sunflower seed but we can replace the seed with a city taxi
and finally, the Maine Coon cat that has been with us throughout this post can be put in gm_bigcity
because I already made the simulation setup and I can put anything
in there now
i tried thinking of fun stuff to do with these animated glTFs that didn't involve macro/micro in some way but i couldn't oops