arnold-usd icon indicating copy to clipboard operation
arnold-usd copied to clipboard

Convert disk lights to spot light when cone:angle attribute is present

Open TomMinor opened this issue 1 year ago • 1 comments

Describe the bug Creating a spotlight via the tab menu (Lights >> Spot Light) will use 'Disk' as the default type: image

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) image 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 image

  3. Follow the light linking docs to attach a Gobo to the spotlight, e.g. image

  4. The render will show nothing image

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

  6. The render will now shot the light filter properly image

Used Software Versions

  • Houdini 19.5.569

TomMinor avatar May 22 '23 15:05 TomMinor

Issue synced internally to ARNOLD-13593