How to convert CESIUM_RTC/RTC_CENTER to root node translation in glTF asset?

Hi!

I’m trying to remove the CESIUM_RTC usage from a tileset. Reading the 1.1 specifification (3D Tiles Specification) it says:
“The RTC_CENTER can be added to the translation component of the root node of the glTF asset.”

This is how the important part of the original gltf looks like (this gltf loads fine in Cesium):

"nodes": [
	{
		"matrix": [
			1,
			0,
			0,
			0,
			0,
			0,
			-1,
			0,
			0,
			1,
			0,
			0,
			0,
			0,
			0,
			1
		],
		"mesh": 0
	}
],
"scenes": [
	{
		"nodes": [
			0
		]
	}
],
"scene": 0,
"extensionsUsed": [
	"CESIUM_RTC"
],
"extensionsRequired": [
	"CESIUM_RTC"
],
"extensions": {
	"CESIUM_RTC": {
		"center": [
			3133805.225747891,
			992857.7233499398,
			5447439.535584584
		]
	}
},

after my modification ( I added the values from the CESIUM_RTC to the matrix):

"nodes": [
	{
		"matrix": [
			1,
			0,
			0,
			0,
			0,
			0,
			-1,
			0,
			0,
			1,
			0,
			0,
			3133805.225747891,
			992857.7233499398,
			5447439.535584584,
			1
		],
		"mesh": 0
	}
],
"scenes": [
	{
		"nodes": [
			0
		]
	}
],
"scene": 0,

This does not work, no errors in Cesium but I can not see the mesh. I also tried to switch the y and z values with no visual difference.
I attach my original asset and also my modified asset which does not work.

Any ideas?
send.zip (6.5 MB)

Just switching the values is not enough. The conversion between the different up-axis conventions is achieved by rotating around the x-axis (you can see that by the entries that you already have in the matrix in the glTF). So in your case, you have to switch the y- and z values, but also have to negate the former y-value:

    const translation = [
      rtcCenter[0],
      rtcCenter[2],
      -rtcCenter[1],
    ];

So your example should work when the matrix in the glTF asset is

"matrix": [
  1,  0,  0,  0,
  0,  0, -1,  0,
  0,  1,  0,  0,
  3133805.225747891,
  5447439.535584584,
  -992857.7233499398,
  1
],

Thanks @Marco13 ! That works great