Castle Model Viewer on Android

1. Introduction

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

Castle Model Viewer Mobile - Dungeon in Examine Mode Castle Model Viewer Mobile 2 Castle Model Viewer Mobile 6

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.

2. Download

2.1. Latest version (2.4.0)

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.

3. Usage

3.1. Opening your own models

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

3.2. Models must be self-contained

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.