Page MenuHome

White Balance modifier for the VSE

Authored by Thomas Beck (plasmasolutions) on Dec 27 2015, 10:18 PM.



This snippet creates a white balance modifier for the video sequence editor. It is useful for everyone who likes to set a new white point in the video source (easily via the eyedropper). Just select a point in the source file where you know that it should be white. The algorithm will then shift the colors towards your new white point.

See attached the image for a quick demo.

Diff Detail

rB Blender

Event Timeline

Thomas Beck (plasmasolutions) retitled this revision from to White Balance modifier for the VSE.Dec 27 2015, 10:18 PM
Thomas Beck (plasmasolutions) updated this object.
Thomas Beck (plasmasolutions) set the repository for this revision to rB Blender.
Thomas Beck (plasmasolutions) updated this revision to Diff 5654.

Nice work!

Generally it's good, but I'd like premultiplication for byte images to be taken into account before giving it the final LGTM.


mul_v3_v3 with a float[3] can be used here instead of using a matrix.


for byte data you have to premultiply and unpremultply before/after use, check color_balance_byte_byte for instance.


use mul_v3_v3 instead


don't forget to unpremultiply

Also need to convert byte images to linear space too (in addition to premultiply)


also convert to linear before copying (property is in gamma space so it needs conversion)

Thomas Beck (plasmasolutions) updated this revision to Diff 5655.
  • Review points solved
  • Picked color value was not in correct color space (display) - thanks to Psy-fi for detection and assistance

OK, one more thing which is missing is read-write from file save. As far as I can see writing should be explicit but make sure to load the scene back in lib_link_sequence_modifiers

  • After changing the ...new_modfier function we have to set scene on file load, otherwise an invalid scene access happens
Antony Riakiotakis (psy-fi) accepted this revision.

LGTM, fire away!

This revision is now accepted and ready to land.Dec 28 2015, 12:03 PM
This revision was automatically updated to reflect the committed changes.