Brown metallic reflection

We’re using a metallicRoughnessTexture with full metallic in water areas to try simulating reflection of the sky in water in our created geocentric 3D Tiles datasets from Remoscape. In Unreal and Unity the sky, and at least in Unreal even the other geometry, is reflected nicely. But CesiumJS seems to use some tilted blue/brown reflection map, so parts of our water appears brown, see below. Why is this, does it have to do with the geocentric coordinates? Can it be fixed?

It’s hard to be sure from just looking at the screenshot. But visually this might be related to New 1.123 Environment Map Rotates Together With Model · Issue #12310 · CesiumGS/cesium · GitHub .

Not sure whether threre’s a quick way to confirm this. Some brainstorming: If this is a tileset, one could consider some hack like

tileset.tileLoad.addEventListener(function(tile) {
  const maybeModel = tile._content?._model;
  if (maybeModel) {
    model.referenceMatrix = Matrix4.clone(Matrix4.IDENTITY);
  }
});

or so, just to see whether that yields the expected result, which might be a hint at how that issue might be fixed, eventually…

Thanks for the suggestion, but it doesn’t seem to help unfortunately. I tried a couple of other things from the thread you linked but to no avail. It doesn’t seem to matter what I set referenceMatrix to.

My dataset also uses “gltfUpAxis”: “Z”, which I thought might be related, but I tried just removing it and it didn’t really help. I guess I would have to transform the coordinates accordingly in that case, but since nothing happened whatever I set referenceMatrix to, I don’t know…

I have not yet investigated all details of the issue, but in this comment I mentioned that instead of using the referenceMatrix in this line of the code, using context.uniformState.enuToModel seemed to fix it, but with the huge disclaimer: There are a lot of matrices, and their meaning is often not … documented extensively … so this was, admittedly, the result of somewhat randomly poking around in the code.

I’m not sure whether 1. you could try this change locally (even if it’s a long shot), or 2. share the data set where you observe that issue, either here of in the CesiumJS repo issue so that it may be investigated further. Both could be valuable steps towards finding a proper solution for the issue (even though there doesn’t seem to be a specific timeline for that right now).