In short:
- Generate Mesh and choose color in color picker for the whole mesh (The mesh in the example below is a simple cube)
- Read color (three float values) via Python and send them (with mesh details and uv-map ect) to a C++-Application
- C++-Application creates a image which should be used as a texture
Problem:
The color, which is shown in the color picker isn't the same as the color of the texture.
I use the three float values, calculate the values between 0 and 255 and set the rgb-channels. Then the image is saved.
Some Screenshots:
color picker with rgb
RGB-Values via GIMP:
- R = 184
- G = 119
- B = 255
RGB-Values calculated and rounded: (255 * value)
- R = 0.479 * 255 = 122
- G = 0.184 * 255 = 47
- B = 1.0 * 255 = 255
They aren't the same?
Generated Texture
RGB-Values via GIMP:
- R = 122
- G = 47
- B = 255
Renderen with Blender Cycles
And now a Screenshot from the Mesh + Texture rendered via Cycles (with Ambient Occlusion). I removed the default lamp because I wan't to get a clean output.
RGB-Values of the color picker via GIMP (same as above):
- R = 184
- G = 119
- B = 255
RGB-Values of the cube via GIMP:
- R = 125
- G = 48
- B = 255
What is the problem?
PS: I didn't know which tags I should use for this question. So please remove or add tags if you think that would be better. Thanks!