Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-04-27Fix part of #34233: bad alpha blending for 2D image painting. This is a veryBrecht Van Lommel
old issue, the formulas here were never quite right, should all work ok now with byte and float images. Some differences: * Colors with zero alpha from the background will never have an influence, so you don't get alpha fringes when painting over such areas. This does give hard edges when looking at the RGB channels alone, but there's no way to avoid that and fringes at the same time, same behavior as other painting apps. * Add/Subtract/Multiply/Lighten/Darken now leave the alpha channel unchanged and work only the RGB channels, again same behavior as many other apps. * Erase/Add alpha now compensates for premultiplied float images to keep the straight RGB colors the same. Next: fix projection painting.
2013-01-15Follow general mathutils rules for naming straight<->premul functionsSergey Sharybin
2013-01-05There was a typo in previous commitSergey Sharybin
Additional changes: - Made mipmapping operate with unsigned short instead of char which allowed to eliminate extra division by 255, so prevision should be a bit better now. - Actually, this is not real unsigned short range, but it's a range of 255*255 which is more convenient for mipmapping, so made conversion functions private for scaling.c Not sure it worth making this functions operate in 65535 range, for now current behavior seems to be just fine.
2013-01-04Optimization for speed regression in mipmap generationSergey Sharybin
Regression was caused by alpha premul cleanup commit and the reason of slowdown was uchar <-> float conversion which is slow. Replaced with uchar <-> int conversion which seeps to be accurate enough and mostly eliminates slowdown. Slowdown was easy to notice when movie clip is used for 3d vierport background and undistortion is enabled. In this case every frame will re-calculate mipmaps. It's still a nit slower than mipmap generation before cleanup commit, but couldn't think about extra boost here atm.
2012-12-31Alpha premul pipeline cleanupSergey Sharybin
This assumptions are now made: - Internally float buffers are always linear alpha-premul colors - Readers should worry about delivering float buffers with that assumptions. - There's an input image setting to say whether it's stored with straight/premul alpha on the disk. - Byte buffers are now assumed have straight alpha, readers should deliver straight alpha. Some implementation details: - Removed scene's color unpremultiply setting, which was very much confusing and was wrong for default settings. Now all renderers assumes to deliver premultiplied alpha. - IMB_buffer_byte_from_float will now linearize alpha when converting from buffer. - Sequencer's effects were changed to assume bytes have got straight alpha. Most of effects will work with bytes still, however for glow it was more tricky to avoid data loss, so there's a commented out glow implementation which converts byte buffer to floats first, operates on floats and returns bytes back. It's slower and not sure if it should actually be used -- who're using glow on alpha anyway? - Sequencer modifiers should also be working nice with straight bytes now. - GLSL preview will predivide float textures to make nice shading, shading with byte textures worked nice (GLSL was assuming straight alpha). - Blender Internal will set alpha=1 to the whole sky. The same happens in Cycles and there's no way to avoid this -- sky is neither straight nor premul and doesn't fit color pipeline well. - Straight alpha mode for render result was also eliminated. - Conversion to correct alpha need to be done before linearizing float buffer. - TIFF will now load and save files with proper alpha mode setting in file meta data header. - Remove Use Alpha from texture mapping and replaced with image datablock setting. Behaves much more predictable and clear from code point of view and solves possible regressions when non-premultiplied images were used as textures with ignoring alpha channel.
2012-11-23Patch [#33196] Warning Fixes 11-16-2012Jason Wilkins
* MEM_CacheLimitier - Size type to int conversion, should be safe for now (doing my best Bill Gates 640k impression) * OpenNL CMakeLists.txt - MSVC and GCC have slightly different ways to remove definitions (DEBUG) without the compiler complaining * BLI_math inlines - The include guard name and inline option macro name should be different. Suppressed warning about not exporting any symbols from inline math library * BLI string / utf8 - Fixed some inconsistencies between declarations and definitions * nodes - node_composite_util is apparently not used unless you enable the legacy compositor, so it should not be compiled in that case. Leaving out changes to BLI_fileops for now, need to do more testing.
2012-09-19fix MESH_OT_tris_convert_to_quads() limit options (uv and vertex color) were ↵Campbell Barton
not working at all.
2012-09-15quiet -Wmissing-prototypes warnings, and enable this warning by default for ↵Campbell Barton
C with gcc. helps for finding unused functions and making functions static, also did some minor code cleanup.
2012-06-13move one line color conversion functions to be inline.Campbell Barton
2012-06-13add rgb_to_luma_y(), was being done inline in many places.Campbell Barton
2012-05-31math lib changes from tomatoCampbell Barton
2012-05-26add vector versions of hsv_to_rgb, rgb_to_hsv & rgb_to_hsv_compatCampbell Barton
2012-05-13code cleanup: header cleanup and remove some duplicate defines.Campbell Barton
2012-02-17unify include guard defines, __$FILENAME__Campbell Barton
without the underscores these clogged up the namespace for autocompleation which was annoying.
2012-01-19Fix issue in recent color commits, was still doing a multiplication by 255 tooBrecht Van Lommel
many, also don't check uchar range after casting to int, this can still cause overflow with large float values.
2012-01-19use color conversions functions in more places.Campbell Barton
also add rgba_float_to_uchar, rgba_uchar_to_float
2012-01-19rename rgb_float_to_byte, rgb_byte_to_float to rgb_float_to_uchar, ↵Campbell Barton
rgb_uchar_to_float and swap args (math functions mostly have dest arg first like strcpy).
2012-01-14add utility function to BLI_math_color - rgb_to_luma, rgb_to_luma_byte, also ↵Campbell Barton
use rgb_to_grayscale in more places.
2012-01-14ensure functions are not used within FTOCHAR macro since they run 2-3 times.Campbell Barton
brushes were doing curve lookups within this macro for example.
2012-01-08Color:Brecht Van Lommel
* Accelerated sRGB <=> linear conversion using lookup table, this can speed up loading of images in the compositor and simple renders quite a bit. * Dithering now uses the Floyd-Steinberg algorithm. Previously it would simply randomize each pixel slightly, adding noise, now that should be reduced. Patch #29309 by David M.
2011-12-28Code refactoring: add unified image buffer functions for doing float => byte,Brecht Van Lommel
byte => float, float => float, byte => byte conversions with profile, dither and predivide. Previously code for this was spread out too much. There should be no functional changes, this is so the predivide/table/dither patches can work correctly.
2011-10-23remove $Id: tags after discussion on the mailign list: ↵Campbell Barton
http://markmail.org/message/fp7ozcywxum3ar7n
2011-06-24fix [#27746] Black and White Render doesn't work and/or Saves as a Blank screenCampbell Barton
convert to grayscale when saving renders rather then only writing the red channel.
2011-02-18doxygen: add blenlib under core as module.Nathan Letwory
2011-01-15remove/comment unused defines.Campbell Barton
2010-12-20fix [#25283] Edge length display difficult to readCampbell Barton
- made theme colors for mesh edge len & face angle/area display. - use %g rather then %f for float display, trims unneeded zeros. - store cached 2d and 3d text color as bytes rather then floats, compare when drawing to avoid setting the context. - use unsigned char for more color functions, avoids casting to glColorubv().
2010-10-13bugfix [#23355] Square Color picker moving by itself and locking upCampbell Barton
2010-09-15Apply patch [#23755] Sequencer: small code cleanup using existing color math ↵Nathan Letwory
functions By Luca Bonavita (mindrones) From detailed description: This patch doesnt change functionality, but uses the existing color math functions from math_color.c into sequencer_draw.c.
2010-08-26fix for dark images from the sequencer when color management is disabled.Campbell Barton
the render engine assumes the RenderResult's rectf is not in linear color space when color management is disabled so the sequencer and opengl render need to follow this else it results in dark images.
2010-03-31Patch from Xavier Thomas: Matt Ebb
YCbCr conversion function according to ITU-R BT.601/709 and JFIF Clarifies color space usage in rgb->ycc conversion, doesn't change existing results.
2010-02-12correct fsf addressCampbell Barton
2010-01-22Math Lib:Brecht Van Lommel
* inline some more functions, from math_base and math_vector * also made some changes to the way inline is done so it can work for more than one file * reflect_v3_v3v3 requires input vectors to be normalized now. * added rgb_to_grayscale * added zero_v4, copy_v4_v4, swap_v4_v4, is_one_v3 * added box_clip_bounds_m4 to clip a bounding box against a projection matrix
2010-01-20Durian request: Added 'Color Balance' node to compositor. uses Lift/Gamma/Gain Matt Ebb
similar to sequence editor. --> http://mke3.net/blender/devel/2.5/color_balance_node.jpg Also added 0 key (zero key) shortcut when mouse is over a button, to reset it to its default value. Same as the RMB menu ->Reset to Default, except for color wheels, it only resets the hue/sat/value components that that widget affects. Peter/Xavier: The existing color balance code can generate NaNs (fractional power of a negative), which causes havoc along the image pipeline. I added a check in the node code to prevent this. Still plenty of potential for lots of better colour correction tools in the compositor, just needs time...
2010-01-08Animation Channels Drawing Tweak:Joshua Leung
A solid color backdrop is now drawn behind the mute/protect toggles and sliders, reducing the visual clutter with long names still appearing behind the UI widgets.
2009-12-02Changes to Color ManagementMatt Ebb
After testing and feedback, I've decided to slightly modify the way color management works internally. While the previous method worked well for rendering, was a smaller transition and had some advantages over this new method, it was a bit more ambiguous, and was making things difficult for other areas such as compositing. This implementation now considers all color data (with only a couple of exceptions such as brush colors) to be stored in linear RGB color space, rather than sRGB as previously. This brings it in line with Nuke, which also operates this way, quite successfully. Color swatches, pickers, color ramp display are now gamma corrected to display gamma so you can see what you're doing, but the numbers themselves are considered linear. This makes understanding blending modes more clear (a 0.5 value on overlay will not change the result now) as well as making color swatches act more predictably in the compositor, however bringing over color values from applications like photoshop or gimp, that operate in a gamma space, will give identical results. This commit will convert over existing files saved by earlier 2.5 versions to work generally the same, though there may be some slight differences with things like textures. Now that we're set on changing other areas of shading, this won't be too disruptive overall. I've made a diagram explaining the pipeline here: http://mke3.net/blender/devel/2.5/25_linear_workflow_pipeline.png and some docs here: http://www.blender.org/development/release-logs/blender-250/color-management/
2009-11-10Math Lib ReorganizationBrecht Van Lommel
* New header and source files. * Still need a few tweaks before switching code to use them.