Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Deadwing888 opened this issue Oct 26, 2021 · 4 comments

Comments

@Deadwing888
Copy link

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.

@Theverat
Copy link
Member

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

@Deadwing888
Copy link
Author

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.

@rovernn
Copy link

rovernn commented Nov 1, 2021

@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?

@Theverat
Copy link
Member

Theverat commented Nov 3, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants