Play Media Texture only when visible
I'm curious if there's a method that could be used to set the rate of a media texture to 1 when the texture is visible in the viewport (and ideally, where the player is within a certain distance from the material). At all other times, the play rate would be 0 so it's still visible but paused.
I'm working on a project with several ingame screens, each of which is playing a media asset, however, having all of these play at the same is incredibly resource intensive so I'm hoping that I can adapt it so only those that are visible (and close enough) play.
I'm currently using trigger volumes to play the media when inside the box, but this is a messy approach and isn't working too well.
As a side note, when I enter the current trigger volume, the rate increases from 0 to 1 as per the blueprint, but ingame the screen vanishes for about 1 second before starting to play. Is this memory-related? Is there a way to stop this unwanted effect?
asked Oct 15 '15 at 11:21 AM in Rendering
There is no such mechanism right now, and I don't know if there will be anytime soon. I think we do have a way to determine whether an actor was rendered in the last frame, but I don't remember the API. That might be something you could hook into. In general, you are responsible for starting and pausing the videos, and yes, playing all videos at all time is not going to work for most people.
As for the screen vanishing, I would need some example project to repro the problem.
answered Oct 15 '15 at 01:53 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here