Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Light linking on instanceable references doesn't seem to work with USDIMAGINGGL_ENGINE_ENABLE_SCENE_INDEX=1 #3306

Open
robpieke opened this issue Sep 20, 2024 · 1 comment

Comments

@robpieke
Copy link
Contributor

Using USD 24.08 and both the RenderMan delegate and our Karma delegate, we're observing that light linking against instanceable references no longer works (in both usdview and the Solaris viewport). Not sure if there's a missing/misconfigured Scene Index in the chain, but this is what we get out of the box.

lgtlink

#usda 1.0
(
    endTimeCode = 1
    framesPerSecond = 24
    metersPerUnit = 1
    startTimeCode = 1
    timeCodesPerSecond = 24
    upAxis = "Y"
)

def Xform "sphere1"
{
    def Sphere "sphere"
    {
        float3[] extent = [(-1, -1, -1), (1, 1, 1)]
        double radius = 1
        matrix4d xformOp:transform = ( (1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (-1, 0, -1, 1) )
        uniform token[] xformOpOrder = ["xformOp:transform"]
    }
}

def Xform "sphere2"
{
    def Sphere "sphere"
    {
        float3[] extent = [(-1, -1, -1), (1, 1, 1)]
        double radius = 1
        matrix4d xformOp:transform = ( (1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (1, 0, -1, 1) )
        uniform token[] xformOpOrder = ["xformOp:transform"]
    }
}

def "i_sphere1" (
    instanceable = true
    prepend references = </sphere1>
)
{
    matrix4d xformOp:transform:transform1 = ( (1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 0, 2, 1) )
    uniform token[] xformOpOrder = ["xformOp:transform:transform1"]
}

def "i_sphere2" (
    instanceable = true
    prepend references = </sphere2>
)
{
    matrix4d xformOp:transform:transform2 = ( (1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 0, 2, 1) )
    uniform token[] xformOpOrder = ["xformOp:transform:transform2"]
}

def Xform "lights"
{
    def DistantLight "lgt_red" 
    {
        rel collection:lightLink:excludes = None
        uniform token collection:lightLink:expansionRule = "expandPrims"
        uniform bool collection:lightLink:includeRoot = 0
        rel collection:lightLink:includes = [
            </i_sphere2>,
            </sphere2>,
        ]
        color3f inputs:color = (1, 0, 0)
        bool inputs:normalize = 0
        matrix4d xformOp:transform = ( (0.5, -0.866, -0, 0), (0, 0, -1, 0), (0.866, 0.5, -0, 0), (0, 0, -0, 1) )
        uniform token[] xformOpOrder = ["xformOp:transform"]
    }

    def DistantLight "lgt_green" 
    {
        rel collection:lightLink:excludes = None
        uniform token collection:lightLink:expansionRule = "expandPrims"
        uniform bool collection:lightLink:includeRoot = 0
        rel collection:lightLink:includes = [
            </i_sphere1>,
            </sphere1>,
        ]
        color3f inputs:color = (0, 1, 0)
        bool inputs:normalize = 0
        matrix4d xformOp:transform = ( (0.5, 0.866, -0, 0), (0, 0, -1, 0), (-0.866, 0.5, -0, 0), (0, 0, -0, 1) )
        uniform token[] xformOpOrder = ["xformOp:transform"]
    }
}
@jesschimein
Copy link

Filed as internal issue #USD-10162

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants