Objects can be created by grouping tiles together. Object instances can then be added to the scene. Editing one instance allows all instances to be updated with the same changes.
To create an object, you must first highlight the tiles that will be grouped together while in Edit mode. Once highlighted, you can right click to open the context menu, then select the Create Object menu item within the Faces menu. You can also click the Create Object button in the Scene tab. Doing so will remove the tiles and replace them with an instance of the newly created object. Instances can be selected like tiles, moved, rotated, and scaled. The new object will also be listed in the Scene tab, and can be dragged into a layer to help organize your list of objects. When you create an object, its origin point will be placed relative to where the crosshair is located. Check the Object Points section below on how you can change this position.
There are two ways to rename an object. You can double click the name of the object listed in the Scene tab, or you can right-click and choose the Rename Object menu item.
- Apply name to Instances
You can use this option to apply the name of an Object to any instances belonging to the object.
Copy/pasting only works with tiles, but you can duplicate multiple instances by selecting them, right-clicking on one, and choosing the Duplicate Instance(s) item from the context menu that pops up. This will duplicate all of the selected instances with the new instances selected.
- Duplicate Instances Area
This opens a panel where you can specific the number of duplicates to make along the x,y,z axis, as well as the spacing along the x,y,z axis.
- Combine Instances
Selected instances in the scene can be combined into a new Object. This is useful if you want to merge multiple instances together without having to deconstruct them first. While in Edit mode, select the object instances in the scene. When they are highlighted, right-click an instance to open a context menu and choose Combine Instances or Combine Instances (Object only). The first option will replace the instances in the scene with a new instance of the new object, while the (Object only) option will only create a new object without placing it in the scene and without removing the other instances.
Instances in the scene can be deconstructed into separate tiles again. This may be useful if you want to make a change to an instance without affecting all of the instances. While in Edit mode, select the object instance in the scene. When it is highlighted, right-click to open a context menu and choose Deconstruct Instance.
While editing an instance, you can modify each tile that constructs the object. You can add or remove tiles to the object as well and these changes will be reflected in all of the instances. Basically every operation you can perform on a regular tile can also be performed when editing an instance's tiles. To edit an object, select an instance in the scene and right-click while in Edit mode. A menu will appear with the option to edit the instance. This will activate the instance's edit mode, displaying a yellow box around the instance. When you are done editing, you must deselect everything and then press Enter to exit the instance's editing mode. You can also press Enter to begin editing the instance.
There is an option in the settings Object Mode Constraint. If enabled it will prevent selecting/editing tiles that are not part of the object when you edit an instance. This will help prevent you from editing other things while you are editing an instance.
- Exit Editing an Instance
Deselect all faces and vertices of tiles and then press Enter to stop editing the object.
Instances / Prefab Brush
Instances can be added to the scene in two ways. One way is through the menu when right-clicking an object or instance in the Scene tab list and selecting Add to Scene. This will place the object at wherever the current position is of the 3d cursor. Another way is by left-clicking the object or instance in the list while in Draw mode. This will allow you to place objects in the scene near your mouse, relative to an invisible plane that sits against the 3d cursor (This acts just like when you place single tiles). You can also erase the instance by lining up the Prefab Brush with an instance, and right-clicking it in the scene, exactly as you would do with a normal tile.
The spacing of the prefab brush can be adjusted. There are inputs at the bottom of the Scene panel to specific the width and height in pixels that the prefab brush aligns to. The spacing will be relative to the 3d crosshair position. This acts similar to the spacing of tiles when they are drawn to the scene.
There is an option in the Settings to orient the Prefab Brush relative to the camera direction. This can be enabled by going to Edit > Settings > Draw Mode > Orient Prefab Brush to Camera.
- Q , E Rotate the prefab brush. Rotating the brush in combination with rotating the camera angle allows every 90 degree orientation to be attainable.
- Shift+Q , Shift+E To help keep rotation simpler, Holding shift will allow the object to rotate clockwise or counter-clockwise.
Below the Objects list is the Instance list. All of the instances in the scene are listed in this section. You can click and drag instances into other instances to nest them inside each other. This essentially groups them together and allows for more control. When clicking on an instance from the Instance list, it will change the prefab brush to represent the current instance and any nested instances while in Draw mode. This way you can add a group of instances to the scene and maintain the same nesting order! You can toggle between World and Local space when nesting Instances via the button in the lower right of the Scene panel.
Each object has an origin point that helps with the placement of the instances within the scene. At the time of creating an Object, the current location of the 3d cursor will determine where to place the origin point relative to the rest of the tiles in the object. The origin point can be re-positioned afterwards, as well as new points added for custom data.
There is also an option in the Layer context-menus, that allow you to set the origin point of all the Objects within the Layer (including sub-layers). This can be accessed by right-clicking a Layer listed in the Scene panel and choosing Set All Object's Origin Points To Crosshair. Doing so will set every origin point to the current location of the 3d crosshair. It will do this relative to the first Instance of each Object, so it is mainly useful if you only have one Instance per Object.
- Reposition a point
In the Scene tab, when an instance is being edited, the drop-down menu at the bottom of the scene tab window will list all the Object's points.
Selecting one will display the point (a white diamond shape) within the scene where it is located relative to the instance. Clicking the button next to the drop-down list will re-position the point to the current location of the 3d cursor.
- Rename a point
After selecting a point from the dropdown list in the scene tab while editing an instance, you can click the T icon to rename the point.
The origin point can't be renamed, but any additional points you have added can be renamed.
- Add/remove a point
At the bottom of the Scene tab window, there are two buttons to add or remove object points.
Points can be added/removed while editing an instance. The only point that can't be removed is the Origin point.
Right-click an object listed in the Scene tab and choose Properties. Alternatively you can Double-click the space to the side of its name to open the Properties. This will open a panel with special options such as Billboarding, Mirroring, and Custom.
With Billboarding enabled, instances of the object will always face the camera. You can also choose to lock it to the Y axis, which will make it keep its Y orientation while facing the camera. With this toggled you can rotate the object and it will keep its local Y orientation. When enabling billboarding, it is important to understand that the object should face down the Z axis. If you have tiles facing down a different axis, it may appear invisible when enabled because those will face away from the camera.
Enabling Mirror mode will cause all the tiles within an object to have a mirrored version of itself. Any changes to a tile will be updated in the mirrored version. This may be useful if you want to create a symmetrical object- you can create one side and as you are creating it, the other side will be auto-generated. It will retain symmetry across the origin point of the object. Check the Object section of this document to learn how to reposition the origin point.
There is also an option to "Merge to Object." This will merge the mirrored tiles into the Object and deactivate mirroring. This essentially converts the mirrored tiles into normal tiles that you can then edit.
If you are using Lights in the scene that cast shadows, you can control which objects cast shadows and receive shadows. By default objects will cast and receive shadows, but you can disable this in the object's properties. See the Lights and Shadows section below for more information on how to setup lights and shadows in your scenes.
Enabling skinning will allow you to attach bones to the Object. Each vertex can be assigned up to four bones and will morph when the bones move based on how they are weighted. A root bone needs to be selected for the Skinned Object. For more information, check the Skinning section of this documentation.
Objects and instances can be given custom data! In this section, you have the option to add number or string values to the Object or its Instances. When you add a property, it will be displayed in the corresponding list. Then you can define its name, type, and default value. After adding a custom Instance property, you can access an Instance's properties in the same way you entered the Object's properties; by double-clicking the instance in the instance list of the Scene panel, or right-clicking and selecting Properties. From there you can set a unique value instead of the default value.
If you have registered and activated your program (non-Steam version), you'll have the ability to save and export.
- Click File on the menubar and choose either Export Scene or Export Objects. Export Objects will export each object separately whereas Export Scene will combine everything together.
- Select which objects to include in the scene if necessary.
- Adjust the export settings to your liking. Details of these settings are outlined below.
- Click Export and pick a location to save your files.
- Type in a name for your file and click Save.
When exporting, you can also export the textures as well as a .mtl file. If you export with the MTL file, then when you import the .obj file into a program that supports mtl files, it will import everything with the appropriate textures assigned. This is because the MTL file helps define the materials that the object uses, along with which textures there should be.
By default, Crocotile will export all the tiles (and the tiles of objects that you choose to include), but if you want to limit the tiles that get exported to just those that belong to a single tileset, you can enable the "Limit export to currently selected tileset" option. This will allow you to split up your scene into multiple parts. Then when importing into another program, you can load all of the exported .obj files, apply the correct tileset texture to each one, and position them to the same coordinates. Your scene will look fine, and everything will be together. This option usually isn't recommended though.
Watch this video to learn about all the options as well as how to import into Unity, Godot, Blender, Sketchfab.
GLTF & GLB formats
You can choose to export your scene and objects as .gltf files or .glb files. Gltf files are human readable json formatted files while the glb files are binary. The binary format has a smaller file size.
Gltf and Glb files can embed the texture images into the file. This way you can have just one file that contains everything you need to import into another program. Because of this, these formats are the preferred way to export.
DAE (Collada) format
In some cases you may want to export as a .dae, which is an XML formatted file. These files will store the file path to any textures that they use. In this case, they will assume they are in the same directory as the .dae file.
If you are exporting objects (not the scene), you can export them as .c3dp files. These are prefab files that are designed for importing into other Crocotile scenes. Use this format if your intention is to transfer Crocotile built objects into other Crocotile scenes.
- Merge Vertices
If this option is selected, any vertices that are overlapping will be merged together to create just one vertex. The UVs of the vertices must also be the same for them to be merged as there can only be one UV coordinate per vertex. If the UVs are different, then the vertices won't merge even though they have the same position in 3d space.
- Vertex Colors
You can choose whether or not to include any vertex colors in the exported model. The .obj file format doesn't officially support vertex colors, however some programs accept a modified form where the R,G,B values are written directly after each vertex X,Y,Z position (v X Y Z R G B). This modified format will be used if exporting vertex colors in .obj format.
- Vertex Normals
You can choose between flat or smooth normals. Flat will set all vertex normals to be the same as the face normal. This will give the impression of sharp edges to each polygon. Smooth will average the vertex normals based on all polygon faces connected to that vertex. With Smooth selected you can specify the angle threshold to control which face normals affect the vertex normals. Specify the angle in degrees. If the angle between surfaces are within this angle, the vertex normals will be averaged betweeen them.
- Decal Offset
This will offset any decals by the provided amount to avoid z-fighting. Usually this is handled by a shader, but if that is not a option you can bake it into the geometry by providing a value other than 0. Use a small fraction like 0.01.
- Polygon Type
Polygon type only applies to .obj files. You can choose to export your tiles as Triangles or Quads. Triangles are three-sided polygons and Quads are four-sided polygons.
If you have triangular tiles in the scene (tiles that have one of their polygons collapsed), these may mess up your export when Polygon type is set to Quads and Merge Vertices is enabled. There is an option in the context-menu when you right-click the 3d scene that allows you to select all the triangular tiles (if there are any). While in Edit mode, right-click the scene and goto Faces > Select triangular tiles.
- Use Groups
Use Groups only applies to .obj files. This option will organize the tiles of each instance to their corresponding object group. This may effect how your .obj gets imported into other programs. Some programs will separate each group into their own objects upon import. So if you need the tiles split up into their corresponding objects then you will select this, otherwise everything will be treated as a single object.
- Use single mesh
This option does not apply to .obj files. If this option is checked, it will combine everything into one mesh. If it isn't checked, the scene hierarchy will be retained with correct instance parenting as well as animations.
The Unlit option only applies to .gltf and .glb files. If unlit is chosen, it will export the model without any lighting/shading properties.
- Embed Textures
Embed Textures only applies to .gltf and .glb files. This option will embed the texture data with the rest of the data so that there is only one file.
- Export Static Pose
With this option enabled, any skinned objects you export will have their current bone transformations baked into the geometry and any animations will be removed as well. This will result in exporting a static pose of the objects. This option applies automatically to .obj and .dae formats, because they do not export animations. Since .gltf and .glb files can contain animations, you will have to enable this option specifically for them if you want to export a static pose.
- Texture Prefix
Textures that are exported can have a prefix applied to their filenames. You can supply a custom prefix, or have the project's name applied as a prefix.
When Tile Spacing is set higher than 0, it will use this option to determine the tilesize on the tilesets. You can set this to Auto, Unique or Custom. Auto will automatically try to determine the size of the tiles for each tileset. Unique will use the unique tilesize values that you have set for each tileset. Check the Tilesets section of this documentation for details on how to set those. Custom will allow you to provide a specific tilesize for all tilesets.
- Tile Spacing
When exporting, the tile spacing option will add pixels around each tile. So if you choose a value of 2, each tile will have two rows/columns of pixels added on each side, so there would be 4 total pixels rows/columns between every tile. Example: [[Tile]][[Tile]][[Tile]]
This tile spacing implementation only works if you keep all your uvs square with the same dimensions (one tile size per tileset). The wrapping mode of the tileset must also be set to "Clamp to Edge".
- Power of Two
With power of two option enabled, the tilesets will resize the canvas (it will add empty space) up to a power of two dimension if they aren't already. This may be necessary for some engines to render your textures correctly. For instance, if your textures look blurry, it may be due to tilesets not being power of two dimensions. The wrapping mode of the tileset must also be set to "Clamp to Edge" otherwise it won't resize the canvas.
- Limit export to currently selected tileset
With this enabled, only the tiles that belong to the currently selected tileset will be exported.
- Export UV Animations
This will export a text file containing JSON formated data for all the UV animations in your project. It will also bake some corresponding animation data into the UV data of vertices in your model. For more details about this data and how to use it, check the Animated Tiles section of this documentation.
All vertices positions will be multiplied by this value. You can modify this value to magnify/scale the size of your model if you need to.
Each tileset is assigned a name when they are added to your Crocotile scene. By default it will be a number such as 0,1,2,etc.. You can change a tileset's name by going to the Tileset Material Settings panel. This can be accessed in the Tileset menu, or by double-clicking the tileset in the tileset list. Check the Tileset section of this documentation if you need to learn more about the Tileset panel.
When tilesets get exported as textures for your models, they will use their tileset name to distinguish them. Each tileset name in a Crocotile scene will be unique to prevent tilesets from overwriting other tilesets when exporting, however if you are exporting multiple scenes it is possible that you may be using the same names in two or more scenes. To prevent exported tilesets being overwritten, you can add a prefix to your textures if you need to via the Texture Prefix option in the Export panel. You can set a custom prefix, or use the project name as the prefix. Another way to avoid overwriting textures is to export to separate folders so that all your files for one scene is located in its own folder.
Export Scene Data
You can export entity data by going to the Scene panel and selecting Export Scene Data from within the Scene dropdown menu.
This will export object and instance data as a json formatted text document. It will also include Light and Camera data if you have any in the scene.
"name": "Instance 1",
"name": "Point Light",
"name": "Camera 123",
Export Grid Map
Each tile placed inside an Prefab Object can correspond to a grid cell in a grid map. The tile index in the tilemap also gets saved to each grid cell when exported. Grid maps are useful for defining a three-dimensional map of cells. You can decide what these cells represent, but the most common use would be for defining collideable areas.
You can export Grid Map data by going to the Scene panel, right-clicking on a listed Prefab Object and selecting Export Grid Map from within the Export Misc section of the context-menu. The Grid Map panel will pop up with inputs for specifying the Cell Size. The Cell Size defines the dimensions of each cell and is measured in Pixels. When exported, it will be converted to Meters.
When you click Export, it will cycle through every tile in the Prefab Object and check the position immediately behind/under it. It will determine the location of the cell relative to the Object's origin point and store the x,y,z position as well as the tile index inside an array. The tile index is useful if you want to differentiate your cells; you can have one tile correspond with sloped collision cells for example. Tile indices begin with 0 at the top left corner of a tileset, and will be based on the Tilesize or the Tileset's Unique Tilesize if it is set.
Below is an example of some Grid Map data exported as a json formatted text document.
To demonstrate how to work with this data, a Godot project has been created that uses a Grid Map to define the collidable areas of a level. Godot is a free and open-source program for developing games, and it is an excellent engine for importing your Crocotile work into if you are comfortable with more technical processes. You can use the data in other engines, such as Unity, if you like. Watch the video to see how this data can be used in Godot!
"cells":[ [2,-1,0,0],[3,-1,0,0],[4,-1,0,0], ...],