Commit Graph

729 Commits

Author SHA1 Message Date
2da6039e63 rename axis_primary_v3() to max_axis_v3() to avoid confusion with axis_dominant_v3(). also add min_axis_v3(). 2012-10-24 02:25:00 +00:00
e038a1c613 reduce float comparisons for keying operation and despill. 2012-10-23 16:32:39 +00:00
fec81d9b56 use min_ max_ functions in more places.
also fix minor error in MOD decimate when the modifier did nothing the reported face count would be wrong.
2012-10-23 16:21:55 +00:00
f70d2c65d8 rename api functions...
- minf, maxf, mini, maxi --> min_ff, max_ff, min_ii, max_ii
2012-10-23 13:28:22 +00:00
4426e7bcb4 Fix for [#32931] Crop node resets values to 0
Patch done by Markus Kasten
Thanks for that!
2012-10-21 18:56:48 +00:00
d599b643b7 style cleanup: bge, switch statements mostly.
also left bmesh decimator on in previous commit.
2012-10-21 07:58:38 +00:00
f3ece5a108 style cleanup: trailing tabs & expand some non prefix tabs into spaces. 2012-10-21 05:46:41 +00:00
92862f96dc code cleanup: use float sizes for function args. 2012-10-15 23:11:59 +00:00
27e54f4d37 code cleanup: remove redundant casts. quiet some qualifier warnings. 2012-10-14 07:40:16 +00:00
3b88a29abf Cycles: progressive refine option
Just makes progressive refine :)

This means the whole image would be refined gradually using as much
threads as it's set in performance settings. Having enough tiles is
required to have this option working as it's expected.

Technically it's implemented by repeatedly computing next sample for
all the tiles before switching to next sample.

This works around 7-12% slower than regular tile-based rendering, so
use this option only if you really need it.

This commit also fixes progressive update of image when Save Buffers
option is enabled.

And one more thing this commit fixes is handling display buffer with
Save Buffers option enabled. If this option is enabled image buffer
wouldn't have neither byte nor float buffer until image is fully
rendered which could backfire in missing image while rendering in
cases color management cache became full.

This issue solved by allocating byte buffer for image buffer from
tile update callback.

Patch was reviewed by Brecht. He also made some minor edits to
original version to patch. Thanks, man!
2012-10-13 12:38:32 +00:00
7748133bf2 code cleanup: glare stream operation was setting alpha array twice. 2012-10-07 07:38:22 +00:00
d8144ef0f5 style cleanup: comment blocks 2012-10-04 13:26:15 +00:00
b288bc4ea4 fix [#32739] Glare node does "add" instead of "lighten" 2012-10-03 07:33:04 +00:00
62c151bd1c freeing node trees no longer decreases their user counts, this cause causing invalid memory access when freeing the blend file. 2012-10-02 13:59:05 +00:00
e795b8410b * fix for regression test [compo_map_uv.blend]
the wrapping was resized to fit the uv map. this step was wrong and has
been deleted.
2012-10-02 11:37:15 +00:00
ecbeb0f575 * fix for regression file [compo_map_zcombine_cubes.blend]
the alpha mix formula was wrong. updated it.

Be aware that the regression file does not take the alpha into account,
but it should. or at least one z combine should and the other not.

this fails in 2.63a.
 - At Mind -
2012-10-02 10:03:16 +00:00
20ca67bc35 Fix #32728: File Output node always save as RGBA, even when RGB is selected
Seems to be a regression in new compositor system -- wrong number of planes
was using for image buffer allocation.
2012-10-01 17:38:22 +00:00
4b0e41b0a7 fix [#32709] Color mix node produces artifacts from other frames 2012-10-01 06:34:02 +00:00
275c23f81c fix for double free. 2012-09-30 11:15:40 +00:00
9e3e12fa4e Proper fix for #32626: TIFF renders are limited to 8 bit even when we choose 16.
Color management would be applied on both of float and byte buffers on image
save in cases if file format doesn't require linear float buffer and if image
is saving as render result.

This solves both initial report issue and TODO marked in previous fix.

Also de-duplicated image buffer color managing code and gave some more
meaningful names for few functions. Also wrote documentation around this
function, so current assumptions about spaces should be clear enough.

Made regression tests by saving EXR/PNG images to all supported format and
rendering OpenGL/Normal animation, in all cases seems everything is fine,
but more tests for sure would be welcome.
2012-09-24 11:56:07 +00:00
34114b3b75 code cleanup: remove/comment unused defines 2012-09-22 13:40:31 +00:00
25c96bc9f3 code cleanup: remove unused macros, commet some which may be useful later - or good to keep for completeness. quieted some warnings and add flags -Wmissing-include-dirs and -Wno-div-by-zero to cmake/gcc 2012-09-20 01:02:39 +00:00
d724d0adfe code cleanup: quiet warnings for gcc's -Wundef, -Wmissing-declarations 2012-09-16 00:26:36 +00:00
232571c61a code cleanup: replace macro for BLI_rect size/center with inline functions. 2012-09-15 11:48:20 +00:00
a73dd3476e Color Management, Stage 2: Switch color pipeline to use OpenColorIO
Replace old color pipeline which was supporting linear/sRGB color spaces
only with OpenColorIO-based pipeline.

This introduces two configurable color spaces:

- Input color space for images and movie clips. This space is used to convert
  images/movies from color space in which file is saved to Blender's linear
  space (for float images, byte images are not internally converted, only input
  space is stored for such images and used later).

  This setting could be found in image/clip data block settings.

- Display color space which defines space in which particular display is working.

  This settings could be found in scene's Color Management panel.

When render result is being displayed on the screen, apart from converting image
to display space, some additional conversions could happen.

This conversions are:

- View, which defines tone curve applying before display transformation.
  These are different ways to view the image on the same display device.
  For example it could be used to emulate film view on sRGB display.

- Exposure affects on image exposure before tone map is applied.

- Gamma is post-display gamma correction, could be used to match particular
  display gamma.

- RGB curves are user-defined curves which are applying before display
  transformation, could be used for different purposes.

All this settings by default are only applying on render result and does not
affect on other images. If some particular image needs to be affected by this
transformation, "View as Render" setting of image data block should be set to
truth. Movie clips are always affected by all display transformations.

This commit also introduces configurable color space in which sequencer is
working. This setting could be found in scene's Color Management panel and
it should be used if such stuff as grading needs to be done in color space
different from sRGB (i.e. when Film view on sRGB display is use, using VD16
space as sequencer's internal space would make grading working in space
which is close to the space using for display).

Some technical notes:

- Image buffer's float buffer is now always in linear space, even if it was
  created from 16bit byte images.

- Space of byte buffer is stored in image buffer's rect_colorspace property.

- Profile of image buffer was removed since it's not longer meaningful.

- OpenGL and GLSL is supposed to always work in sRGB space. It is possible
  to support other spaces, but it's quite large project which isn't so
  much important.

- Legacy Color Management option disabled is emulated by using None display.
  It could have some regressions, but there's no clear way to avoid them.

- If OpenColorIO is disabled on build time, it should make blender behaving
  in the same way as previous release with color management enabled.

More details could be found at this page (more details would be added soon):
http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.64/Color_Management

--
Thanks to Xavier Thomas, Lukas Toene for initial work on OpenColorIO
integration and to Brecht van Lommel for some further development and code/
usecase review!
2012-09-15 10:05:07 +00:00
19863a7268 fix for 3 obvious mistakes/bugs. 2012-09-15 06:30:40 +00:00
883117077b fix for 2 crashes freeing masks
- freeing a mask from RNA BKE_libblock_free() twice on the mask.
- loading a new blend file would only free the mask and not unlink it from nodes - it would access freed memory.
2012-09-14 01:15:08 +00:00
773ea9b93d Fix for [#32536] Mixing with translated images in compositor produces
garbage strips for each tile

Promoted the behaviour of combine channels to node operation so that all
nodes use the same implementation. (CombineChannel had a better
implementation)
2012-09-11 16:57:05 +00:00
47ec91e8d3 code clenup: comments and some style edits on ghost/osx (odd indentation) 2012-09-06 02:10:09 +00:00
1d4316f35f fix [#32490] Compsitor crashes on missing OpenEXR multilayer files 2012-09-04 19:42:09 +00:00
aaafa0c2fe code cleanup: move file string defines into BLI_path_utils.h, BKE_utildefines is now unused but keep incase we want to add defines there later. 2012-09-03 22:04:14 +00:00
eff97a82f8 Fix for compositor always cacheing frames when using Movie Clip input node
Issue was caused by getting image from compositor node conversion code,
now it'll check whether rendering happens and if so, frame wouldn't be
stored in the cache.

This possible fixes #32465: Memory leak when rendering
2012-09-03 14:26:53 +00:00
a7831c74e6 fix for bug in variable size blur compositor node - using incorrect Y blur operations and uninitialized memory was causing random blur results. 2012-08-24 12:48:56 +00:00
65dbeabdc6 style cleanup: indentation, also quiet double promotion warnings for despeckle node. 2012-08-23 16:17:47 +00:00
4e772065d7 set defaults for de-speckle 2012-08-23 07:02:11 +00:00
1ab5a4f0ed despeckle composite node 2012-08-23 06:48:01 +00:00
45a0287f45 change I made gave a little nicer bleeding direction for inpaint but introduced dithering artifact. 2012-08-23 06:27:12 +00:00
3090ae35af fix [#32374] Curve compositor UI drawing glitch
copy the curve for the compositor.
2012-08-21 15:14:29 +00:00
ae9f5239a6 Fix for
* [#32356] Problem with "Ghost" in the "Glare" Node in Compositor
2012-08-21 10:45:01 +00:00
988df24551 compositor color curve was MEM_dupallocN'ing the curve for every pixel calculation (when there were black or white inputs on the curve node).
avoid allocation by using local vars for black/white storage & curve calculation.
2012-08-21 08:30:45 +00:00
49d3766ceb code cleanup: use math functions for curve compo code. 2012-08-21 08:20:32 +00:00
77f47799dd code cleanup: use BLI_RCT_SIZE macro 2012-08-20 23:06:17 +00:00
58ab8d5c0a use BLI math length functions for distance compositor operations. 2012-08-19 10:41:16 +00:00
Dalai Felinto
48eb27791b The Distance Node in 2.49/2.5/2.6 pre-tiles has a different calculation for RGB and YCC. While RGB
calculate the distance in 3d between R,G and B, the YCC only takes Cb and Cr
into consideration.

This commit makes COM_DistanceMatteOperation inheritable and expose the calculate distance function
to be re-implemented for the YCC node operation.

Thanks Troy Sobotka for the report over email.
Patch incorporates review suggestions by Jeroen Bakker.
2012-08-19 03:05:38 +00:00
6547b1e770 Documentation of the Bokeh image operation :) 2012-08-17 12:53:04 +00:00
3bc16fd60d compositor: replace C++ new/delete with guardedalloc. 2012-08-16 12:32:48 +00:00
883e9df1cc fix for bug reading past the buffer bounds for the inpaint node. 2012-08-16 12:13:01 +00:00
add9aea573 compositor - EWA filter was blurring too much by default, this caused the displace node to blur the image when no displacement was applied, making images fuzzy, the original C code has an interpolation option.
Added this option back and use for displace and UV composite nodes.
2012-08-16 10:13:04 +00:00
597e6f9bbc Fix for
* [#32323] regression: Dispertion artifacts with smaller chunksizes
 * [#32125] "Projector" Dispersion not working with ChunkSize < 256
2012-08-15 18:14:34 +00:00
53333c78ce use vector for color operation internal storage. 2012-08-14 11:17:06 +00:00