blender/intern/cycles/blender
Sergey Sharybin 7a90af7b5a Packed and generated images support for Cycles
This commit adds support of packed and generated images
for Cycles when using SVM backend. Movies are still not
supported. This changes also doesn't touch OSL which is
much less trivial to adopt for any images which are not
saved to disk.

Implementation details:

- When adding images to Image Manager is now possible
  to mark image as builtin. Builtin images will bypass
  OIIO loader and will use special loading callbacks.

- Callbacks are set by Blender Session and they're
  using C++ RNA interface to obtain needed data (pixels,
  dimensions, is_float flag).

- Image Manager assumes file path is used as reference
  to a builtin images, but in fact currently image
  datablock name is used for reference. This makes it
  easy to find an image in BlendData database.

- Added some extra properties to Image RNA:
  * channels, which denotes actual number of channels
    in ImBuf. This is needed to treat image's pixels
    correct (before it wasn't possible because API
    used internal number of channels for pixels which
    is in fact doesn't correlate with image depth)
  * is_float, which is truth if image is stored in
    float buffer of ImBuf.

- Implemented string lookup for C++ RNA collections
  for cases there's no manual lookup function.

OSL is not supported because it used own image loading
and filtering routines and there's seems to be no API
to feed pre-loaded pixels directly to the library.

Think we'll either need to add some API to support
such kind of feeding or consider OSL does not have
support of packed images at all.

Movies are not supported at this moment because of lack
of RNA API to load specified frame. It's not difficult
to solve, just need to consider what to best here:
* Either write some general python interface for ImBuf
  and use it via C++ API, or
* Write a PY API function which will return pixels for
  given frame, or
* Use bad-level BKE_* call

Anyway, small steps, further improvements later.

Reviewed by Brecht, thanks!
2013-01-12 10:59:13 +00:00
..
addon Cycles / Tile Rendering: 2013-01-07 19:55:49 +00:00
blender_camera.cpp Fix #33267: cycles math node power gave different results for CPU and GPU. The 2012-11-23 17:39:41 +00:00
blender_curves.cpp code cleanup: warnings, also add check in crash handler that a wmWindowManager is present. 2013-01-11 03:21:24 +00:00
blender_mesh.cpp Cycles Hair: add Generated texture coordinates for curves, so that procedural 2013-01-03 12:31:05 +00:00
blender_object.cpp Cycles: multiple importance sampling for lamps, which helps reduce noise for 2013-01-09 21:09:20 +00:00
blender_particles.cpp Fix #33113: cycles not rendering motion blur correct with dying particles. 2012-11-08 16:35:28 +00:00
blender_python.cpp Cycles: correction to how device of lists is exposed to blender 2012-11-10 08:37:02 +00:00
blender_session.cpp Packed and generated images support for Cycles 2013-01-12 10:59:13 +00:00
blender_session.h Packed and generated images support for Cycles 2013-01-12 10:59:13 +00:00
blender_shader.cpp Packed and generated images support for Cycles 2013-01-12 10:59:13 +00:00
blender_sync.cpp Cycles / Tile Rendering: 2013-01-07 19:55:49 +00:00
blender_sync.h New feature 2012-12-28 14:21:30 +00:00
blender_util.h Cycles Hair: add Generated texture coordinates for curves, so that procedural 2013-01-03 12:31:05 +00:00
CCL_api.h Cycles: correction to how device of lists is exposed to blender 2012-11-10 08:37:02 +00:00
CMakeLists.txt New feature 2012-12-28 14:21:30 +00:00