Wallpaper Engine:壁纸引擎

Wallpaper Engine:壁纸引擎

Video texture playback controls
butcho 2023 年 3 月 4 日 上午 6:51
GPU video engine maxed out even if there are no videos playing
Hey,

I've noticed something when using your video control script. I'm not exactly sure if I already asked this for my Lands Unknown project some time back but because I cannot remember exactly if I did, I'll just ask again. ^^

In my actual project I use the script to control three 4k videos, set to play on a random timer, pause them after they played once and stay hidden until the next run. I noticed that at the start of the wallpaper my gpus video engine is maxed out to 99% for some seconds, even if there is none of the mentioned videos visible. This also happens after fullscreen pause / resume of the wallpaper. If I threw more videos into the wallpaper, the lag at the wallpaper start gets longer. Afterwards the wallpaper runs fine and the video engine never goes up to 99% again, even if all videos are playing together.

Is this something that can be fixed inside the script?

Might also be possible that this is a limitation of Wallpaper Engine. :lunar2020thinkingtiger:

Thanks for your help.
< >
正在显示第 1 - 7 条,共 7 条留言
Gariam  [开发者] 2023 年 3 月 4 日 上午 7:48 
No, you never asked this.

It happens only and every time you use this script?

I can't think of anything that might be causing this, so at first glance I would say it's an engine issue, but I'll try to recreate it and see.
butcho 2023 年 3 月 4 日 下午 3:36 
引用自 Gariam
No, you never asked this.
Ok, wasn't sure because I have the same trouble with my Lands Unknown wallpaper. If you start it, the first thing it does is lag like hell for something around 5-20 seconds.

It happens only and every time you use this script?
Yes, everytime. I apply the wallpaper, close the editor and for the first 10 to 20 seconds everything shown in the wallpaper lags and stutters even when no video is visible. If I disable one or two of the videos it stops and runs smooth again, looks like WPE does something with the videos when the wallpaper is applied or resumed after pausing it. Maybe they are played but not shown because I use your script? Don't know if this makes sense. ^^

Tomorrow I'm going to remove the video control script from all the videos and let them play all once. Just to see if the video engine load is the same and if it stutters. Just to have a comparison.
Gariam  [开发者] 2023 年 3 月 5 日 上午 1:40 
I got to run some tests, 2 4K and 1 FHD 20-30s long... I noticed that for a second the GPU usage is a bit higher.

Try changing "pause" with "stop" at line 200, I do get a difference but in my case the issue is too small to reliably tell.

Also, try playing with WE's video settings and see if something changes.
butcho 2023 年 3 月 5 日 上午 3:34 
Changing it to "stop" causes the video engine load to be permantely at 95-99% percent which makes the wallpaper lag constantly.

Now I removed the script from all the videos and the overall load when playing them all together at once is at something around 55-60%, running smooth and no lagging when the wallpaper is resumed.

Man, this is weird. Seems like WPE does something to the script or the other way round.

Would it be helpful if I send you my project files so you'll have the same starting situation as I do?

I also tested the wallpaper on my 1070 GTX and on a Nvidia Quadro RTX 5000 just to be sure that it's not my 2070 I use at home normally. Same outcome, even on the Quadro 5000, which is one hell of a GPU but lags the same as all the other cards I tried.
Gariam  [开发者] 2023 年 3 月 5 日 上午 3:57 
引用自 butcho
Changing it to "stop" causes the video engine load to be permantely at 95-99% percent which makes the wallpaper lag constantly.
That is just impossible... wtf is going on?
Does it do the same in a new project?

引用自 butcho
Would it be helpful if I send you my project files so you'll have the same starting situation as I do?
At this point yes, it would be easier to test.
butcho 2023 年 3 月 11 日 上午 4:44 
Hey,

first of all sorry for the delay. I was a bit busy with other stuff and did not find the time to pack the project and upload it to my cloud storage. I'll try to do this over the weekend.

But I noticed something interesting when using the video control script. I added another video that fills the whole screen. This video has a refraction effect applied to and after adding your control script the video is not visible from the start because I set a min, max value but the effect is visible the whole time.

Might this be related to the problem I was talking about? "Hide when paused" seems to not unload the video layer because the effect was still visible. Sorry if I might be totally wrong here with my lack of coding skills. Don't know if it is even possible to unload the video layer, and if so the control script would most likely be unloaded too and stops working. ^^
最后由 butcho 编辑于; 2023 年 3 月 11 日 上午 4:45
Gariam  [开发者] 2023 年 3 月 22 日 上午 2:31 
When a layer is unloaded only the graphics aspects are touched, scripts and timeline animations still run.
Currently the script only changes opacity, but I don't know if the engine unloads the layer if opacity is 0.
You can add this line between line 184 and 185 to disable visibility when opacity is 0, this way it unloads the layer.
thisLayer.visible = thisLayer.alpha != 0;
Then add it also between line 229 and 230 (if you do this before, the lines are 228 and 229), to make it do the same at the start, before it loads the layer.

Try with this and see if something changes
最后由 Gariam 编辑于; 2023 年 3 月 22 日 上午 2:33
< >
正在显示第 1 - 7 条,共 7 条留言
每页显示数: 1530 50