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

LightToCamera : Support USD spot lights #5447

Merged

Conversation

murraystevenson
Copy link
Contributor

This adds support for USD spot lights to LightToCamera, identifying them based on the presence of a shaping:cone:angle parameter and adding support for coneAngleType metadata.

@murraystevenson murraystevenson self-assigned this Aug 30, 2023
@@ -134,6 +134,12 @@ const char *lightType( const IECore::CompoundData *shaderParameters, const std::
return "";
}

if( boost::starts_with( metadataTarget, "light:" ) && shaderParameters->member<FloatData>( "shaping:cone:angle" ) )
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is definitely a step forward for USD lights authored within Gaffer, where we only expect shaping:cone:angle to have been enabled if it is wanted and has a sensible value. But I've seen at least one other DCC that seemed to always author shaping:cone:angle, using a value of 90 (or was it 180?) as a sentinel value meaning "ignore me". I don't know what the official line on that is as UsdLux is badly under specified, but I think it'd be worth us ignoring values >=90 here regardless, since the perspective projection is broken in those cases. I'm going to merge anyway as we wanted to include this in today's release, but I think it might be worth doing a quick follow up?

@johnhaddon johnhaddon merged commit c97b2ba into GafferHQ:1.3_maintenance Aug 30, 2023
4 checks passed
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

Successfully merging this pull request may close these issues.

2 participants