Recently, I acquired a fbx model that utilizes a UV map to efficiently texture the model. The model is composed of a single mesh that needs to be colored using 4 quadrants as shown in the image below:
https://i.sstatic.net/RR6m3.png
To achieve this coloring effect, I am looking to create a MeshToonMaterial with a specific map, like so:
const material = new THREE.MeshToonMaterial({ map: texture });
I am currently experimenting with creating this texture but have encountered issues. Instead of getting the desired result, the entire material appears black:
const createUVTexture = () => {
const width = 2;
const height = 2;
const size = width * height;
const getColor = (i, j) => {
// Logic for determining color based on quadrant
}
// Texture creation logic here...
}