Creating mipmapped textures with OpenImageIO

419 views
Skip to first unread message

John Coldrick

unread,
Jan 22, 2016, 3:00:08 PM1/22/16
to OpenColorIO Developers
Profuse apologies if this is an inappropriate place to ask about OIIO, but I couldn't find a group for it specifically...

We've been starting to use oiiotool to prep texture maps for 3D, and recently I've been getting incorrect behaviour wrt mipmapping.  We were running this on Windows and I thought perhaps it might have been an obscure bug that slipped between the cracks since most folks are probably using it on Linux, but I recently compiled oiio on centos and got the same results.

If I have an exr file, already linearized, that I wish to mipmap I run:

$ oiiotool ./mymap.exr -tile 64 64 -d half -o ./mymipmap.exr

and when I run iinfo on this I get 

mymipmap.exr : 2048 x 2048, 4 channel, half openexr


if I run:

$ maketx ./mymap.exr -tile 64 64 -d half -o ./mymipmap.exr

iinfo provides:

mymipmap.exr : 2048 x 2048, 4 channel, half openexr (+mipmap)


I've verified by testing with render packages that indeed oiiotool is not creating a mipmap and maketx is.


I've tested this with OpenImageIO 1.5.16, 1.5.22 and 1.7.1dev - same results.

Am I doing something fundamentally wrong?  Many thanks for your thoughts...

J.C.

Larry Gritz

unread,
Jan 22, 2016, 3:29:07 PM1/22/16
to ocio...@googlegroups.com
There is an oiio-dev group: http://lists.openimageio.org/listinfo.cgi/oiio-dev-openimageio.org

The oiiotool command line you use is writing a tiled file, but there's more to a MIP-map. When you use maketx, it's creating a multi-resolution (MIP-map levels) as well as embedding some other assorted things in the metadata that help at render time.

Somewhere on my list is to add a feature to oiiotool that would cause it to do exactly the same thing that maketx does. But at present, you're expected to use maketx for that final MIPmap creation step.



--
You received this message because you are subscribed to the Google Groups "OpenColorIO Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ocio-dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
Larry Gritz
l...@larrygritz.com


John Coldrick

unread,
Jan 22, 2016, 5:46:27 PM1/22/16
to OpenColorIO Developers
Got it!  Cool, thanks Larry...

J.C.
Reply all
Reply to author
Forward
0 new messages