Hi Neon, I'm not sure of the best way, but I would use Sprites.
When you load a video, the Player you assign it to will have a texture attribute. (Have a look at examples/video.py to see what I mean). In that example, the texture is simply blitted to the screen. Instead, you can take the texture and update your Sprite's image attribute with it. Once you get a working example going with Sprites, you could then recreate it with plain textures and some custom Groups, if you want something more generic. The Sprite class has a bit of overhead, but it's probably negligable for two items. -Ben On Monday, May 14, 2018 at 7:23:46 AM UTC+9, Neon22 wrote: > > I am running 1.4 using the examples in 1.3.2 > > I want to achieve the effect of a parallax effect using two short video > sequences. One is BG which can be panned in XY a small amount. Second is FG > Video sequence (with a third as a grayscale mask). > These sequences are not long. I am initially looking at using Sprite() > with subpixel enabled for the FG. > > I am unsure of best way to pan a BG video sequence (apply to 3d surface > and translate it, or offset media somehow, or ??) > > I am unsure how to get the video frame for the FG from the media stream > and apply it to the Sprite. Or if better way to do it. > The FG sequence is really two video sequences. One is an alpha mask for > the second. So both have to be in Sync. > Alas too big to fully load into videoram like its a gif or somesuch. (1440 > or bigger) > > Any tips greatly appreciated. In a prior version I almost had Pygame and > Pyglet using same memory but failed. Now hoping 1.3+ will enable this idea. > > -- You received this message because you are subscribed to the Google Groups "pyglet-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/pyglet-users. For more options, visit https://groups.google.com/d/optout.
