Commit Graph

347 Commits

Author SHA1 Message Date
9cd01c6a5c Added option for group node buffering in the compositor.
Justa cluster did not have enough memory to handle all Mango 4k scenes.
Option is default disabled and can be enabled in the performance panel.

 - At Mind -
2013-02-16 20:21:41 +00:00
9a6c5d8b3e We've reconsidered previous patch in IRC.
It's more useful to completely ignore alpha for display of straight
colors.

Supporting straight pipeline is possible, but not a topic for bcon4.
2013-02-10 13:14:51 +00:00
75cbb07507 Added option to composite/viewer nodes which specifys whether alpha input
is straight or not (premultiplied is default).

This is useful in cases when you want to check on output of such nodes
as keying which does have straight alpha output.

Also added missing do_version code to previous compo do_versions.
2013-02-10 12:20:10 +00:00
67da51fe76 fix for [#34133] Creation of an RGBA buffer from an RGB color and an alpha channel not possible. 2013-02-07 07:24:22 +00:00
296444e1dc style cleanup: some warnigs & spelling. 2013-02-06 14:02:19 +00:00
23bf087338 Code clean up translate node
added constants.
moved the code to a separate class. so it can be reused for other nodes
2013-02-06 08:40:12 +00:00
03687b7c66 Compositor "Relative" option for Translate node, same as for other nodes this
makes it possible to specify an offset relative to the render resolution (so 0.5
is half the image rather than giving the number of pixels). It's a bit late but
it's a trivial change and needed for 4k mango render.
2013-02-04 16:12:42 +00:00
69993c5d40 style cleanup: spaces -> tabs 2013-02-04 00:18:09 +00:00
9d4be17de4 style cleanup 2013-02-04 00:05:15 +00:00
2950214527 One fix for bug [#33785] compositor is (unnecessarily?) slow
Added additional buffers - new subtree - for groupnodes.
One needs to be aware of how groupnodes should be created. 
Having translate & scale nodes, with the translate inside the groupnode and the scale node outside, causes artefacts.
Both should be inside or outside the groupnode. Same holds for other distort nodes.
2013-02-03 17:22:26 +00:00
a5cef69a0d Apply patch [#33999] Wrapping mode for the "translate" compositing node
this patch enables the translate node to wrap around the image borders. This is especially needed if the translate node is not used to position elements on a layer but when it is used instead for seamless backgrounds like mountains or clouds that should be repeated over time (by animating the x/y values).

No trunk without docs! So here is my documentation: http://wiki.blender.org/index.php/User:Plasmasolutions/TranslateNodeExtension

The code is properly documented and should be easy to read and understand. When there are any problems or issues, please comment, I'll tackle them right away!

Greetings, Thomas Beck


 * optimized determination dependant areas
 * fixed some issues with scale node

There are still some issues when scaling very small values (x=0.0001)

 - At Mind -
2013-01-31 15:08:37 +00:00
761ac89877 style cleanup 2013-01-15 23:45:41 +00:00
e24443b79a style cleanup 2013-01-09 03:30:15 +00:00
1dd8851244 Fix #33804: Blender crash unlinking multilayer exr image in image node 2013-01-08 08:39:28 +00:00
c2dfcd9208 Convert alpha node: rename "key alpha" to "straight alpha" for consistency. 2012-12-28 14:46:32 +00:00
818a345be3 Silent a bunch of gcc warnings (usually dummy, but noisy!). 2012-12-02 16:01:06 +00:00
ee08c27f95 fix [#33368] Crash with multilayer exr node 2012-12-01 08:47:39 +00:00
Lukas Toenne
d73633e537 When the File Output node exits early in convertToOperations (in case not rendering), it should still unlink all inputs to avoid debug assert failure that checks for remaining Node connections (debug_check_node_connections). 2012-11-21 10:09:51 +00:00
Lukas Toenne
e6449a5c2c Fix for debug assert failure with Reroute nodes in compositor. After redirecting links from the reroute output the input must be completely unlinked, otherwise the debug_check_node_connections will complain (this is a sanity check that ensures all the original Nodes have been fully reconnected to Operations). 2012-11-21 09:32:40 +00:00
469324b049 Fix compositing normal node not properly showing vector XYZ values when opening
socket menu, and make the normal animatable.
2012-11-17 16:11:02 +00:00
c063194c6a Fix #33204: Blur node ignores Gamma setting
Gamma correction option was ignored by new compositor system.
Also new compositor was doing alpha premul in a wrong way. In fact,
not sure if it should do premul -- old compositor didn't do that..
2012-11-17 06:14:25 +00:00
5c6f6301b0 Image thread safe improvements
This commit makes BKE_image_acquire_ibuf referencing result, which means once
some area requested for image buffer, it'll be guaranteed this buffer wouldn't
be freed by image signal.

To de-reference buffer BKE_image_release_ibuf should now always be used.

To make referencing working correct we can not rely on result of
image_get_ibuf_threadsafe called outside from thread lock. This is so because
we need to guarantee getting image buffer from list of loaded buffers and it's
referencing happens atomic. Without lock here it is possible that between call
of image_get_ibuf_threadsafe and referencing the buffer IMA_SIGNAL_FREE would
be called. Image signal handling too is blocking now to prevent such a
situation.

Threads are locking by spinlock, which are faster than mutexes. There were some
slowdown reports in the past about render slowdown when using OSX on Xeon CPU.
It shouldn't happen with spin locks, but more tests on different hardware would
be really welcome. So far can not see speed regressions on own computers.

This commit also removes BKE_image_get_ibuf, because it was not so intuitive
when get_ibuf and acquire_ibuf should be used.

Thanks to Ton and Brecht for discussion/review :)
2012-11-15 15:59:58 +00:00
Dalai Felinto
7cfb79256e Map Range Node (tiles)
this node allows for more control for normalization of the mapped input range.

Made during BlenderPRO 2012 - Brasilia, Brazil :)
Idea and testing: Daniel Salazar
Implementation: yours truly
Reviewed by Lukas Toenne and Sergey Sharybin
2012-11-14 19:53:46 +00:00
f81e30a41f Solved issue with distorted compositor results in some cases
Originally issue was discovered when using stabilization and movie distortion
nodes, but in fact issue was caused by render layer node always doing nearest
interpolation. Now made it so this node will respect sampler passed to it's
executePixel function and do an interpolation.

Added two new functions to do bilinear/bicubic interpolation in float buffer
with variable number of components per element, so it could interpolate 1, 3
and 4 component vectors. This functions currently mostly duplicates the same
functions from imageprocess.c and it should actually be de-duplicated. Think
it's ok to leave a bit of time with such duplication, since functions should
be generalized one more time to support byte buffers, which could backfire on
readability.

Also removed mark as complex from stabilization node, which isn't needed sine
int fact this node is not complex.
2012-11-10 19:11:25 +00:00
Lukas Toenne
17934e1803 Fix for Hue/Sat/Val compositor node. This was using the wrong input socket for the color constant (Fac instead Image). 2012-11-01 17:05:01 +00:00
f213ae0b19 style cleanup 2012-11-01 09:54:00 +00:00
Lukas Toenne
36127e1255 Added compositor graph functions for removing socket connections explicitly in convertToOperations. The InputSocket->unlink function should only be used in combination with relinkConnectionsDuplicate, in which case the original node connection will still exist. This would trigger an assert failure, so the original connection should be removed. Only node using this atm is the channel separation node, but will be needed for future group nodes too. 2012-10-29 14:04:51 +00:00
Lukas Toenne
09ed97afc5 Internal node links are now cached in a per-node list, instead of being generated as a transient list that is returned from the callback and had to be freed by the caller. These internal links are used for muted nodes, disconnect operators and reroute nodes, to effectively replace the node with direct input-to-output links.
Storing this list in the node has the advantage of requiring far fewer calls to the potentially expensive internal_connect callback. This was called on every node redraw ...

Also it will allow Cycles to properly use the internal links for muted nodes, which ensures consistent behavior. The previous method was not applicable in Cycles because transient list return values are not supported well in the RNA and particularly the C++ API implementation.
2012-10-25 16:49:06 +00:00
a49b1d7b5e Oeps... Enabled the pixelate node added documentation, removed unneeded
code
2012-10-24 13:43:32 +00:00
6d79568f66 style cleanup 2012-10-24 09:07:54 +00:00
0fb9b7beda Adding a pixelate node.
This makes it possible to create pixelized scale in the Tile compositor.

Just append the node in front of a scale node or where you want the pixelization to take place.

There were some bugs on this subject, but they used the work around to add a blur size of 0 in the place where they need the pixelization.
2012-10-24 08:36:10 +00:00
f3ece5a108 style cleanup: trailing tabs & expand some non prefix tabs into spaces. 2012-10-21 05:46:41 +00:00
a4724a2dd8 Fix #32905: Crash with Levels node when no input is connected. 2012-10-18 10:27:09 +00:00
27e54f4d37 code cleanup: remove redundant casts. quiet some qualifier warnings. 2012-10-14 07:40:16 +00:00
97d4fb4161 code cleanup: make header defines more consistent, JOYSENSOR header guard had a typo too. 2012-10-09 13:36:42 +00:00
4b6be3c19b fix for using uninitialized blur falloff for dilate/erode node. 2012-09-30 12:24:29 +00:00
483a6cd6c2 fix for cycles/python script error in normal panel 2012-09-26 19:23:06 +00:00
b25cce1430 Compositor:
*  Node muting in node groups didn't work.

[#32597] Mute one node in a group blocks it

It looked for connections in the main tree, and not inside the group.
2012-09-25 13:02:52 +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
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
8fd7471143 cleanup pixel sampler code (pixel interpolations in compositor) 2012-08-28 10:41:37 +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
1ab5a4f0ed despeckle composite node 2012-08-23 06:48:01 +00:00
3090ae35af fix [#32374] Curve compositor UI drawing glitch
copy the curve for the compositor.
2012-08-21 15:14:29 +00:00
8bd7c3fba2 change curve evaluation functions never to modify curve data (ensures thread safety), now initializations has to be done outside evaluation. 2012-08-21 14:43:51 +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
6fb4bbdbd9 compositor bokeh blur - only use the variable size operation when the size socket is connected. 2012-08-16 13:15:13 +00:00
9591142294 add variable size option to bokeh blur node, remove f_stop option (it wasnt used), and add blur_max to the interface. 2012-08-14 14:31:39 +00:00