Skip to content

Comments

HYDRA-1993 : Fix Maya lights crash when using HdArnold#352

Merged
debloip-adsk merged 2 commits intodevfrom
debloip/HYDRA-1993/fix-area-light-crash
Nov 28, 2025
Merged

HYDRA-1993 : Fix Maya lights crash when using HdArnold#352
debloip-adsk merged 2 commits intodevfrom
debloip/HYDRA-1993/fix-area-light-crash

Conversation

@debloip-adsk
Copy link
Collaborator

@debloip-adsk debloip-adsk commented Nov 27, 2025

Why the crash happened :

  1. HdStorm supports shadows only for simple and distant lights.
  2. In our Maya lights adapters, we compute shadow data based on whether the selected renderer is Storm or not. If it's Storm, we don't generate shadowing data, but we do for all other renderers.
  3. Our secondary pass is always using Storm.

So if we select Arnold, then shadow data is generated, and the secondary pass with Storm receives this shadow data but does not support it : crash

This fix adds the option in pass filtering to remove lights from a pass, which we do in the secondary pass, whilst keeping only the Maya default light (which is a simple light, so no issues there)

return bbox;
}

const SdfPath& MayaHydraSceneIndex::MayaDefaultLightPath()
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We need to access this before the first MayaHydraSceneIndex is created, and this is essentially a static constant anyways, so I extracted the data field into a static variable inside the static method, so we don't need to have created a MayaHydraSceneIndex to use the value.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This adds a Maya area light and a USD distant light

@debloip-adsk debloip-adsk self-assigned this Nov 27, 2025
@debloip-adsk debloip-adsk added the ready-for-merge Development process is finished, PR is ready for merge label Nov 28, 2025
@debloip-adsk debloip-adsk merged commit 4436d4f into dev Nov 28, 2025
10 checks passed
@debloip-adsk debloip-adsk deleted the debloip/HYDRA-1993/fix-area-light-crash branch November 28, 2025 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-merge Development process is finished, PR is ready for merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants