Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1409)

Issue 2798042: Review: Field3D support (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 6 months ago by larrygritz
Modified:
13 years, 5 months ago
Reviewers:
lg, oiio-dev, ckulla
Base URL:
http://svn.openimageio.org/oiio/trunk/
Visibility:
Public.

Description

The OIIO APIs have always had support for "3d" (volumetric) images, though it was largely untested because we didn't actually have any format readers for volumetric files. With this change, we add support for Field3D volume files (http://code.google.com/p/field3d/) and 3D texturing thereof. It should continue to build just fine if it can't find the Field3D libraries, you just won't get support for that format. The field3d plugin itself is fairly straightforward. The remainder is mostly fairly straightforward minor extensions to allow ImageCache and ImageBuf to hold volumetric tiles and images. I had to modify the TextureSystem::texture3d() API call to account for the fact that I'd forgotten a dPdz before, and also some things in TextureOptions were renamed to reflect that the 3rd texture coordinate should have been named r, not z. (Following from OpenGL's lead here.) I modified 'testtex' to sample a slice through the middle of a volume, as a quick way to test 3d lookups without a volume renderer. Since presumably nobody was using the non-functional 3D routines before, none of this should break compatibility with any of the existing 2D functionality in your apps. OSL folks: the review for the corresponding OSL changes (yes, including a built-in texture3d() function) will be posted soon, hopefully today but certainly no later than Monday. (Arnold developers: I'll also post the internal Arnold-side changes shortly.) A few caveats to be aware of: * The texture3d routines currently only sample/interpolate, they don't filter (which would be expensive since Field3D doesn't support multiresolution fields at present, and probably tricky to correctly filter anisotropically in 3D). Also, I only trilinearly interpolate at the moment, but in a few days I'll fix it to do cubic lookups for nicer interpolation. * It's possible that this will undergo some minor tweaking down the road, as production starts to play with it. I promise we'll have it fully nailed down before we bless an OIIO 0.9 release branch. (The break in APIs will NOT be back-ported to 0.8.) * SPI people: I still don't have it building correctly with all the internal namespaced libraries. I'll have that fixed by the time this is all reviewed. Shouldn't affect anybody else or standalone use. * Magnus tells me that in the next few days, he'll be pushing some minor Field3D library API changes to the public Field3D release. I'll post an updated version of this patch when that happens. It'll be fairly minor.

Patch Set 1 #

Total comments: 2

Patch Set 2 : New patch -- actually include the field3d files; fixes for SPI Linux compiles #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6228 lines, -4290 lines) Patch
site/spi/Makefile-bits View 1 1 chunk +6 lines, -1 line 0 comments Download
src/CMakeLists.txt View 1 3 chunks +3 lines, -1 line 0 comments Download
src/cmake/externalpackages.cmake View 1 1 chunk +58 lines, -0 lines 0 comments Download
src/doc/openimageio.pdf View 188 chunks +4071 lines, -4065 lines 0 comments Download
src/doc/openimageio.tex View 2 chunks +2 lines, -1 line 0 comments Download
src/doc/texturesys.tex View 6 chunks +17 lines, -10 lines 0 comments Download
src/field3d.imageio/CMakeLists.txt View 1 chunk +6 lines, -0 lines 0 comments Download
src/field3d.imageio/field3dinput.cpp View 1 chunk +497 lines, -0 lines 0 comments Download
src/field3d.imageio/field3doutput.cpp View 1 chunk +358 lines, -0 lines 0 comments Download
src/iinfo/iinfo.cpp View 1 1 chunk +4 lines, -1 line 0 comments Download
src/include/fmath.h View 1 3 chunks +56 lines, -2 lines 0 comments Download
src/include/imagebuf.h View 1 18 chunks +145 lines, -62 lines 0 comments Download
src/include/texture.h View 1 3 chunks +16 lines, -14 lines 0 comments Download
src/libOpenImageIO/CMakeLists.txt View 1 3 chunks +14 lines, -0 lines 0 comments Download
src/libOpenImageIO/formatspec.cpp View 1 3 chunks +26 lines, -15 lines 0 comments Download
src/libOpenImageIO/imagebuf.cpp View 1 7 chunks +62 lines, -38 lines 0 comments Download
src/libOpenImageIO/imageioplugin.cpp View 1 2 chunks +4 lines, -0 lines 0 comments Download
src/libtexture/imagecache.cpp View 1 15 chunks +42 lines, -10 lines 0 comments Download
src/libtexture/imagecache_pvt.h View 1 2 chunks +2 lines, -0 lines 0 comments Download
src/libtexture/texoptions.cpp View 1 1 chunk +3 lines, -2 lines 0 comments Download
src/libtexture/texture3d.cpp View 1 chunk +564 lines, -0 lines 0 comments Download
src/libtexture/texture_pvt.h View 1 2 chunks +52 lines, -14 lines 0 comments Download
src/libtexture/texturesys.cpp View 1 5 chunks +58 lines, -58 lines 0 comments Download
src/testtex/testtex.cpp View 1 6 chunks +139 lines, -1 line 0 comments Download
testsuite/texture-field3d/dense_float.f3d View 0 chunks +-1 lines, --1 lines 0 comments Download
testsuite/texture-field3d/dense_half.f3d View 0 chunks +-1 lines, --1 lines 0 comments Download
testsuite/texture-field3d/ref/out.exr View 0 chunks +-1 lines, --1 lines 0 comments Download
testsuite/texture-field3d/ref/out.txt View 1 chunk +1 line, -0 lines 0 comments Download
testsuite/texture-field3d/run.py View 1 chunk +27 lines, -0 lines 0 comments Download
testsuite/texture-field3d/sparse_float.f3d View 0 chunks +-1 lines, --1 lines 0 comments Download
testsuite/texture-field3d/sparse_half.f3d View 0 chunks +-1 lines, --1 lines 0 comments Download

Messages

Total messages: 9
larrygritz
13 years, 6 months ago (2010-10-29 23:36:18 UTC) #1
lg_imageworks.com
I should add that this first review only contains a reader for Field3D, I haven't ...
13 years, 6 months ago (2010-10-30 00:54:28 UTC) #2
ckulla
Looks pretty straightforward overall. I'm just a bit confused by the use of max(depth,1). Does ...
13 years, 6 months ago (2010-11-02 17:39:38 UTC) #3
larrygritz
On 2010/11/02 17:39:38, ckulla wrote: > Looks pretty straightforward overall. I'm just a bit confused ...
13 years, 6 months ago (2010-11-02 21:40:06 UTC) #4
larrygritz
New patch -- actually include the field3d files; fixes for SPI Linux compiles
13 years, 6 months ago (2010-11-02 21:41:13 UTC) #5
ckulla
> Because width & height are always >= 0 for a valid image. At some ...
13 years, 6 months ago (2010-11-02 21:46:45 UTC) #6
larrygritz
On 2010/11/02 21:46:45, ckulla wrote: > > You may want to do another pass through ...
13 years, 6 months ago (2010-11-02 21:58:10 UTC) #7
ckulla
LGTM
13 years, 6 months ago (2010-11-02 21:58:49 UTC) #8
larrygritz
13 years, 6 months ago (2010-11-02 22:03:01 UTC) #9
On 2010/11/02 21:58:49, ckulla wrote:
> LGTM

Actually, I will change that multiplication line, to:

        p += z * m_spec.scanline_bytes() * spec().height;

I'll fix the depth max business in subsequent reviews, as I come across them.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b