Commit Graph

493 Commits

Author SHA1 Message Date
3285d47842 Fix #32930: texture colors in material nodes (blender internal) are brighter than normal
There was a missing byte buffer linearization for shader nodes.

Also fixed incorrect image input color space refresh when image is packed.
2012-10-22 17:34:06 +00:00
4e11fe6c5a Patch #27397: Improved DPX/Cineon code
Patch by Julien Enche, thanks!

From the patch comment:

It allows Blender to load:
- 1, 8, 10, 12 and 16 bits files. For 10 and 12 bits files, packed or
  filled type A/B are supported.
- RGB, Log, Luma and YCbCr colorspaces.
- Big and little endian storage.
- Multi-elements (planar) storage.

It allows Blender to save :
- 8, 10, 12 and 16 bits file. For 10 and 12 bits files, the most used
  type A padding is used.
- RGB and Log colorspaces (Cineon can only be saved in Log colorspace).
  For Log colorspace, the common default values are used for gamma,
  reference black and reference white (respectively 1.7, 95 and 685 for
  10 bits files).
- Saved DPX/Cineon files now match the viewer.

Some files won't load (mostly because I haven't seen any of them):
- Compressed files
- 32 and 64 bits files
- Image orientation information are not taken in account. Here too,
  I haven't seen any file that was not top-bottom/left-right oriented.
2012-10-22 12:49:00 +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
63840fd505 Fix #32755: Stripes in Metastrip can not be moved on other channel with mouse (grab tool)
The issue was caused by SEQ_BEGIN macro modifying sequence's depth
which ruined transformation routines. Used own DFS instead which
doesn't modify sequences.

Also corrected some typos in api and comments.
2012-10-04 18:30:28 +00:00
dbeddcdbce style cleanup: also correct incorrect doxy heading 2012-09-26 20:26:31 +00:00
90a5e8593c Color Management: float generated images had is_data flag set incorrect 2012-09-25 08:42:24 +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
904515814f fix [#32626] TIFF renders are limited to 8 bit even when we choose 16.
this is a regression with color management, TIFF's were always being written as 8bit

however the float buffer is assumed to be linear when converting from float to 16bit pixels per channel, so support for color management might need to be added here.
2012-09-24 01:13:13 +00:00
a1e24889ba A bit alternative fix for bug mentioned in rev50826
We need to assign color space for generated images when it's empty.
Do this in add_ibuf_size function in cases image's color space is
empty.

So now color management is always called with correct color space.

P.S. At least it should. If there're more similar issues please
     let me know :)
2012-09-23 14:41:03 +00:00
f61ef65adb Color Management: different fixes for byte buffers
- Color space of byte buffer for generated images haven't been
  updated properly on change

- Byte buffers weren't handling data color spaces on display transform
  properly
2012-09-21 20:44:41 +00:00
ddcc3f612a Fix #32603: Multi-Layer EXR files can't be color managed
Issue was caused by completely different way how multi-layer EXRs are loading,
they're bypassing general image buffer loading functions.

Solved by running color space transformation on render result construction
from multi-layer EXR image.

Also fixed issue with wrong display buffer computing for buffers with less
than 4 channels. Issues were:

- Display buffer is always expected to be RGBA
- OpenColorIO can not apply color space transformations on non-{RGB, RGBA}
  pixels.
2012-09-20 10:07:49 +00:00
a09b5c1f20 Color Management: new generated images had empty color space by default
Now use default byte/float colorspace when creating new image.
2012-09-19 19:53:16 +00:00
4759f70e33 Fix crash editing mask with no image in the image editor. 2012-09-18 19:20:21 +00:00
3069db2216 Revert part of rev50719, it's not actually needed and it always
invalidates render result display buffers.
2012-09-18 11:21:57 +00:00
3d9d7275b5 Color Management: fixed crash when changing display device in screenshot save operator
In fact, color management settings shouldn't be editing from this operator since
screenshot is using OpenGL which is in sRGB space, but fixed issues with Image
Format initialization and added NULL pointer checks.
2012-09-18 10:11:46 +00:00
c50c654543 Fixed missing display buffer invalidation when rendering sequencer animation 2012-09-18 08:40:53 +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
05755d307a fix [#31946] Masking doesn't respect pixel ratio 2012-09-13 05:29:38 +00:00
068cceab6c fix for some errors reported by http://clang.blenderheads.org/trunk/ in r50384.
- when renderlayers could not be found in save_render_result_tile() blender would crash.
- RE_engine_end_result() / rna end_result() didn't set result argument as required.
... also some style cleanup.
2012-09-04 18:27:47 +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
0bd759fddd new image operator now allows color grid (before was only grid on/off) 2012-08-29 08:17:38 +00:00
f8db7ccb62 fix for bug with render slots - where the menus wouldnt only show layers from the last render which could be meaningless in different render slots. 2012-08-21 11:10:16 +00:00
0fee1a3c0b Suport function for Collada exporter: after a generated image was stored to disk, the new filetype was not always recognized. 2012-08-17 23:29:39 +00:00
10f631094c fix [#32126] STAMP: Setting a background color causes color flicker
when rendering the sequencer can output float or char buffers which stamp wasn't accounting for.
2012-08-12 22:50:21 +00:00
866f986898 fix for stamp text drawing into a color buffer not taking color management into account. 2012-08-12 22:18:20 +00:00
cfb160c764 style cleanup 2012-08-12 21:46:35 +00:00
f0951f58ca code cleanup: rename G.afbreek --> is_break, G.rendering --> is_rendering 2012-08-08 18:37:06 +00:00
1bf893e9c8 Code cleanup: BKE_ prefix for public sequencer functions 2012-08-08 11:15:40 +00:00
fa04832247 Code cleanup:
* Removed some remaining defines for AVI_CODEC (from the old 2.4x days and windows only), because only some defines were left, no underlying code to bring back, so just as good remove for good.
2012-08-02 21:50:49 +00:00
ce3293b2d9 code cleanup: remove redundant float casts 2012-08-02 11:33:21 +00:00
98969c64ff code cleanup: move sequencer timecode into its own func. 2012-07-09 10:55:41 +00:00
84bf3e48c0 style cleanup: use c style comments in C code 2012-07-06 23:56:59 +00:00
2e3c474b2d image sequence - apply cyclic option AFTER the image offset,
there was no way to properly loop on a sequence of images that didnt start frame 1.
2012-07-03 14:25:06 +00:00
42aaa47e9b dont display image sequences outside the frame range in the 3D viewport. 2012-07-03 14:04:39 +00:00
5d9f3c5d18 fix for crash scaling an image 2012-06-29 10:52:37 +00:00
bee0f76f26 fix for crash in python getting the image size for a sequence. 2012-06-28 15:34:21 +00:00
74c9c24d27 style cleanyp 2012-06-23 23:22:19 +00:00
257283e030 added new function BKE_imbuf_to_image_format 2012-06-22 15:40:49 +00:00
Lukas Toenne
10932e2e97 Fix #31778. BKE_image_user_frame_calc can be called with iuser==NULL in some circumstances now, so needs to check that. 2012-06-10 15:07:08 +00:00
Lukas Toenne
0586705b63 Fix #31747, broken image sequence loading after r47432.
The image file name function was updating the iuser->framenr using a supposed cfra parameter. However, the actual cfra is unknown when loading movies or sequences, so the iuser->framenr value itself was passed in its place, leading to incremental addition of the iuser frame offset. Removed the cfra parameter altogether from the image path function. This should instead be done separately if necessary, it's not an inherent part of constructing the image file name.
2012-06-10 07:35:45 +00:00
186f542b79 remove casts to short when allocating new imbufs. 2012-06-07 18:33:36 +00:00
4e338e894f Cycles: support for image sequences in image/environment texture node. 2012-06-04 19:38:33 +00:00
617027fdf3 Fix #31352: Image sequence texture - can't load image after changing image source
Added new flag to Imageuser which indicates whether user frame calculation is needed.
This flag is getting set in BKE_image_signal and handled in actual image usage areas
where both image user and current frame is known.
2012-06-04 10:41:18 +00:00
b33f0ef0e3 style cleanup 2012-05-27 19:40:36 +00:00
ce9ee99c07 Fix #31538: Wrong colors after reloading file with exr image
Issue was caused by generated images had got no profile set (IB_PROFILE_NONE)
which confused OpenEXR saver (which makes sRGB conversion for profiles which
are not linear).

Actually this is much deeper issue which would require the whole color pipeline
workflow (which would happen at some point when currently urgent stuff is resolved),
but having correct profile set for generated images would still be helpful.
2012-05-26 17:04:51 +00:00
5fe5a8c283 style cleanup: function definitions 2012-05-17 23:21:11 +00:00
2c23bb8389 rna function Image.scale(w, h), useful for utility functions to open/scale/save images. 2012-05-17 15:26:11 +00:00
599d213115 style cleanup: line length and ensure some macros error when not ending with ';' 2012-05-17 07:59:25 +00:00
c93d7a193a style cleanup: BKE_*.c files which deal with library functions 2012-05-06 15:15:33 +00:00
1dccd4c98a code cleanup: naming - pose/armature/image
also use ..._find_name(..., name) rather then ..._find_named(..., name) --- both were used.
2012-05-05 16:03:57 +00:00