Page Scrolling + Camera Positions

Is it possible to create a “mobile story” similar to this using the API:

How easy is it to get the camera position coordinates from the model and connect them to page scrolling? I know there is one example using similar technique, but it is not very advanced. Thank you!

Yes, you can set the camera location and viewing direction through the API, see the ‘Camera Animation’ example here:

1 Like

Thank you! What is the easiest way to create the animation? Can you do it visually?

We have no tools on Sketchfab to generate that for you. You should probably create it in your 3D app and then write a script to export the camera position and angle frame by frame so you can load it into your Javascript.

1 Like

Thanks. But can you do the page scroll without included animation? I mean like position 1, position 2, position 3 etc, and animate automatically between the positions?

You’ll have to interpolate the positions for the intermediary frames, but that’s pretty straightforward math.

1 Like

I believe I’ve built a sample of what you need in 2015: Exporting 3DS Max camera animation to Sketchfab - work in progress. It was actually my second post on this forum.
The sample is a little bit out of whack and uses the earliest API version. I’ll see if I can revamp it in a codepen

2 Likes