arnold-usd
arnold-usd copied to clipboard
Convert disk lights to spot light when cone:angle attribute is present
Describe the bug
Creating a spotlight via the tab menu (Lights >> Spot Light) will use 'Disk' as the default type:
When exported to .USD (and converted to .ASS with kick), the type is disk_light
disk_light
{
name /lights/spotlight1
matrix
0.967461348 0.0116126118 -0.252752304 0
-0.252959639 0.0227694027 -0.967208862 0
-0.00547680212 0.999673307 0.0249660388 0
0.0243682899 1.84101534 0.2631042 1
color 1 1 1
intensity 10
exposure 0
normalize off
diffuse 1
specular 1
filters 2 1 NODE
NULL "/materials/arnold_materialbuilder1/gobo1"
radius 0.706361651
}
This doesn't work with gobo light linking, which only works for spot_light/sphere light types.
Potential fix
Identify when the 'spotlight specific' attributes are set (i.e. cone:angle)
and set the light type to spot_light.
To Reproduce Steps to reproduce the behavior:
-
Create a spotlight via the tab menu (Lights >> Spot Light)
-
Change the angle to something reasonable
-
Follow the light linking docs to attach a Gobo to the spotlight, e.g.
-
The render will show nothing
-
Change the spotlight type to 'Sphere' (or 'Point')
-
The render will now shot the light filter properly
Used Software Versions
- Houdini 19.5.569
Issue synced internally to ARNOLD-13593