4
$\begingroup$

Is it possible to paint vertex colors that are higher than one?

Vertex colors are exposed through the python API as floating point numbers. If this is how they're stored, they should happily accept any value without clamping to [0-1], even negative values.

Potential uses include per-vertex light emission or material hardness.

$\endgroup$
  • $\begingroup$ It is probably supported internally, but the UI doesn't seem to allow doing this. At least from my quick look at it, but I don't use vertex paint often. Maybe through scripting or the API you can do that. $\endgroup$ – Duarte Farrajota Ramos May 22 '16 at 0:15
  • 1
    $\begingroup$ Attempts to modify the brush color (bpy.data.brushes["Draw"].color) with Python seem to instantly clamp it to [0-1]. This is probably impossible without modifying blender. $\endgroup$ – SmashMaster May 22 '16 at 0:37
  • $\begingroup$ In the page you linked to it does say float between 0 and 1 so I guess it's not supported at all $\endgroup$ – Duarte Farrajota Ramos May 22 '16 at 0:45
  • $\begingroup$ You can add a custom vertex float layer as outlined blender.org/api/blender_python_api_2_77_0/… blender.stackexchange.com/questions/36710/… $\endgroup$ – batFINGER May 22 '16 at 5:45
  • $\begingroup$ How would that make sense, color-wise? 0 is the lowest-possible value while 1 is the highest-possible value. Setting for example all R,G and B values to one will produce white, all set to zero produce black. $\endgroup$ – metaphor_set May 22 '16 at 6:57
3
$\begingroup$

Yes vertex colours are exposed as three floating point values, but in the background they are stored as three integers that are clamped to values between 0 and 255. You can see the actual code doing that here.

This would be a decision made to conserve space, a floating point value uses 4 bytes of RAM while the integer used fits in 1 byte, that saves 9 bytes for each vertex. This leads to being limited to the 16.7 million colours that can be stored in a 24bit RGB image when using vertex painting.

Blender supports image formats that store float values, so you could look at using an image texture to get more variation in your materials.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.