# Custom Vertex Color attributes in NME?

**URL:** <https://forum.babylonjs.com/t/custom-vertex-color-attributes-in-nme/50862>\
**Category:** Questions\
**Created:** [May 27, 2024, 2:12pm UTC](https://forum.babylonjs.com/t/custom-vertex-color-attributes-in-nme/50862 "2024-05-27T14:12:28Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![pjoe](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/pjoe/32/1906_2.png) [@pjoe](https://forum.babylonjs.com/u/pjoe)\
**Post date:** [May 27, 2024, 2:12pm UTC](https://forum.babylonjs.com/t/custom-vertex-color-attributes-in-nme/50862/1 "2024-05-27T14:12:28Z")

</div>

Using Blender and glTF, it is possible to add additional vertex color channels and get them exported - their name need to start with \_ to follow the [glTF spec](https://registry.khronos.org/glTF/specs/2.0/glTF-2.0.html#meshes-overview)

> Application-specific attribute semantics **MUST** start with an underscore, e.g., `_TEMPERATURE`. Application-specific attribute semantics **MUST NOT** use _unsigned int_ component type.

Is there a way to access these in a node material in NME?

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [May 27, 2024, 4:41pm UTC](https://forum.babylonjs.com/t/custom-vertex-color-attributes-in-nme/50862/2 "2024-05-27T16:41:19Z")

</div>

I think you can but by code only by changing the name of the attribute in the input block ?

---

<div class="post-metadata">

**Author:** ![pjoe](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/pjoe/32/1906_2.png) [@pjoe](https://forum.babylonjs.com/u/pjoe)\
**Post date:** [May 28, 2024, 1:54pm UTC](https://forum.babylonjs.com/t/custom-vertex-color-attributes-in-nme/50862/3 "2024-05-28T13:54:00Z")

</div>

Hmm doesn’t quite seem to work: [https://playground.babylonjs.com/#MADFFL#3](https://playground.babylonjs.com/#MADFFL#3)

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/d/5/d5ec0495dc40727e1369f0db33eb897e2cee3c3d.jpeg)

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/4/b/4b45665ff5a7d59fce8fb4bb9aab768df919c020.png)

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [May 28, 2024, 4:52pm UTC](https://forum.babylonjs.com/t/custom-vertex-color-attributes-in-nme/50862/4 "2024-05-28T16:52:43Z")

</div>

This should work as you need to precise the type of the attribute:

> **[Babylon.js Playground](https://playground.babylonjs.com/#MADFFL%238)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

Unfortunately webgl forbids the use of 2 consecutives underscores 🙂 so I wonder if in gltf they can be named differently or @Evgeni_Popov any ideas ?

---

<div class="post-metadata">

**Author:** ![pjoe](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/pjoe/32/1906_2.png) [@pjoe](https://forum.babylonjs.com/u/pjoe)\
**Post date:** [May 29, 2024, 7:02am UTC](https://forum.babylonjs.com/t/custom-vertex-color-attributes-in-nme/50862/5 "2024-05-29T07:02:16Z")

</div>

FWIW: here is how it shows up in glTF:

```json
	"meshes":[
		{
			"name":"Cube",
			"primitives":[
				{
					"attributes":{
						"_MY_COLOR":0,
						"POSITION":1,
						"NORMAL":2,
						"TEXCOORD_0":3
					},
					"indices":4,
					"material":0
				}
			]
		}
	],
	"accessors":[
		{
			"bufferView":0,
			"componentType":5126,
			"count":24,
			"type":"VEC4"
		},
...

```

---

<div class="post-metadata">

**Author:** ![Evgeni\_Popov](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/evgeni_popov/32/4432_2.png) [@Evgeni\_Popov](https://forum.babylonjs.com/u/Evgeni_Popov)\
**Post date:** [May 29, 2024, 9:22am UTC](https://forum.babylonjs.com/t/custom-vertex-color-attributes-in-nme/50862/6 "2024-05-29T09:22:05Z")

</div>

I can’t see the MY\_COLOR vertex attribute:

![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/6/e/6e051cadfd8dc250bf2b3dd9f8707acebfd0f6d8.png)

cc @bghgary, it seems we don’t support custom attributes when reading a glTF file?

> <https://github.com/BabylonJS/Babylon.js/blob/master/packages/dev/loaders/src/glTF/2.0/glTFLoader.ts#L1152-L1169>

---

<div class="post-metadata">

**Author:** ![Urpgor](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/urpgor/32/17886_2.png) [@Urpgor](https://forum.babylonjs.com/u/Urpgor)\
**Post date:** [July 1, 2025, 7:50am UTC](https://forum.babylonjs.com/t/custom-vertex-color-attributes-in-nme/50862/7 "2025-07-01T07:50:47Z")

</div>

What’s the state of this? Custom attributes would be handy for us as well 🙂

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [July 1, 2025, 3:33pm UTC](https://forum.babylonjs.com/t/custom-vertex-color-attributes-in-nme/50862/8 "2025-07-01T15:33:19Z")

</div>

cc @bghgary

---

<div class="post-metadata">

**Author:** ![bghgary](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/bghgary/32/48532_2.png) [@bghgary](https://forum.babylonjs.com/u/bghgary)\
**Post date:** [July 1, 2025, 5:03pm UTC](https://forum.babylonjs.com/t/custom-vertex-color-attributes-in-nme/50862/9 "2025-07-01T17:03:42Z")

</div>

Oh, it looks like I completely missed this ping last time. This can be done with a custom glTF loader extension but it’s probably not as easy as it could be.

---

<div class="post-metadata">

**Author:** ![bghgary](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/bghgary/32/48532_2.png) [@bghgary](https://forum.babylonjs.com/u/bghgary)\
**Post date:** [July 7, 2025, 8:25pm UTC](https://forum.babylonjs.com/t/custom-vertex-color-attributes-in-nme/50862/10 "2025-07-07T20:25:21Z")

</div>

If we want to improve support for this, let’s get a feature added to the [feature requests](https://forum.babylonjs.com/c/features/11)  
list so we can track.
