Why is "Download image" speed varying?
I was experimenting with the "Download image" node and found some strange behaviour.
Let me explain what I'm trying to achieve and how I set this up: The goal is to make an VR application for the Samsung Gear in which the user can look around in a 360 degree image. A second user (without a gear) sitting at a computer is able to swap the image the first user sees in his gear.
How did I try to do this? As I needed to be able to swap the image shown in the gear by using an external device, I decided to use the "Download image" node. I created a Dynamic Texture and linked the texture parameter to an URL which is called by the Download Image node. This way, the application looks for the URL, gets the image I linked to the URL from the server and uses this as a texture for a sphere so the user can look around. As the picture only refreshes when the game is initialised, I was not able to swap the picture during runtime. So I created a Delay-setup to make the application recheck the server every few seconds. As I'm working with 4k images, this really slowed down the performance. So I looked for another solution. I created a small 1x1 pixel image (reload.png) and put it on the server, too. Then I told the application to look for the reload.png every two seconds. If this reload png is found, reload the big image (test.jpg). This way the application is only downloading a small image instead a 4k jpg. So my workflow to swap the images in the gear is to go to a PC, go to the server I put the images on, rename reload.png to something else (for example reload0.png). This way the image is not found and the application does not try to download the 4k image (which would slow down the app). Than I replace the test.jpg with an another image (of course also called test.jpg). Then I rename the reload0.png back to reload.png, so the big 4k image gets reloaded and updated in the gear.
The bad thing about this is that there are still performance issues. When I look around in the gear, a lot of sections are black and get loaded just after I looked at them for a second. As the UE manual sais that the samsung s6 can only handle 2k images, I would say it's because the resolution of my 4k texture is too damn high. But what is strange is that the initial loaded texture (which of course also is 4k) works just fine. So maybe someone can tell me why it works at first, but gets performance problems as I reload it? Below there is a screenshot of my node setup, so I hope that makes it clear.
Thanks a lot (and sorry for the long post).
Follow this question
Once you sign in you will be able to subscribe for any updates here