glTF 2.0: Episode Three

Originally posted on Cohost: 2024-06-17
the google meet Fuzzy Cat, Bunny and Feathered Dinosaur look upon a Scottish Fold glTF cat, who is animated and meowing

the 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

a button in google search telling you to meet a life-sized Maine Coon up close

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)
a life-sized Maine Coon 3D model being viewed close up in AR, with a real blåhaj next to it

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!

a google search page for Maine Coon viewed in a desktop browser with Responsive Design Mode enabled, giving the mobile result with the "View in 3D" button

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...

the Maine Coon .glb imported into blender and playing back the animation of the cat meowing and walking around

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

the Maine Coon cat walking around in microsoft's 3D viewer

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

the Rampaging T-Rex model in 3D viewer, with the file menu open and the mouse hovering "Save as"

Google search also has a T.Rex so now we have two of them (Two little gray cats) 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...

a meetup of various animated glTF models including two T.Rexes, a bear, a raptor, a shiba inu, three cats and 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
a shiba inu glTF barking at a tiny sailor vaporeon

the hamster comes with a sunflower seed but we can replace the seed with a city taxi
a hamster glTF sized up and nomming on a taxi instead of a sunflower seed

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
the Maine Coon cat glTF scaled up to kaiju size, walking around in gm_bigcity, turning buildings into bricks and rubble

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