PixarAnimationStudios / OpenUSD

Universal Scene Description
http://www.openusd.org
Other
5.45k stars 1.13k forks source link

Hydra support for purpose on lights #3059

Open rasmusbonnedal opened 3 weeks ago

rasmusbonnedal commented 3 weeks ago

Description

We have a DomeLight with a humongous environment texture like this:

def DomeLight "dome_environment" (
    prepend apiSchemas = ["ShadowAPI"]
)
{
    asset inputs:texture:file = @ljus1_ikea tom studio utan ljus_mono.hdr@
}

which causes the NVidia driver to throw up when loading the scene in usdview / Storm. nvidia_opengl_error

We would like to have a preview version of the texture and @spiffmon told me the purpose token should work but is not supported by Hydra yet. It would be ideal for us to be able to author purpose on the lights like this and have it work in usdview:

def DomeLight "dome_environment" (
    prepend apiSchemas = ["ShadowAPI"]
)
{
    asset inputs:texture:file = @ljus1_ikea tom studio utan ljus_mono.hdr@
    uniform token purpose = "render"
}

System Information (OS, Hardware)

Windows 10

Package Versions

OpenUSD 23.11

meshula commented 2 weeks ago

@rasmusbonnedal When Hio opens images it's possible to resize to maximum possible. Apparently it's not getting limited upon load. How big is your HDR image? Could you share it with us for testing? It could be that we're trying to create a too-big image, it's also possible that the HDR image itself is being misparsed. And it's also possible that we don't attempt to limit a properly parsed incredibly large image to a plausible dimension.

jesschimein commented 2 weeks ago

Filed as internal issue #USD-9594

rasmusbonnedal commented 2 weeks ago

@meshula

>iinfo "ljus1_ikea tom studio utan ljus_mono.hdr"
ljus1_ikea tom studio utan ljus_mono.hdr : 5400 x 2700, 3 channel, float hdr

I generated a new image with the same specs and the problem is the same:

>oiiotool --pattern checker 5400x2700 3 -d float -o checker.hdr

I have attached a repro scene and my system information.

NVIDIA System Information 04-29-2024 08-44-11.txt

repro_opengl_tdr_large_texture.zip