Skip to content

Commit

Permalink
Field3D deprecation part 2: Remove field3d support (#3151)
Browse files Browse the repository at this point in the history
OIIO 2.3 marked it as deprecated. This new change is for master (2.4+)
only -- removing all support for Field3D.

F3d is effectively unmaintained, is known to be incompatible with
the latest versions of OpenEXR/Imath, and we haven't found anyone
prepared to speak up as a user of it via OpenImageIO support.
  • Loading branch information
lgritz committed Oct 31, 2021
1 parent 5c89335 commit 71177ff
Show file tree
Hide file tree
Showing 33 changed files with 12 additions and 1,567 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
@@ -1,6 +1,10 @@
Release 2.4 (?? 2022?) -- compared to 2.3
----------------------------------------------
New minimum dependencies and compatibility changes:
* Support for Field3D files have been removed entirely. The Field3D library
appears to be no longer maintained, and is incompatible with modern versions
of OpenEXR/Imath. We believe that all prior uses of Field3D use via OIIOhave
been migrated to OpenVDB.

New major features and public API changes:

Expand Down
7 changes: 1 addition & 6 deletions INSTALL.md
Expand Up @@ -71,11 +71,6 @@ NEW or CHANGED MINIMUM dependencies since the last major release are **bold**.
may be required by some software distributions with policies against
embedding other projects), then just build with `-DUSE_EXTERNAL_PUGIXML=1`.
Any PugiXML >= 1.8 should be fine (we have tested through 1.11).
* If you want support for Field3D files:
* Field3D (tested through 1.7.3), *and* it must be explicitly enabled
by setting the CMake variable `-DENABLE_FIELD3D=1`.
* Note that Field3D support is deprecated and will be removed entirely
from OpenImageIO 2.4 and later.



Expand Down Expand Up @@ -156,7 +151,7 @@ file format (jpeg, fits, png, etc.). This works both as a CMake variable and
also as an environment variable.

`ENABLE_PkgName=0` : Disables use of an *optional* dependency (such as
FFmpeg, Field3D, Webp, etc.) -- even if the dependency is found on the
FFmpeg, OpenVDB, Webp, etc.) -- even if the dependency is found on the
system. This will obviously disable any functionality that requires the
dependency. This works both as a CMake variable and
also as an environment variable.
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -378,7 +378,7 @@ help:
@echo " For each dependeny Foo, defining ENABLE_Foo=0 disables it, even"
@echo " if found. And you can hint where to find it with Foo_ROOT=path"
@echo " Note that it is case sensitive! The list of package names is:"
@echo " DCMTK FFmpeg Field3D Freetype GIF JPEGTurbo"
@echo " DCMTK FFmpeg Freetype GIF JPEGTurbo"
@echo " LibRaw OpenColorIO OpenCV OpenGL OpenJpeg OpenVDB"
@echo " PTex R3DSDK TBB TIFF Webp"
@echo " Finding and Using Dependencies:"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -30,7 +30,7 @@ OpenImageIO consists of:
* Plugins implementing I/O for several popular image file formats,
including TIFF, JPEG/JFIF, OpenEXR, PNG, HDR/RGBE, ICO, BMP, Targa,
JPEG-2000, RMan Zfile, FITS, DDS, Softimage PIC, PNM, DPX, Cineon,
IFF, Field3D, OpenVDB, Ptex, Photoshop PSD, Wavefront RLA, SGI, WebP,
IFF, OpenVDB, Ptex, Photoshop PSD, Wavefront RLA, SGI, WebP,
GIF, DICOM, HEIF/HEIC/AVIF, many "RAW" digital camera formats, and a variety
of movie formats (readable as individual frames). More are being developed
all the time.
Expand Down
1 change: 0 additions & 1 deletion conanfile.txt
Expand Up @@ -18,7 +18,6 @@ tbb/2020.0
# pybind11/2.4.3 - conan doesn't have this minimum version
# dcmtk
# ffmpeg
# field3d
# libheif
# libraw
# openvdb
Expand Down
1 change: 0 additions & 1 deletion src/build-scripts/gh-installdeps.bash
Expand Up @@ -16,7 +16,6 @@ if [[ "$ASWF_ORG" != "" ]] ; then

sudo yum install -y giflib giflib-devel && true
sudo yum install -y opencv opencv-devel && true
sudo yum install -y Field3D Field3D-devel && true
sudo yum install -y ffmpeg ffmpeg-devel && true
if [[ "${EXTRA_DEP_PACKAGES}" != "" ]] ; then
time sudo yum install -y ${EXTRA_DEP_PACKAGES}
Expand Down
7 changes: 0 additions & 7 deletions src/build-scripts/install_homebrew_deps.bash
Expand Up @@ -38,7 +38,6 @@ brew install --display-times -q tbb || true
# brew install --display-times -q openvdb || true
brew install --display-times -q opencv || true
brew install --display-times -q qt@5
brew install --display-times -q field3d || true

echo ""
echo "After brew installs:"
Expand All @@ -58,11 +57,5 @@ export PATH=/usr/local/opt/python/libexec/bin:$PATH ;
export PYTHONPATH=/usr/local/lib/python${PYTHON_VERSION}/site-packages:$PYTHONPATH ;
export PATH=/usr/local/opt/llvm/bin:$PATH ;

# If field3d and hdf5 get even slightly out of sync, hdf5 will throw fits.
# This is unnecessary, so we disable the step to make CI more likely to
# pass in cases where they don't exactly match on the CI instances.
export HDF5_DISABLE_VERSION_CHECK=1


# Save the env for use by other stages
src/build-scripts/save-env.bash
18 changes: 0 additions & 18 deletions src/cmake/externalpackages.cmake
Expand Up @@ -176,24 +176,6 @@ checked_find_package (GIF
RECOMMEND_MIN 5.0
RECOMMEND_MIN_REASON "for stability and thread safety")

# Field3D is obsolete and we're considering it deprecated. Allow it but only
# if specifically requested. And disable if using a new OpenEXR/Imath that
# is too new to be supported by Field3D.
option (ENABLE_FIELD3D "Enable support for obsolete Field3D files" OFF)
if (ENABLE_FIELD3D)
checked_find_package (Field3D
DEFINITIONS -DUSE_FIELD3D=1)
if (FIELD3D_FOUND)
if (OPENEXR_VERSION VERSION_LESS 3.0)
message (STATUS "${ColorYellow}WARNING Disabling Field3D because it is not compatible with OpenEXR ${OPENEXR_VERSION}.${ColorReset}")
unset (FIELD3D_FOUND)
add_definitions (-UUSE_FIELD3D)
else ()
message (STATUS "${ColorYellow}WARNING Field3D support is deprecated, and will be removed entirely from OpenImageIO >= 2.4.${ColorReset}")
endif ()
endif ()
endif ()

# For HEIF/HEIC/AVIF formats
checked_find_package (Libheif VERSION_MIN 1.3
RECOMMEND_MIN 1.7
Expand Down
47 changes: 0 additions & 47 deletions src/cmake/modules/FindField3D.cmake

This file was deleted.

2 changes: 0 additions & 2 deletions src/cmake/testing.cmake
Expand Up @@ -237,8 +237,6 @@ macro (oiio_add_all_tests)
oiio_add_tests (dpx
ENABLEVAR ENABLE_DPX
IMAGEDIR oiio-images URL "Recent checkout of oiio-images")
oiio_add_tests (field3d texture-field3d
FOUNDVAR Field3D_FOUND ENABLEVAR ENABLE_FIELD3D)
oiio_add_tests (fits
ENABLEVAR ENABLE_FITS
IMAGEDIR fits-images
Expand Down
63 changes: 0 additions & 63 deletions src/doc/builtinplugins.rst
Expand Up @@ -419,69 +419,6 @@ the `set_ioproxy()` methods.
- Padded bytes at the end of each image


|
.. _sec-bundledplugins-field3d:

Field3D
===============================================

Field3d is an open-source volume data file format. Field3d files commonly
use the extension :file:`.f3d`. The official Field3D site is:
https://github.com/imageworks/Field3D Currently, OpenImageIO only reads
Field3d files, and does not write them.

Fields are comprised of multiple *layers* (which appear to OpenImageIO
as subimages). Each layer/subimage may have a different name, resolution,
and coordinate mapping. Layers may be scalar (1 channel) or vector (3
channel) fields, and the data may be ``half``, `float`, or ``double``.

OpenImageIO always reports Field3D files as tiled. If the Field3d file has
a "block size", the block size will be reported as the tile size. Otherwise,
the tile size will be the size of the entire volume.

.. list-table::
:widths: 30 10 65
:header-rows: 1

* - ImageSpec Attribute
- Type
- Field3d header data or explanation
* - ``ImageDescription``
- string
- unique layer name
* - ``oiio:subimagename``
- string
- unique layer name
* - ``field3d:partition``
- string
- the partition name
* - ``field3d:layer``
- string
- the layer (a.k.a. attribute) name
* - ``field3d:fieldtype``
- string
- field type, one of: ``"dense"``, ``"sparse"``, or ``"MAC"``
* - ``field3d:mapping``
- string
- the coordinate mapping type
* - ``field3d:localtoworld``
- matrix of doubles
- if a matrixMapping, the local-to-world transformation matrix
* - ``worldtolocal``
- matrix
- if a matrixMapping, the world-to-local coordinate mapping


The "unique layer name" is generally the partition name + ``:`` + attribute
name (example: ``"defaultfield:density"``), with the following exceptions:
(1) if the partition and attribute names are identical, just one is used
rather than it being pointlessly concatenated (e.g., ``"density"``, not
``"density:density"``); (2) if there are mutiple partitions + attribute
combinations with identical names in the same file, "*number*" will be added
after the partition name for subsequent layers (e.g., ``"default:density"``,
``"default.2:density"``, ``"default.3:density"``).

|
.. _sec-bundledplugins-fits:
Expand Down
1 change: 0 additions & 1 deletion src/doc/oiiointro.rst
Expand Up @@ -255,7 +255,6 @@ against dynamic libraries:
* Boost © various authors. http://www.boost.org
* GLEW © 2002-2007 Milan Ikits, et al. http://glew.sourceforge.net
* Ptex © 2009 Disney Enterprises, Inc. http://ptex.us
* Field3D © 2009 Sony Pictures Imageworks. https://github.com/imageworks/Field3D/
* GIFLIB © 1997 Eric S. Raymond (MIT Licensed). http://giflib.sourceforge.net/
* LibRaw © 2008-2013 LibRaw LLC (LGPL, CDDL, and LibRaw licenses). http://www.libraw.org/
* FFmpeg © various authors and distributed under LGPL. https://www.ffmpeg.org
Expand Down
16 changes: 0 additions & 16 deletions src/field3d.imageio/CMakeLists.txt

This file was deleted.

27 changes: 0 additions & 27 deletions src/field3d.imageio/field3d_backdoor.h

This file was deleted.

81 changes: 0 additions & 81 deletions src/field3d.imageio/field3d_pvt.h

This file was deleted.

0 comments on commit 71177ff

Please sign in to comment.