DescriptionThe 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 #
MessagesTotal messages: 9
|