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

[KKS-Screencap 3DVR] - How do I get the front of the frame to follow the angle of the camera instead of being horizontal all the time? #185

Open
WelchYang opened this issue Oct 27, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@WelchYang
Copy link

WelchYang commented Oct 27, 2023

How can I get the 3DVRscreenshot front of the frame to follow the angle of the camera instead of being horizontal all the time?
I am creating a VR MMD video with VideoExport. I hope to make the view follow the camera movement.

I have not learned C# programming before,Can I hire you to modify this plugin, including changing the horizon to follow the angle of the camera and rendering VR in 180 degrees?I will pay you 15 dollars to 35 dollars via PayPal.We also can discuss the price.

I found a modification method from zodgame that changes VR to 180°.
Change the output of method capture from Texture2D to RenderTexture.
Core.ScreenshotManager.cs
入れ替わりStitchImages
private static Texture2D CombineTexture180VR(RenderTexture left, RenderTexture right)
{
var result = new Texture2D(left.width, left.height, TextureFormat.ARGB32, false);
RenderTexture temp = RenderTexture.active;
RenderTexture.active = left;
result.ReadPixels(new Rect(left.width / 4, 0, left.width / 2, left.height), 0, 0);
RenderTexture.active = right;
result.ReadPixels(new Rect(left.width / 4, 0, left.width / 2, left.height), left.width / 2, 0);
RenderTexture.active = temp;
RenderTexture.ReleaseTemporary(left);
RenderTexture.ReleaseTemporary(right);
return result;
}

@WelchYang WelchYang added the enhancement New feature or request label Oct 27, 2023
@ManlyMarco
Copy link
Collaborator

Given how the panoramic image is generated with https://docs.unity3d.com/ScriptReference/Camera.RenderToCubemap.html I believe it's not possible to angle the camera outside of the Y rotation that is already applied.

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

No branches or pull requests

2 participants