LuxCore icon indicating copy to clipboard operation
LuxCore copied to clipboard

Feature request: Render using the perspective of a spot light as a camera.

Open Deadwing888 opened this issue 4 years ago • 4 comments

Currently in Blender if one were to click a light and use "Set Active Object as Camera" then the scene is shown from that light's perspective.

If one then tries to render from that perspective Luxcore will throw the error "| LIGHT OBJECTS as cameras are not supported, use a CAMERA object"

Cycles does not throw this error in blender, nor did Mental Ray throw this error in 3DS Max.

It is a very useful feature for the lighting design industry. I'll be attaching a $100 bounty as soon as I can figure out how.

Deadwing888 avatar Oct 26 '21 21:10 Deadwing888

It's a bit of a niche feature (only very few people would use this), so it was never implemented. As a workaround, you can create a camera with the same transformation as the light (could even be automated with a few lines of Python).

Theverat avatar Oct 27 '21 08:10 Theverat

I discussed workarounds with some people in discord. Thanks for the suggestion for the near term.

In the long term I'd like to see this feature implemented. I've added a $200 bounty on bountysource.

I believe the best way to handle the camera angle is to use the outer edge of the spot light for the narrowest part of the desired aspect ratio. If the aspect ratio were square, all four camera edges would be tangential to the outer edges of the circle.

Deadwing888 avatar Oct 28 '21 03:10 Deadwing888

@Theverat Will a patch to allow arbitrary objects to be used as cameras be accepted? I'll make sure it'll calculate viewports the same as Eevee?

rovernn avatar Nov 01 '21 23:11 rovernn

@rovernn Sure, create a pull request and I'll review it. Ideally the behaviour should match Cycles/Eevee (field of view etc.).

Theverat avatar Nov 03 '21 18:11 Theverat