You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note - this is the result of a discussion on the Academy Software Foundation slack.
I wanted to sample a number of in-memory buffers representing tiles using the texturesystem. I thought (based on advice) that I could populate an ImageCache with "fake" images named in the fashion of UDIM tiles such as "test.1001.null", "test.1002.null", and sample them using the name containing the UDIM pattern (such as test.<UDIM>.null). This does work for single images but not for UDIM tiles.
OpenImageIO version and dependencies
OpenImageIO 2.5.10.0
To Reproduce
Steps to reproduce the behavior:
Use the test C++ code snippet below in a setup that has OIIO available (sorry I don't have exact steps here).
Call OIIOTest::testBufferUDIMSampling();
The output will be:
Checking test.1001.null at st: {0.5,0.5}
No inventory test.1001.null u0 v0
Checking test.1002.null at st: {0.5,0.5}
No inventory test.1002.null u0 v0
Checking test.<UDIM>.null at st: {0.5,0.5}
No inventory test.<UDIM>.null u0 v0
test.<UDIM>.null did not sample correctly.
Incorrect result: {0,0,0,0}
This indicates that after populating the cache we were able to sample the image test.1001.null and test.1002.null, and get the expected result, but were unable to sample test.<UDIM>.null. The inventory of UDIM tiles always gives 0 tiles, in all three cases, which may be a clue.
The code using the nullImageInputCreator follows the example found here:
Debugged through this today and, yeah, the current UDIM code here only traverses the file-system, not the items loaded into the ImageCache, when building its inventory. This lack of inventory for test.<UDIM>.null means sampling won't work as you expect it to.
Let me see if I can get others to chime in here about possible ways forward.
Description
Note - this is the result of a discussion on the Academy Software Foundation slack.
I wanted to sample a number of in-memory buffers representing tiles using the texturesystem. I thought (based on advice) that I could populate an ImageCache with "fake" images named in the fashion of UDIM tiles such as "
test.1001.null
", "test.1002.null
", and sample them using the name containing the UDIM pattern (such astest.<UDIM>.null
). This does work for single images but not for UDIM tiles.OpenImageIO version and dependencies
OpenImageIO 2.5.10.0
To Reproduce
Steps to reproduce the behavior:
OIIOTest::testBufferUDIMSampling();
test.1001.null
andtest.1002.null
, and get the expected result, but were unable to sampletest.<UDIM>.null
. The inventory of UDIM tiles always gives 0 tiles, in all three cases, which may be a clue.The code using the
nullImageInputCreator
follows the example found here:OpenImageIO/src/libOpenImageIO/imagecache_test.cpp
Lines 161 to 186 in 64f829f
Test code snippet:
The text was updated successfully, but these errors were encountered: