RenderHeads / UnityPlugin-AVProVideo

AVPro Video is a multi-platform Unity plugin for advanced video playback
https://www.renderheads.com/products/avpro-video/
226 stars 28 forks source link

Missing UpdateStereoMaterial script in 2.0 #552

Closed frangagn closed 3 years ago

frangagn commented 3 years ago

Describe the bug I'm trying to play a VR video using 2.0. I've created my sphere using the InsideSphere shader, added the ApplyToMesh script, assigned the video player and the sphere's mesh to the Assign to Mesh. Video is played side by side within the sphere. In version 1.x you used to have an "updatestereomaterial" script that was necessary to see 3DSBS videos properly. It is not present in this version. Also there is no demo scene or any other documentation about setup for this type of video. Maybe things have changed and the method have changed, but not documented and we can't follow

Your Setup (please complete the following information):

To Reproduce On a project setup with Unity XR:

  1. Create an empty gameobject, add AVPRO component and add a VR180 SBS video
  2. Create a Material and RenderTexture with InsideSphere shader
  3. Create a sphere, reset size to 200x200, assign the Material, ensure shader is InsideSphere, add ApplyToMesh component to the sphere, assign sphere's mesh renderer and AVPRO component to the ApplyToMesh script.
  4. Play the video. It is not playing in stereo, you see the side by side video
AndrewRH commented 3 years ago

Hi,

Yes in version 2 the UpdateStereoMaterial script is no longer needed - we have improved stereo support so that it should just work if your video has stereo metadata embedded.

Yes we will be adding a demo scene for 360 spherical playback soon and also improving the documentation and other demo scenes.

Thanks for the feedback - we're working on it, but the above should work for you for now.

frangagn commented 3 years ago

Well, it does not work.... I described my steps above, and I still see the video as two videos side by side. Could you please describe the exact steps required to play a side by side video in stereo? Then I will know if I'm screwing up or if the software has a bug...

Thanks

AndrewRH commented 3 years ago

Well, it does not work.... I described my steps above, and I still see the video as two videos side by side. Could you please describe the exact steps required to play a side by side video in stereo? Then I will know if I'm screwing up or if the software has a bug...

Thanks

Your steps seem correct - are you sure the video contains stereo metadata?

The next update will have methods to override the stereo packing for videos that don't contain this metadata.

Here is a test video you can use that does contain stereo metadata: https://rh-testmedia.s3-eu-west-1.amazonaws.com/StereoVideo/Stereo01-1080p-RedBlue.mp4

Then rendered normally it will have red on the left, and blue on the right - but when rendered in stereo you will see only red or blue depending on the eye.

Thanks,

frangagn commented 3 years ago

I tried it with many videos that work fine with AVPROVIDEO 1.11 that I own, and it does not work with the RC1 version.

frangagn commented 3 years ago

I replied to you on the thread.

This video also does not work. I tried it also with many videos that do work with version 1.11 in stereo without a problem, and they don,t work with 2.0RC1. I see both sides of the video in each screen.

On Sat, Dec 19, 2020 at 7:05 PM Andrew notifications@github.com wrote:

Well, it does not work.... I described my steps above, and I still see the video as two videos side by side. Could you please describe the exact steps required to play a side by side video in stereo? Then I will know if I'm screwing up or if the software has a bug...

Thanks

Your steps seem correct - are you sure the video contains stereo metadata?

The next update will have methods to override the stereo packing for videos that don't contain this metadata.

Here is a test video you can use that does contain stereo metadata:

https://rh-testmedia.s3-eu-west-1.amazonaws.com/StereoVideo/Stereo01-1080p-RedBlue.mp4

Then rendered normally it will have red on the left, and blue on the right

  • but when rendered in stereo you will see only red or blue depending on the eye.

Thanks,

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/RenderHeads/UnityPlugin-AVProVideo/issues/552#issuecomment-748542363, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKG6A5ZYE2C3RXXWR3OXJS3SVU5ULANCNFSM4VAO4IIQ .

AndrewRH commented 3 years ago

We will be releasing RC2 in the next day or two and I hope this solves the issue for you.

frangagn commented 3 years ago

I look forward to it.

Will there be any documentation with it?

On Tue, Jan 5, 2021 at 7:42 AM Andrew notifications@github.com wrote:

We will be releasing RC2 in the next day or two and I hope this solves the issue for you.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/RenderHeads/UnityPlugin-AVProVideo/issues/552#issuecomment-754611660, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKG6A5ZECVCQSZT34WTLH43SYMCJ7ANCNFSM4VAO4IIQ .

AndrewRH commented 3 years ago

Hi @frangagn RC2 is now available for download: https://github.com/RenderHeads/UnityPlugin-AVProVideo/releases/tag/2.0.0rc2

It includes a new demo scene for playing back stereo 360 videos on a sphere.

Documentation is still WIP but can be found here: https://www.renderheads.com/content/docs/AVProVideo/articles/intro.html

Stereo should be auto-detected and handled, but it can also be specified manually as an override in case the video doesn't contain any stereo metadata, or it can't be detected for some reason. Manually specifying can be done by setting the fallback behaviour for media loading: image

Or if you use the new MediaReference to specify media, you can set it there: image

Let us know if this new version works better.

Thanks,

AndrewRH commented 3 years ago

I will close this issue as the latest version (2.0.2) now has an UpdateMultiPassStereo component and the shader has been updated to fix stereo support