Autodesk / Autodesk/arnold-usd
Convert disk lights to spot light when cone:angle attribute is present
- Dominant language
- Python
- Stars
- 284
- Forks
- 68
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 14
Description
**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](https://help.autodesk.com/view/ARNOL/ENU/?guid=arnold_for_houdini_solaris_ah_Light_Filters__html), 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:
1. Create a spotlight via the tab menu (Lights >> Spot Light)
2. Change the angle to something reasonable

3. Follow the [light linking](https://help.autodesk.com/view/ARNOL/ENU/?guid=arnold_for_houdini_solaris_ah_Light_Filters__html) docs to attach a Gobo to the spotlight, e.g.

4. The render will show nothing

5. Change the spotlight type to 'Sphere' (or 'Point')

6. The render will now shot the light filter properly

**Used Software Versions**
- Houdini 19.5.569
Contributor guide
Research direction
Start by reproducing the Houdini 19.5.569 workflow: create a Spot Light, set its angle, export to USD, convert it to ASS with kick, and attach a Gobo light filter. Inspect how the exported light type and cone:angle attribute are handled; done means a light with cone:angle exports as spot_light and renders the Gobo correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100