AcademySoftwareFoundation/OpenRV

[Bug]: inputImage.size() not working in merge and combine custom glsl nodes

Opened this issue · 0 comments

What happened?

While writing custom glsl(gto) nodes I noticed a weird behaviour when trying to access the size of the input images.
With the color type it works without Problems.

But with the merge and combine custom nodes inputImage.size() just returns an empty vector (vec2(0,0).

According to the docs

Here is a small file where this is obvious. (When working the resulting image should be shifted to the left, with combine and merge, nothing happens.)

GTOa (4)

TestColor : IPNodeDefinition (1)
{
    node
    {
        string evaluationType = "color"
        string defaultName = "TestColor"
    }

    function
    {
        string glsl = "vec4 main(const in inputImage in0) {return in0(vec2(in0.size().x/2, 0));}"
    }
}


TestMerge : IPNodeDefinition (1)
{
    node
    {
        string evaluationType = "merge"
        string defaultName = "TestMerge"
    }

    function
    {
        string glsl = "vec4 main(const in inputImage in0, const in inputImage in1) {return in0(vec2(in0.size().x/2, 0));}"
    }
}

TestCombine : IPNodeDefinition (1)
{
    node
    {
        string evaluationType = "combine"
        string defaultName = "TestCombine"
    }

    function
    {

        string glsl = "vec4 main(const in inputImage in0, const in inputImage in1) {return in0(vec2(in0.size().x/2, 0));}"
    }
    
    parameters
    {
        string layer0 = ""
        string layer1 = ""
    }
}

test_custom_nodes.gto.txt

Additional Info:
I only noticed this issue, because those nodetypes (combine & merge) also behave very weird with anamorphic inputs, this might be a topic for another issue, but during the workaround I wanted to get the size, and realized it's not working.

List all the operating systems versions where this is happening

macOS14, LinuxCentos7

On what computer hardware is this happening?

PC, Macbook

Relevant console log output

-

Environment variables

COMMAND_MODE=unix2003
HOME=/Users/mirco
IOCIN_ARGS= --format RGB8_PLANAR --useChromaticities 0 --ioSize 61440 --ioMethod 2 --ioMaxAsync 16
IODPX_ARGS= --format RGB8_PLANAR --useChromaticities 0 --ioSize 61440 --ioMethod 2 --ioMaxAsync 16
IOEXR_ARGS= --rgbaOnly 0 --inherit 1 --noOneChannel 0 --readWindowIsDisplayWindow 0 --readWindow 3 --planar3channel 0 --stripAlpha 0 --convertYRYBY 0 --ioSize 61440 --ioMethod 3 --ioMaxAsync 16
IOJPEG_ARGS= --ioSize 61440 --ioMethod 0 --ioMaxAsync 16
IOTARGA_ARGS= --ioSize 61440 --ioMethod 2 --ioMaxAsync 16
IOTIFF_ARGS= --ioSize 61440 --ioMethod 2
LANG=C
LC_ALL=C
LOGNAME=mirco
MOVIEFFMPEG_ARGS= --defaultFPS 24
MOVIEMISTIKA_ARGS= --format RGB8_PLANAR
MU_MODULE_PATH=/Users/mirco/Library/Application Support/RV/Mu:/Applications/RV.app/Contents/PlugIns/Mu
OIIO_LIBRARY_PATH=/Users/mirco/Library/Application Support/RV/OIIO:/Applications/RV.app/Contents/PlugIns/OIIO:/Applications/RV.app/Contents/PlugIns/OIIO
ORIGINALLOCAL=en
OTIO_PLUGIN_MANIFEST_PATH=/Applications/RV.app/Contents/PlugIns/Python/../SupportFiles/otio_reader/manifest.json
PATH=/usr/bin:/bin:/usr/sbin:/sbin
PYTHONPATH=/Users/mirco/Library/Application Support/RV/Python:/Users/mirco/Library/Application Support/RV/MediaLibrary:/Applications/RV.app/Contents/PlugIns/Python:/Applications/RV.app/Contents/PlugIns/MediaLibrary
QT_MAC_WANTS_BEST_RESOLUTION_OPENGL_SURFACE=0
QT_QUICK_BACKEND=software
RV_APP_GTO_REFERENCE=
RV_APP_INIT=/Applications/RV.app/Contents/Resources/English.lproj/rvrc.mu
RV_APP_LICENSES_NOTES=
RV_APP_MANUAL=
RV_APP_MANUAL_HTML=
RV_APP_MU_MANUAL=
RV_APP_PYINIT=/Applications/RV.app/Contents/Resources/English.lproj/rvrc.py
RV_APP_REFERENCE_MANUAL=
RV_APP_REFERENCE_MANUAL_HTML=
RV_APP_RELEASE_NOTES=
RV_APP_RV=/Applications/RV.app/Contents/MacOS/RV
RV_APP_RVIO=/Applications/RV.app/Contents/MacOS/rvio
RV_APP_RV_SHORT_NAME=RV
RV_APP_SDI_MANUAL=
RV_APP_SDI_MANUAL_HTML=
RV_DARK=1
RV_OS_VERSION_MAJOR=10
RV_OS_VERSION_MINOR=19
RV_OS_VERSION_REVISION=0
RV_OTIO_CHECKSUM=OmpnERZQUVxuUA5fO14HDw87V1gJSEVXFRJrVl4MBglsPhAWagBbTUpdPVdZVgVdZm1ERGsWTVkUVgZmUQ9cVA==
RV_PYTHONPATH_EXTERNAL=
SGTK_DEFAULT_AUTH_METHOD=app_session_launcher
SHELL=/bin/zsh
SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.VKJffWkW7q/Listeners
SSL_CERT_FILE=/Applications/RV.app/Contents/lib/python3.10/site-packages/certifi/cacert.pem
TANK_CURRENT_PC=/Applications/RV.app/Contents/src/sgtk/baked/plugin/bundle_cache/baked/tk-config-rv/v2.1.0-rc1
TK_AUTH_PRODUCT=RV
TK_RV_MODE_NAME=sgtk_bootstrap
TMPDIR=/var/folders/ym/lfgpkr9s0bd0brmq3fcdv3vc0000gn/T/
TWK_APP_SUPPORT_PATH=/Users/mirco/Library/Application Support/RV:/Library/Application Support/RV:/Network/Library/Application Support/RV:/Applications/RV.app/Contents/PlugIns
TWK_APP_VERSION=2024.1.0
TWK_FB_PLUGIN_PATH=/Users/mirco/Library/Application Support/RV/ImageFormats:/Applications/RV.app/Contents/PlugIns/ImageFormats
TWK_MEDIA_LIBRARY_PLUGIN_PATH=/Users/mirco/Library/Application Support/RV/MediaLibrary:/Applications/RV.app/Contents/PlugIns/MediaLibrary
TWK_MOVIE_PLUGIN_PATH=/Users/mirco/Library/Application Support/RV/MovieFormats:/Applications/RV.app/Contents/PlugIns/MovieFormats
TWK_NODE_PLUGIN_PATH=/Users/mirco/Library/Application Support/RV/Nodes:/Applications/RV.app/Contents/PlugIns/Nodes
TWK_OUTPUT_PLUGIN_PATH=/Users/mirco/Library/Application Support/RV/Output:/Applications/RV.app/Contents/PlugIns/Output
TWK_PROFILE_PLUGIN_PATH=/Users/mirco/Library/Application Support/RV/Profiles:/Applications/RV.app/Contents/PlugIns/Profiles
TWK_RVIO_SETUP=81037
USER=mirco
XPC_FLAGS=0x0
XPC_SERVICE_NAME=application.com.autodesk.RV.17958937.17988845
__CFBundleIdentifier=com.autodesk.RV
__CF_USER_TEXT_ENCODING=0x1F5:0x0:0x0
**************** Build Info ************************
OS: DARWIN
Arch:
Compiler: AppleClang


Extra information

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct