> For the complete documentation index, see [llms.txt](https://docs.siminsights.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.siminsights.com/hyperskill-studio-authoring/virtual-entities/special-virtual-objects/painting/spray-painting.md).

# Spray Painting

HyperSkill supports spray painting, enabling authors to create object painting experiences. Examples include:

1. **Architectural visualization:** Virtual spray painting for real-time color visualization on 3D architectural models.
2. **Automotive customization:** Virtual platform for customizing vehicles and simulating spray painting for repairs.
3. **Construction site planning:** VR tool for project managers to mark construction phases and safety zones during planning.
4. **Emergency response training:** Virtual scenarios for emergency responders to mark hazard zones and evacuation routes with spray painting.

To paint a virtual object, it must first be paintable. See [Setup](/hyperskill-studio-authoring/virtual-entities/special-virtual-objects/painting/setup.md).

## Prepare the 3D model

Procure a 3D model of the spray painting tool. It can be any 3D model, as long as it meets these requirements:

* The collider of the object must not cover the spray painting nozzle.
* There must be a child transform on the object named "SprayLocation".
  * \[Optional] Add a particle system on the SprayLocation to directly control the visualization of the nozzle. The particles are used to apply the paint.
  * \[Optional] Add an AudioSource to your model to control which sound effect is used when spray painting.

Once you have uploaded the 3D model as a virtual object to your account, you can add the spray painting tool to your experience.

## Set up the tool

In authoring mode, add the following custom attributes to your spray painting virtual object:

* **Painter** (bool): Set to true to enable the spray painting feature. If false, the tool cannot be used. This setting is per object, so some spray painting tools can be enabled and others not.
* **Color** (string): A named color or a hex color code.
  * Supported named colors: black, blue, clear, cyan, gray, green, grey, magenta, red, white, yellow.
  * You can use any hex color code.
  * The "white" color is interpreted as color removal and removes any applied paint.
* **Nozzle** (string, optional): Controls how the tool applies the paint. Use one of the nozzle types below, or a custom nozzle if the spray painting object was uploaded with a custom particle effect. The default value is "Custom".
  * Horizontal
  * Vertical
  * Cone
* **Opacity** (float, optional): Controls the opacity of the paint. The default value is 1.0. Use any value between 0.0 and 1.0.

<figure><img src="https://2704613365-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FxYaaXoZ4YGbVdAnAhdcE%2Fuploads%2FEr5ISZOGeM2uDvZcv29c%2Fimage.png?alt=media&#x26;token=f798f258-3031-4b11-99be-b89bae3da56e" alt=""><figcaption><p>Sample attribute setup for a spray painting tool</p></figcaption></figure>
