Discover how to make the most of models with custom colour properties in the Iventis Planner.
What are custom colours on models?
Like custom images on models, custom colours allow users to change portions of a model to any colour. An example of this might be different coloured buses where only the body paint of the bus changes (the wheels and glass remain unaffected). The body paint can support different colours to allow users to reuse the same model without having to upload a different model for each colour.
Benefits of custom colours on models
With the aid of data-driven styling, models can now be colour-coded according to the attributes on the map object. For example, this will mean that a user could keep all their bus models within the same layer, but the models could be different colours based on a bus type list item attribute. By using the colour picker, you have the full spectrum of colours rather than the set amount the user will upload.
How can I change the colour of a model that supports custom colours?
To use a custom colour on your 3D model in Iventis, you need to make sure you have a model layer that is using a model that supports custom colours. Iventis provides some models that are ready to use. However, if you would like to make your own, the next section details exactly how you can edit your models to support custom colours.
Selecting a model that supports custom colours
If you’re starting from scratch, create a new model layer. If you already have a model layer where you would like to enable support for custom colours, enter the “Edit Style Properties” window in the layer. Inside the style properties window, choose the model you want to use from the large repository of available options. This will include some models that you may have uploaded as well as models that come as standard in the Iventis platform. Models with the icon represent those that support custom colours.
Select one of the models that support custom colours and click confirm.
Changing the colour
With your model selected, you will see a new style property called ‘Custom colour’. This style property allows you to select a colour for the selected model, using the same colour picker that you would use for an area or line layer colour.
Just like for an area or line layer with colour, custom colour on a model can also be data driven. This allows for the colour to change depending on the value of an attribute on the map object.
This will make every object in the layer into the same object, but with custom colours depending on the layer’s configuration.
Setting custom colour to ‘No’ will use the model’s default colour.
How can I make my model support custom colours?
I have already changed my model to support custom images.
If you already know the process of how to set up 3D models to support custom images, the steps are very similar. However, the material slot must be named iventis_custom_colour, and there is no need to adjust the UVs.
I am adjusting my model for Iventis for the first time.
Prerequisites
- An understanding of 3D modelling software
- An understanding of material slots on 3D models
Like custom images on 3D models, colours require you to make some changes to your model so that the platform understands what parts of the model should change colour. For the purposes of this guide, we will be using Blender; a free, open-source, 3D modelling tool.
There are two ways to modify the model; renaming an existing material slot, or creating a new material slot and assigning faces to it.
Method 1: Renaming an existing material slot
Figure 1: Army truck model loaded inside Blender
Figure 2: Material window for our army truck model
In Blender, look at all the material slots for a particular mesh by selecting the mesh and looking at the materials tab on the right-hand side.
Here, you can see all this model’s material slots. In the above case, there is a different material slot for each colour of the model. Select an existing material slot with a colour that you want to set as a custom colour; here, it will be the “red” material.
With the material selected, find the text box located at the bottom of the material slot list to rename the material. You must name the material iventis_custom_colour so that Iventis can recognise the command.
The model can now be exported to be uploaded to Iventis.
Method 2.1: Creating a new material slot
In Blender, create a new material slot by selecting the model’s mesh and finding the materials tab on the right-hand side.
Here you can see all the material slots for this model. In this case, there is a different material slot for each colour in the model. Create another material slot by clicking the ‘+’ icon to the right of the material slot list.
With the new slot created, click the “new” button below the material slot list. A text field will replace the button, where you can name your material. You must name the material iventis_custom_colour so that Iventis can recognise the command.
Method 2.2: Assign faces to new material slot
Figure 3: Blender modes drop-down
Next, select the faces of the mesh where you want to change the colour by going into Edit Mode - press ‘Tab’ or click the drop-down in the top left corner and select Edit Mode.
While in Edit Mode, you want to switch to the face selection tool to make selecting faces easier. You can find this option next to the blender mode drop-down.
Now, select the faces that you want your custom colour to affect. This might be the paint colour of a vehicle, for example.
With your faces selected, assign the material to them by clicking the materials tab on the right-hand side (the same place where you created the material). Select the correct material in the material slot list and click the ‘Assign’ button below its name.
Top Tip: You can preview how a colour might look (and set a default colour) by changing the ‘Base Color’ property on your material to a more distinctive colour. To view the colour in the viewport, enter material preview in the 3D viewport by selecting material preview in the top left, or by holding ‘Z’ on your keyboard and clicking ‘material preview’.
Uploading to Iventis
Now that you have your custom colour supported 3D model, it’s time to upload it to Iventis. To upload a new 3D model:
- Open an existing model layer, or create a new one
- Inside the style properties of the layer, select to change the model
- Click the ‘+’ icon to add a new model to the model repositories
While in the ‘Upload a 3D model’ tab, there is a new option to ’Allow custom colour’. Upload your model as usual, give it a name and a thumbnail image and then tick the ‘Allow custom colour’ option. This will then validate your model to ensure that it supports a custom colour. Click confirm and select your model to use.