#!/usr/bin/env python from __future__ import print_function from __future__ import absolute_import import os import numpy import OpenImageIO as oiio checker = os.path.abspath("../common/textures/checker.tx") texture_sys = oiio.TextureSystem() texture_opt = oiio.TextureOpt() texture_opt.swrap = oiio.Wrap.Periodic texture_opt.twrap = oiio.Wrap.Periodic print("checker middle, top mip, channels: 1 =", texture_sys.texture(checker, texture_opt, 0.5, 0.5, 0, 0, 0, 0, 1)) print("checker middle, top mip, channels: 2 =", texture_sys.texture(checker, texture_opt, 0.5, 0.5, 0, 0, 0, 0, 2)) print("checker middle, top mip, channels: 3 =", texture_sys.texture(checker, texture_opt, 0.5, 0.5, 0, 0, 0, 0, 3)) print("") print( "checker middle, mip tail, channels: 1 =", texture_sys.texture(checker, texture_opt, 0.5, 0.5, 1 / 1024.0, 1 / 1024.0, 1 / 1024.0, 1 / 1024.0, 1)) print("") texture_opt.missingcolor = (1.0, 2.0, 3.0, 4.0)