Commit Graph

51 Commits

Author SHA1 Message Date
8268a4be71 most unused arg warnings corrected.
- removed deprecated bitmap arg from IMB_allocImBuf (plugins will need updating).
- mostly tagged UNUSED() since some of these functions look like they may need to have the arguments used later.
2010-10-16 14:32:17 +00:00
a8db76f00e fix for error in last commit. 2010-09-15 08:00:19 +00:00
f5957e6237 own recent commit which added support for writing srgb float buffers broke writing char buffers as half EXR's. 2010-07-15 13:32:20 +00:00
731824c464 support for colorspace conversion when saving srgb float buffers (from the sequencer) as openexr. 2010-07-12 14:54:05 +00:00
9e57892b90 dont add a rect buffer for EXR's, the sequencer discards them immediately and functions that need a rect should create one on the fly.
this shows a problem with Imbuf where there is no way to ask to only load the native type byte/float.
2010-07-12 13:35:00 +00:00
b9e241d3e3 error in last commit 2010-07-12 12:07:32 +00:00
51d8c5d93f [#22824] OpenEXR Save from byte buffer bug
- Saving a typical byte buffer as an exr wasnt converting into linear colorspace.
- Remove checks for 1 and 2 channel images, these will write as RGB anyway and are very rare.
- 3 Channel images were having the alpha channel written from the red color channel, write 1.0 instead.
2010-07-12 11:28:16 +00:00
7f575ddf89 revert 28807, fix for [#21385] Multilayer OpenEXR files import into other compositors upside down
looks like a threading problem:
 Easy to redo, 1024x436, FSA, 4 threads.

With 1 thread it runs ok, need to look into this further but no time now so reverting.
2010-05-19 16:23:09 +00:00
9c3c7f970f no functional changes, simplify some exr api code. 2010-05-17 16:42:53 +00:00
d5f74baa17 [#21385] Multilayer OpenEXR files import into other compositors upside down
famous upside down EXR bugfix from Xavier Thomas

- Files from blender 2.4x will be flipped on load.
- New files will be saved correctly

tracker has detailed info for further reference.
2010-05-17 15:54:57 +00:00
5774e61f4a shouldnt have committed this, was local hack to workaround float buffer bug. 2010-05-07 15:52:16 +00:00
d972b8488e fix for segfault when reading bad multilayer EXR's 2010-05-07 15:49:21 +00:00
008863daec Merge image related changes from the render branch. This includes the image
tile cache code in imbuf, but it is not hooked up to the render engine.


Imbuf module: some small refactoring and removing a lot of unused or old code
(about 6.5k lines).

* Added a ImFileType struct with callbacks to make adding an file format type,
  or making changes to the API easier.
* Move imbuf init/exit code into IMB_init()/IMB_exit() functions.
* Increased mipmap levels from 10 to 20, you run into this limit already with
  a 2k image.
* Removed hamx, amiga, anim5 format support.
* Removed colormap saving, only simple colormap code now for reading tga.
* Removed gen_dynlibtiff.py, editing this is almost as much work as just
  editing the code directly.
* Functions removed that were only used for sequencer plugin API:
  IMB_anim_nextpic, IMB_clever_double, IMB_antialias, IMB_gamwarp,
  IMB_scalefieldImBuf, IMB_scalefastfieldImBuf, IMB_onethird, IMB_halflace,
  IMB_dit0, IMB_dit2, IMB_cspace
* Write metadata info into OpenEXR images. Can be viewed with the command
  line utility 'exrheader'

For the image tile cache code, see this page:
http://wiki.blender.org/index.php/Dev:2.5/Source/Imaging/ImageTileCache
2010-05-07 15:18:04 +00:00
081c1205a3 correct fsf address 2010-02-12 13:34:04 +00:00
04dec46c6a Color management fixes
Now it's a bit more robust, tagging images with profiles when they're loaded, 
which then get interpreted later on by conversion functions. Just Linear RGB 
and sRGB profiles at the moment, same as before.

This commit fixes Martin's problem with EXRs and Multilayer images loading/
saving too dark, and it also makes the sequence editor work correctly with it too.

Also fixes:
[#19647] gamma correction with color management is reset when resetting Curve
[#19454] 2.5: Dither does not work when Color management is enabled
2010-01-09 00:16:35 +00:00
b39f73431a [#19232] (2.5) Correction of cmake for windows about audio (jack and openal)
from Guillaume Lecocq (lguillaume) 

[#19247] (2.5) useless WITH_OPENEXR redefinition
from Mauro Toffanin (equilibrium)
2009-08-24 10:07:49 +00:00
c8b4cf9206 2.50:
svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r19820:HEAD

Notes:
* Game and sequencer RNA, and sequencer header are now out of date
  a bit after changes in trunk.
* I didn't know how to port these bugfixes, most likely they are
  not needed anymore.
  * Fix "duplicate strip" always increase the user count for ipo.
  * IPO pinning on sequencer strips was lost during Undo.
2009-06-08 20:08:19 +00:00
aeb2225a28 2.50: some warning fixes. 2009-03-17 22:27:15 +00:00
0c23d0c2ad Bugfix #17327
Small one: changed the string attribute in multilayer exr files to be:

"2.43 and newer"

To indicate that it's about compatibility of the exr file, not the version
Blender saved it in.
2008-07-14 10:26:11 +00:00
d0d179dce6 Buhh... and now I left in testing print in exr code. 2008-07-09 15:25:34 +00:00
180a7d1f62 Replaced strcasecmp with BLI_strcasecmp, to make msvc happy! 2008-07-09 13:12:58 +00:00
bad6b003db Fix for reported openexr file reading failures.
For simple RGB(A) files, the channel names in openexr were supposed
to be simply "R" "G" "B" and "A" too.
Other programs like other names... like lower case, or like "ambient.r"

Tested with file from renderman.
2008-07-09 10:51:03 +00:00
391bd70d42 Fix for bug #9014: crash saving the depth pass with openexr or hdr,
both file formats crashed on saving images with less than 4 channels.
2008-04-29 16:57:39 +00:00
03402b8419 - Removed the Save Buffers/FSA restriction that the width and height
must be divisible by the number of parts.
- OpenEXR code also has some changes to allow writing mipmapped images,
  but that is unused at the moment.
2008-02-06 13:45:07 +00:00
Ken Hughes
0a27a31970 Clean-up for various gcc warnings under linux. 2008-02-03 01:33:35 +00:00
70c413d4ad Fixes in reading back rendered temp files ("Save buffers" and "FSA" options).
Press Rkey in compositor for reading back render results and invoke a compo.
This now correctly reads AO (skipped it sometimes) and it makes a correct
composite.

FSA todo:
- hotkey + button for reading all samples back + composite
- solve black border around image
2008-01-30 21:14:36 +00:00
9b0c2efeed Handle OpenEXR exception and print it, for writeTile. It's sometimes
crashing there now with FSA, if it crashes again this should give
more info.
2008-01-28 21:28:32 +00:00
Nathan Letwory
e3ff98fc6b === OpenEXR ===
* fix [ #6105 ] Blender crashes when opening multilayer with node in compositor
  - Mem_IStream membuf was allocated on the stack, so it caused major troubles when
 out of the function scope. Now allocate it on the heap and let OpenEXR deal with
 freeing it.
  - moved + added delete file;'s for completeness
2007-03-27 10:13:57 +00:00
d1b17f8c30 ==== MSVC 7.1 project files ====
- fix for 3DPlugin compile
- cleanup of bullet path
- removed PHY_ODE project from 3D plugin too, not used anymore

Now all configurations should build again, let me know of any problems!

Not been able to test if the 3DPlugin is actually working,is job for another day ;)
Also the 3DPlugin is compiled without OpenExr, this needs to be looked into once too.
2007-03-03 11:28:15 +00:00
06826d27d4 Bugfix #5818
OpenEXR MultiLayer: line order DECREASING_Y (openexr spec) crashes newer
openexr libs in windows... ???
Removed it, since tests reveiled the line order is still bottom-top
2007-01-24 15:03:20 +00:00
3228b58a38 Added flag in MultiChannel exr file to denote line order. Blender has the
Y coordinate 0 in left-bottom of screen :)

Fun news: cinepaint now reads such files too:
http://www.blender.org/bf/cornelius.exr_sc1.jpg
2007-01-09 13:58:51 +00:00
ac37a15675 "Save Buffers" fix: when you ESC from rendering, it now saves empty
tiles in the file, that read back fast as black. This also solves
crashes on partial written files, when trying to read them.
2006-12-21 19:37:53 +00:00
b12927ecb8 MultiLayer images: added support for choosing compression type.
Without setting anything, it uses ZIP now as default, which gives the best
lossless compression and works nice fast.
2006-12-21 10:41:43 +00:00
ed853e00da Function returned no '1', causing multilayer files to not read, except
for me of course :)
2006-12-20 21:34:20 +00:00
253432bfc7 The Big Image refactor!
Please read:
http://www.blender3d.org/cms/Imaging.834.0.html

Or in short:

- adding MultiLayer Image support
- recoded entire Image API
- better integration of movie/sequence Images

Was a whole load of work... went down for a week to do this. So, will need
a lot of testing! Will be in irc all evening.
2006-12-20 17:57:56 +00:00
2a0fc46266 CMake: Fix FFMPeg/OpenEXR issues in CMake system and possibly the others. OpenEXR can be linked in DEBUG mode on Windows using the libraries in CVS and stub. 2006-11-18 02:48:18 +00:00
148bc0a2e8 Tsk! A 'new' for filehandle wasn't combined with a 'delete', which is
probably causing the leakage issues we have exr in linux.
2006-03-18 14:45:15 +00:00
ea9866a75f Memory saving for large renders:
New option "Save Buffers", in first Output panel of renderbuttons, will not
allocate all render buffers, but instead save the rendered tiles to exr.
For each scene rendered, a single exr file then is created.
After rendering, the files get read, and only then the memory allocation is
done.

The exr files are saved in the temp dir (from user settings), and have
names derived from the filename+scene name. That way these buffers remain
relatively unique, and can be re-used later too.

Saving all render-layers and passes in a single file (as F3 command) will
be done later. Also reading back the current muli-layer exr files is not
supported yet (will read black). The purpose is that these files then can
be used as input for the Compositor.

One fun thing I added; after rendering once with this option, close
Blender, and restart it. If you have a Composite set up press 'R' on an
active RenderResult node. This will refresh the node(s) and load the exr,
so you can composite again without a re-render.
2006-03-14 21:29:42 +00:00
fe3506f6d4 WIP commit on getting the 'render result layers' saved in a single
file. Previous fix accidentally committed parts of that... :)

Note: it is currently disabled still... will commit the real version
soon.
2006-03-14 17:48:40 +00:00
a8afa6dc20 Proper syntax for freeing an allocated array in silly c++ :) 2006-03-01 21:18:31 +00:00
21df108cb9 Saving OpenEXR half didn't free allocated half buffer... silly c++ memory
management!
2006-02-28 16:45:52 +00:00
ecdfa5374a Work in progress commit on saving OpenEXR with all render-layers and
passes in single file. Code is currently disabled, commit is mainly to
have a nicer method of excluding OpenEXR dependency from render module.
This should compile with disabled WITH_OPENEXR too.

Reason why EXR is great to include by default in Blender is its feature
to store unlimited layers and channels, and write this tile based. I
need the feature for saving memory; while rendering tiles, all full-size
buffers for all layers and passes are kept in memory now, which can go
into 100s of MB easily.
The code I commit now doesn't allocate these buffers while rendering, but
saves the tiles to disk. In the end is it read back. Overhead for large
renders (like 300 meg buffers) is 10-15 seconds, not bad.

Two more interesting aspects:
- Blender can save such multi-layer files in the temp directory, storing
it with .blend file name and scene name. That way, on each restart of Blender,
or on switching scenes, these buffers can be read. So you always see what was
rendered last. Also great for compositing work.
- This can also become an output image type for rendering. There's plenty of
cases where you want specific layers or passes saved to disk for later use.

Anyhoo, finishing it is another days of work, and I got more urgent stuff
now!
2006-02-23 20:57:31 +00:00
387f9a7c6d Four-in-one commit:
(NOTE: new include dependency in Render module, might need MSVC update!
It has to include the imbuf/intern/openexr/ directory in search path)

-> New Composite node: "Hue Saturation".
Works like the former 'post process' menu. There's no gamma, brightness or
multiply needed in this node, for that the Curves Node functions better.

-> Enabled Toolbox in Node editor
This now also replaces the SHIFT+A for adding nodes. The nodes are
automatically added to the menus, using the 'class' category from the
type definition.

Current classes are (compositor examples):

Inputs: RenderResult, Image
Outputs: Composite, Viewer
Color Ops: RGB Curves, Mix, Hue Saturation, AlphaOver
Vector Ops: Normal, Vector Curves, Map Value
Filters: Filter, Blur, VectorBlur
Convertors: ColorRamp, RGBtoBW, Separate RGBA, Separate HSVA, Set Alpha
Generators: RGB, Value, Time
Groups: the list of custom defined nodes

-> OpenEXR tile saving support
Created an API for for saving tile-based Images with an unlimited amount
of layers/channels. I've tested it for 'render result' now, with the idea
that this can (optionally) replace the current inserting of tiles in the
main result buffers. Especially with a lot of layers, the used memory for
these buffers can easily go into the 100s of megs.
Two other advantages:
- all 'render result' layers can be saved entirely in a single file, for
  later use in compositing, also for animation output.
- on each render, per scene, a unique temp file can be stored, allowing
  to re-use these temp files on starting Blender or loading files, showing
  the last result of a render command.

The option is currently disabled, needs more work... but I had to commit
this because of the rest of the work I did!

-> Bug fix
The Image node didn't call an execute event when browsing another image.
2006-02-18 13:28:44 +00:00
7eba749401 Made exr saving respect the 'RGB' or 'RGBA' setting in render output
panel. Saves a whopping 25% filesize!
2006-02-09 18:55:14 +00:00
0665f0d647 Orange;
Until now, the zbuffer was written straight from the internal zbuffer,
which has values that are inverse-proportional (like 1.0/z) which makes
it very hard to use it for postprocess, like zblur or other composit effects
that require Z.

Based on info from ILM, the values stored for Z in exr files is the
actual distance from a camera. I think that's about time to migrate to that
convention!

By default now, after render, the z values are converted to floats. This
saves in exr files now, but not in the Iris Z files. That latter was a
blender-only anyway, so might be not a real hassle to drop. :)

You can see the difference in the image window, but notice the range now
is linear mapped from camera clipstart to clipend.

Note; I just discover that ortho Z values need a different correction...
2006-01-11 22:36:31 +00:00
305fdec0eb Orange: tested all EXR demo images from openexr.com, found two issues;
- images with a so-called "data window" (have negative start coordinate)
  did not read correctly
- negative colors were not clamped yet in imbuf

Now there's still some compliancy issues with zbuffers... you can save
it either as unsigned int or as float, whilst blender renders zbuffer in
signed int. :)
2006-01-11 10:41:04 +00:00
d594594cbe Orange: more work on float/exr buffers;
- EXR now saves and reads Zbuffers correctly
- EXR reading didn't set alpha to 1 yet when no alpha buffer was present

- ImageWindow: the "black point" only checked for the r value... now is OK
- ImageWindow: Curves panal has button "reset"
- ImageWindow: hold LMB drag shows rgba and z values. With SHIFT or CTRL it
  applies black/white point whilte dragging too
- ImageWindow: saving file copied the entire buffer... removed that. Also
  made the header print clear; this save only saves in own file type.

- Curves: zoom and drag now gets clamped by the Clipping value

- Imbuf: duplicate buffer only copied one quarter of to new buffer
2006-01-10 21:41:37 +00:00
Chris Want
ca8da580a8 OpenEXR support for Windows Makefiles 2006-01-10 06:29:57 +00:00
e62fed936e Orange: more exr & imbuf cleanup
- Reading exr images now goes OK. I've unified the code for reading
  'half' and 'float' (was nicely possible!). And removed useless copying
  of data around.

- Fixed bug in allocating new rects, like for making mipmaps. flag issues.

- filter code accidentally incremented wrong pointer (crash on mipmap too)
2006-01-09 19:17:37 +00:00
f0aceff196 Orange: Further cleanup of EXR saving
- F10 scene buttons now has options "half" and "zbuf" for exr saving.
  Note: when no float buffer is available, it always saves as "half",
  that's sufficient anyway, since half is 16 bits per channel.

- EXR in imbuf now uses compliant ibuf->ftype flags for denoting exr
  extensions such as 'half' and 'compression'.

- Removed ugly blenkernel dependency from exr module
2006-01-09 10:55:41 +00:00