Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by timehunter · Mar 06, 2021 at 08:45 AM · texturevideovideotexture

How to show portions of a video in many different target textures

I've an MP4 video and to play it, I've created a RawImage with a texture and assigned the same texture to the VideoPlayer's target texture. So far so good and my video plays as expected.

The next challenge is to split the video into a 3x3 grid and show different portions of the video in each element of the grid. I guess I need to create 9 RawImage objects with the same texture I mentioned above and set the portion of the video to render... Am I right? How do I redirect the VideoPlayer output to those RawImage objects efficiently?

Many thanks.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
1
Best Answer

Answer by Namey5 · Mar 06, 2021 at 10:00 AM

Seeing as this is using the UGUI system, you should be able to just use the one texture in combination with an image mask to only show particular sections in each instance;

https://docs.unity3d.com/Packages/com.unity.ugui@1.0/manual/script-Mask.html


Imagine we have a raw image with dimensions of 300x300.

alt text
If we add it as a child of a mask with dimensions of 100x100, we get just a single tile that can be moved around freely.

alt text alt text
If we were to then reposition the child (raw image) within the mask, we can get the mask to cover different areas.

alt text alt text
Make 9 copies and put them all together and you get a complete image made up of entirely separate tiles.

alt text alt text

Comment
Add comment · Show 5 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image timehunter · Mar 06, 2021 at 11:28 AM 0
Share

Thank you very much, but I understand right, the video behind the mask objects is still visible. Instead, only the video portions in the 3x3 grid should be visible. Furthermore, one of the 9 grid elements shall be free to let the user move the tiles horizontally or vertically. Perhaps I'm missing something.

avatar image Namey5 timehunter · Mar 06, 2021 at 12:19 PM 0
Share

I'm not entirely sure what you mean - if the display is a child of the mask then the portions of the video outside the mask will not be visible. If you could provide an image/mock-up of what you are trying to achieve it would probably help a lot more.

avatar image timehunter Namey5 · Mar 09, 2021 at 08:25 AM 0
Share

Here is a screenshot of what I'm trying to do. You can see a video running in the middle of the mobile device... and I'm trying to split it in 9 square tiles (3x3 matrix) and scramble them in random order while keeping the video playing. That's it :-)

screenshot-2021-03-09-at-091802.png (105.4 kB)
Show more comments
avatar image timehunter · Mar 10, 2021 at 07:27 AM 0
Share

Thank u very much for your great support, as a newbie I really appreciate it :-)

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

146 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Unity 1080p Video player 1 Answer

Changing from static texture to video texture & play video? 0 Answers

Video texture problem? 2 Answers

Play, seek a video 1 Answer

Spritesheet vs Video 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges