Scatterer icon indicating copy to clipboard operation
Scatterer copied to clipboard

[Feature Request] Be able to hook/render Sunflare on different cameras

Open jrodrigv opened this issue 2 years ago • 9 comments

Hi. I have a KSP mods which allows to render different cameras at the same time https://youtu.be/Y_JzKbNrnvw?t=306

The problem that I have is that I don't have a way to render all the Scatterer beautiful things in the new cameras. I was wondering if it would be possible for Scatteter to provide an API to inject more cameras apart from the main one. Like an array of NearCameras and ScaledSpace cameras, and camera transforms to apply all the effects etc to those cameras as well?

Thanks in advance

jrodrigv avatar Jul 31 '22 11:07 jrodrigv

I will fix it so that it works automatically in the next version.

LGhassen avatar Aug 10 '22 13:08 LGhassen

Awesome Thanks!

jrodrigv avatar Aug 10 '22 15:08 jrodrigv

Just a quick question, how far apart do you expect the different camera views to be? Can one camera be in orbit and the other on the launchpad? Or are they usually very close together like in the video?

LGhassen avatar Aug 14 '22 09:08 LGhassen

So I'd say that 500 km distance could be a reasonable limit (at > 500 km from the floating origin the shaking is too bad)

jrodrigv avatar Aug 14 '22 13:08 jrodrigv

I haven't tried this yet but I think maybe switching the sunflare code to use Camera.current instead of the ScaledSpace camera might work? Just guessing really.

JonnyOThan avatar Sep 11 '22 14:09 JonnyOThan

@JonnyOThan there is that, then the hooks have to be generalized to other cameras, extinction calculation should be moved from skynode to sunflare class and done before every camera renders, then make sure to avoid rendering twice when in opengl (2 local cameras)

LGhassen avatar Sep 11 '22 15:09 LGhassen

Hi @LGhassen Do you have any updates regarding this topic?

jrodrigv avatar Feb 11 '23 13:02 jrodrigv

Not yet, sorry

LGhassen avatar Feb 11 '23 14:02 LGhassen

no problem! just wondering ;)

jrodrigv avatar Feb 11 '23 17:02 jrodrigv