WebGL

In order to activate Save WebGL panel, click , Select Save [Key Alt+S], select WebGL.

Save 3D To WebGL

More about WebGL

Common Controls

Folder Name of destination folder. If folder is not exist, it will be created.
File Name of HTML file, index.htm is default.
Empty Folder Delete all files in this folder. Useful if you save model to one folder. For safety reasons, only files of extensions used by WebGL publisher are removed.
Template Template name. Internal or external templates. Learn more about templates.
Title Page title, used to define page title and header in HTML page.
Prefix Prefix to file names.
Export Click to generate html files.

3D Content

3D File Format

Geometry Format Geometry may be saved in Text (JSON), binary, and quantized binary format. Single iv3d file - zip-like compression of all files into a single package. The last method is much smaller than previous ones but does not allow manually edit scene file.
  • WebGL Package - Single file with iv3d extension. Textures may be optionally included into this file. Learn more.
  • Single HTML - Single HTML - Single HTML file. JS scripts, CSS, images, textures and 3d files are included in this HTML file. Because of encoding file size is up to 20% larger than whole size of separate files. This option is good for sharing data without needing the real web server.
  • TEXT/JSON - Multiple files. Single scene tree in JSON text format and many files for meshes, also in JSON format. Useful only if you want to check mesh files in text viewer.
  • Binary - Multiple files. Single scene tree in JSON text format and meshes in binary format, without compression. Points, UV and normals are written in float format. In result, files are relatively large.
  • Binary Lossy - Multiple files. Single scene tree in JSON text format and meshes in binary format. Points are quantinized to 16 bits. Normals are converted to polar coordinates and quantinized to single 32 bit. UV are quantinized as well. Face indicies are compressed.
Prefix The prefix of individual mesh files or name for a single iv3d file.
Mesh Extension Extension for mesh files (without dot). bin is default choice, but your are free to change it.
Scene Extension Extension for scene file (without dot). json is default choice.

JavaScript Files

JavaScript files are required to load, decode 3d file and play it in a web browser.

Files

Controls generation of JavaScript files.

  • Multiple Files - many JavaScript files. A good option if you want to investigate internals.
  • One File -  just merging files into one, non-minified JavaScript file.
  • One Minified File - one file. After minification files are hard to read and understand how everything works. Non public variables and functions may be renamed to short version.
  • One Extra Minified File - in addition to minification, long function and object names are replaced with short ones, so it is not possible to use WebGL API.
Extra Features By default, only features required to load this file are included in JavaScript files. For instance, shadow code will be generated only if shadows are used in the viewport. But if you want to switch shadows later or load files with shadows, you need to enable the shadows feature.
Customize Features Click to configure additional features. Learn more about additional features.

Textures

UV Save UV coordinates and textures. This option will be ignred if materials do not have textures
Format PNG or JPEG
Maximum Edge Size Limit dimension of texture images. All images with non power of two size will be rescaled.
Power of two: 2,4,8,16,32,64,128,256,512,1024, etc.
Quality Jpeg quality.
Inline textures Insert textures into .iv3d file
Use Seperate Folder Save textures to separate folder. Leave blank to save to same folder.
Overwrite Replace or Skip existing textures.
3D File Name as Texture Prefix Save textures with same name as 3D Scene.

Behaviour

Rotate camera around Affects how model will be rotated with left mouse drag. Rotation around viewport Y axis is better for free rotation, while rotation around scene z axis better suits for objects on the virtual table.
Auto Rotation You may enable inertial camera rotation after releasing left mouse button. "Rotation after delay" is another type of camera rotation. It starts automatically after short period of inactivity.
Left Mouse Button Action for left mouse button.
"Rotate object" actions require "to-rotate" object. This object will be rotated. Please note, object names should be written. Same effect may be implemented by simple JS code.
Right Mouse Button Action for right mouse button.
Middle Mouse Button Action for middle mouse button.
Mouse Wheel Action for mouse wheel.
Select Object on Mouse Down For themes with selection functionality, provides a choice to select object on mouse down or on mouse ip.

Background

Image Local file name or URL to image. Files on local file system will be copied to destination folder. URL will be referenced. If inline texture is on, file will be embedded into iv3d file.
Format Fill and Streetch modes are available. Same to Windows wallpaper mode.

Background images are not rescaled and used as is.

Miscellaneous

Scene Box Scene bounding box. Box is made from lines. Corners may be marked with small cubes or spheres. Cube may be in the middle of corner or outside.
Extra API Generate addition methods for manipulating 3D objects: Show, Hide, etc. When this option is checked, all not required parts will be included as well. For instance, lines of code related to textures or transparency will be included even in case if model does not have textures or transparent materials. This may be helpful if you want to load another model with same script.
Node Name Name saving mode: Do not save node name, save name as is or generate unique names.
Metadata Write metadate to json file. Learn more about metadata in WebGL.
Write hidden nodes Save hidden nodes. By default this option is off.
Animation Save keyframe animtions. Only active animation and animations used by favorites will be saved.
Cameras Save cameras, so they can be used in viewer or editor templates.

You may need real or local web server to preview generated files. Viewing via local file system may not work.

If you want to insert 3D model into Wordpress or any other CMS, you may need to change extensions of data file since bin and json can't be uploaded directly. In that case extension for scene file may be 'txt' and extension for mesh files is 'zip'.

In this article