Question on how to load a model onto a GL Canvas

I’m experimenting. I am a hobbyist developer and I want to use SketchUp to create some models that I can place on a GL Canvas. I am having trouble figuring out how to actually add a model to the gl canvas in my programming environment. Do you do it with one of the .obj files. Do you add a base model and then add .mtl? Sorry for the rudimentary question.

What is GL Canvas?

@cslane,

Export the model in GL Transmission Format (glTF).

Some WebGL engines do support OBJ format, but I would recommend GL Transmission Format, as it preserves the object hierarchy and is a lot more compact as the geometry data is stored in binary form.

Download the glTF exporter from the SketchUp extension warehouse:
http://extensions.sketchup.com/en/search/site/gltf

There is an existing WebGL page here for viewing the models. https://gltf-viewer.donmccurdy.com

Details on glTF are here: glTF Overview - The Khronos Group Inc
Follow the links for source code on github.e.g: GitHub - KhronosGroup/glTF-Sample-Viewer: Physically-Based Rendering in glTF 2.0 using WebGL

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.