Hi,
I add support for UDIM in Clarisse over the TextureSystem a few years
ago, I should have a few answers:
- I used the <UDIM> tag. "%04d" is too generic and may confuse users in
my opinion, since it could also be a way to specify a frame. Having an
explicit tag that stands out is useful. (so we have two tags: <UDIM> for
Mari and <UVTILE> for Mudbox. )
- Agree that UDIM is single tile. Tile indice in UDIM is hardcoded in
Clarisse to 1000 + 10 * V + U + 1. Mari seems to be harcoded as well,
so unless you have a in house software package that support other sizes,
I don't think you'll need another line width. We've never had any
complaint so far.
Per texture option : useless.
At texture system level: why not, it shouldn't make the code much more
complex.
- In my implementation, I do not make any assumption on the data: it may
or may not exist for a UV range, resolution may change, so does
AOV/channels. It's not the most efficient way to go, but I'm sure that
it will work every if you mix mipmapped TX files with loads of AOV with
simple Jpegs.
Here are a few thoughts that I'd like to share with you about this feature:
- The main issue I have today is being able to use filtering over
several tiles. I compute the name of the file to evaluate, and offset
UVs before calling the texture() function, which means that OIIO does
not know that I'm evaluating UDIM tiles => I can't get any filtering on
the sides of the tiles, or integrate data over several tiles. Making
this work would be awesome.
- Listing the available tiles for fast access can be easily done. What I
do is parse the folder, get all files matching the filename and create
an array to later be able to evaluate a tile without accessing its
filename. Very efficient especially if you have holes.
- Do you plan to support Mudbox tiling system as well ? It's not that
different and is able to handle negative ranges, which is very pratical
for symmetry.
- I'm interested in testing it, i'm curious to see if it's faster than
my implementation, in which case i'd switch.
On 05/30/2016 11:41 PM, Larry Gritz wrote:
I've gotten a few requests lately for direct UDIM support in OIIO (and,
transitively, in OSL).
The way I figure this will work is that you pass in the UDIM u and v texture coordinates (which may extend outside [0,1],
with each [i,i+1) block indicating a different texture region tile), and for the filename you will give a generic name
such as "myfile.<UDIM>.tx". For the particular texture lookup, the u and v will be assessed and the
"<UDIM>" will be replaced with the right tile number (let's say "1013" for u=0.25, v=0.12).
Don't worry, I know a way to do this so that there is no actual string
searching or construction happening per call. So the expense of this will be
very very low.
But I want to make sure everybody is happy with the way of signalling this, so
I have a few questions.
* What text should indicate that it's a UDIM texture and which will be substituted with the tile number?
"<UDIM>"? "%04d" or some other explicit format indicator? Something else?
* Does everybody agree that UDIM tiles are 1-D (i.e. a single tile number, not
a separate u and v tile in the filename), start with 1001, are 4 digits, and
always have 10 tiles in the u direction? Can this be hard-coded, or does it
need to be an option to the ShadingSystem (that could be overridden on a
per-site/per-product basis), or does it need to be something that can be
specified separately for every texture?
* Because the filename you pass is "virtual" -- that is, "foo.<UDIM>.tif"
doesn't actually exist, it's only turned into a proper existing filename in the midst of a lookup for a
particular u,v -- this means that TextureSystem::get_texture_info which lacks uv coordinate parameters
must necessarily fail for most queries, since you don't know which individual texture region file should
be used. Does that sound reasonable for those queries to fail?
* Are there any properties that you feel strongly should or should not be
constrained to be identical for all of the individual region files for one UDIM
texture? I assume we want to allow the region tiles to have differing
resolutions, say. But should/can we assume that they must all share the same
number of channels? Are there any cases I need to be aware of where differences
are nonsensical? Any cases where differences are inevitable and I need to
ensure that such flexibility is allowed?
Let me know if you have opinions. As well, even if you are fine with the
proposal but are keen to try out the UDIM support as soon as it's available,
let me know so I can ping you for feedback when it's ready to take for a test
drive.
-- lg
--
Larry Gritz
[email protected]
_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org
_______________________________________________
Oiio-dev mailing list
[email protected]
http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org