Open DOrsulak-SOLIEL opened 1 year ago
@DOrsulak-SOLIEL thanks for reaching out. This is most likely due to a change in how color spaces work inside ThreeJS. The change happened in version 0.152
of ThreeJS and you can find more background around that topic in this post:
https://discourse.threejs.org/t/updates-to-color-management-in-three-js-r152/50791
Version 1.71
of 3d-force-graph
started including versions of ThreeJS after 0.152
, that why you see that change, but the real difference is in the ThreeJS version that you're explicitly importing into your app.
I'd also recommend reading about the way colorspaces work in ThreeJS, on this document: https://threejs.org/docs/#manual/en/introduction/Color-management
You might be setting the colors in your material assuming a linear color space, while it's actually being interpreted as "sRGB", leading into a much more saturated look than what you expect.
Love the library, but using ^ in package.json caused me many headaches and a full day’s work.
Cause: Using "3d-force-graph": "^1.70.17" in my package.json
Fix: Using "3d-force-graph": "1.70.17" in my package.json
Problem: My scenario is similar to https://vasturiano.github.io/3d-force-graph/example/scene/
I stack & space between 2-7 planes on top of each other and fix nodes onto each level. The changes of the new minor release seemed to saturate the entire scene and/or use the wrong colors (more pastel) for nodes/ links/ planes. Seems almost like looking at the scene through a white lens with .5 opacity. Tinkering with my code did make a minor difference. For example, I normally have to rotate a plane 90 degrees after I create it, I found by not rotating it the planes maintained their color.
More precisely, I paint each plane a different color. If I keep my 90 degree rotation, I found 1/7 planes had the color I assigned on top and bottom. The other 6 planes had correct color when viewed from the bottom, but white color when viewed from top.
I also have a scenario where I load a .png onto a plane, the png again turned completely white (view from top) for most colors, other color did paint over the image as desired, but color may have still been off a little.
Other issues are I paint nodes to specific colors depending on their properties, most of the painted node colors were completely wrong. e.g. green node turns yellow, pink node turns purple, etc. & all too light
Tech stack: Angular 14 & Typescript Here is a sample of my code. It shows how I add & create planes, the colors I use, and the rotation I perform which causes the issue for the planes (the other issues I do not know cause):