Mobile-friendly viewer for 3D and 2D model formats supported by the Castle Game Engine: glTF, X3D, VRML, Spine JSON, sprite sheets (in Castle Game Engine, Cocos2D and Starling XML formats), MD3, Wavefront OBJ, 3DS, STL, Collada, and more.
In addition to the above formats, it also allows to open a ZIP file that contains a single model and associated media (like textures, sounds etc.).
You can change navigation type (walk, fly, examine, 2D), jump between viewpoints, play chosen animations, save a screenshot, display scene statistics (triangle, vertex count) and more.
This is a mobile version of Castle Model Viewer, sharing the capabilities with the desktop version but with UI streamlined for mobile devices. It is available now for Android, soon also for iOS.
Note
|
You can even download this exact application for desktop (Linux, Windows, macOS). But it doesn’t make sense for normal usage. If you want a desktop version, we recommend you just use full Castle Model Viewer. |
All supported 3D and 2D models are automatically associated with our application. Just open them from any application, for example from a web browser downloads, or a file browser like "My Files", "My Downloads" or "Total Commander" for Android.
You can try it on models in example_models subdirectory: visit any of the models there, click the "Download" icon and choose to open with "Castle Model Viewer".
An important requirement is that the model file must be self-contained.
This means you cannot rely on model referring to other files (like textures) using relative URLs and placing these relative files alongside the main model file (in the same directory) will not work.
The reason behind this is that "Castle Model Viewer" on mobile doesn’t get the file path from the system, so it cannot resolve relative URLs. We only get file contents.
Examples that work:
glTF GLB variant. This GLB version was specifically designed to "pack" everything into a single file.
ZIP file that contains a model (X3D, glTF… — anything supported by Castle Game Engine) and the associated media (textures etc.). We have implemented support for such ZIP files in "Castle Model Viewer" exactly for this reason.
X3D/VRML with media embedded using data URI scheme. You can use to-data-uri utility distributed as part of Castle Game Engine to convert any media to data URI.
X3D/VRML with textures embedded using X3D/VRML PixelTexture
node. Though we recommend "data URI", it is more universal.
Models that don’t need any additional media (e.g. X3D models that just don’t need textures to look reasonably).
Models that refer to the additional media using http/https links.
But you need to enable blocking downloads in the settings first. It is disabled by default, as the downloads are synchronous (blocking) for now — there’s no UI to interrupt a large download, you just have to wait for it to finish or kill the application. This is something we plan to improve in the future.
To improve this documentation just edit this page and create a pull request to cge-www repository.