<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ModelIO",
  "identifier" : "/documentation/ModelIO/MDLVertexAttribute/initializationValue",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Model I/O"
    ],
    "preciseIdentifier" : "c:objc(cs)MDLVertexAttribute(py)initializationValue"
  },
  "title" : "initializationValue"
}
-->

# initializationValue

The default value for vertex data for this attribute.

```
var initializationValue: vector_float4 { get set }
```

## Discussion

When you set the [`vertexDescriptor`](/documentation/ModelIO/MDLMesh/vertexDescriptor) property of a [`MDLMesh`](/documentation/ModelIO/MDLMesh) object, the mesh automatically formats its vertex buffers to match the new descriptor. If the vertex descriptor contains a vertex attribute that is not already present in the mesh, the mesh creates a new vertex buffer (or allocates space in an interleaved vertex buffer, if the vertex descriptor describes such) for the new attribute, and fills in per-vertex data for that attribute using this property’s value.

Although this property’s type is `vector_float4`, Model I/O  uses only the components of the vector that match the vertex attribute’s [`format`](/documentation/ModelIO/MDLVertexAttribute/format) property. For example, if you set this property’s value to the vector `{1, 2, 3, 4}` on a vertex attribute whose format is [`MDLVertexFormat.float2`](/documentation/ModelIO/MDLVertexFormat/float2), each vertex will be initialized with the value `{1, 2}`.

The default initialization value is the vector `{0, 0, 0, 1}`.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)