Weird Texture Colours When Using Download Image

I have encountered a weird Texture Anomaly when using “Downlod Image” in an HTML 5 project.

The image below show the issue, starting from left to right here are the various results:

  1. Poster 1 shows the default image that is being downloaded.
  2. Poster 2 shows a new image downloaded as a JPG
  3. Poster 3 shows a new imaged downloaded as a PNG
  4. Poster 4 shows a failed download and using the default image included in the project.

http://gobbo.games/uploads/Capture_PlayHTML.PNG

The image below shows the HTML Launcher is serving the images and they are correctly referenced:

http://gobbo.games/uploads/Capture_HTMLLauncher.PNG

The weird thing is that the Play In Editor version and the Standalone version both work correctly as can be seen below:

http://gobbo.games/uploads/Capture_PlayInEditor.PNG

http://gobbo.games/uploads/Capture_PlayStandalone.PNG

You can download the project from http://gobbo.games/uploads/Test.zip or you can follow these steps to recreate the project:

  1. Launch Unreal Editor and Select a Blank Project (I used 4.13.2)
  2. Select Mobile/Tablet and Scalable 3D or 2D with No Starter Content
  3. Add the blueprint is indicated below and add the object to the map.
  4. Apply the material is indicated below and then run the project.

http://gobbo.games/uploads/Capture_Blueprint.PNG

http://gobbo.games/uploads/Capture_Material.PNG

Is this a BUG? Or am I missing something specific to HTML 5 Development? Any help will be greatly appreciated.

Hi qdelpeche,

I took a look at your project and this is what I see:

Is there something I am missing? I opened the project and tested in both PIE and packaged to HTML5, but do not see any specific errors regarding color on my end.

Hi Adam,

Your project is not running correctly … it is using the built in versions of the image … the two center images need to appear as they appear in my top screenshot.

Try using these files and place them in a static folder inside the HTML build folder (i.e. where you packaged the HTML version to).

http://gobbo.games/uploads/poster.jpg

http://gobbo.games/uploads/poster.png

http://gobbo.games/uploads/poster_default.jpg

Okay … so as an experiment, I swapped the Red and Blue channels in the image and then used that image. It now displays correctly in the HTML build and obviously incorrect in the Editor and Standalone build.

So something during packaging is switching the two channels around of the material.

Is there a way I can swap the channels around inside the Material instead of having to edit the raw image file?

In this case, it would be best just to fix it in photoshop. you can technically use the append node to swap the red and blue channels like this:

114087-switchchannels.png

This will turn the blue into the red channel, the green will remain the same, and the red becomes the blue channel.

I can’t fix it in Photoshop … the images in the live system are generated by a screen grabber. I have to fix the material and take in to account if it is an HTML build.

I assume this is a bug that will now get logged and attended to.

I do not know that this is a bug. Do you have all of the images as power of 2 images? Where are you housing the images?

Power of Two makes no difference.

The images are hosted on either an Apache server or the same HTML Launcher as provided.

It is just weird. I have shown that the HTML Packaging forces a change in the way the Material is handled and this is not considered a bug.

Okay then … guess my definition is different to yours … but you guys are the boss.

Hi qdelpeche,

I believe we are having a misunderstanding, I apologize for the miscommunication. While I do not believe this is a bug, I was able to reproduce what you are seeing. As such, I am entering a bug report here, to be assessed by the development staff.

qdelpeche, thank you very much for the super simple test project. and i apologize that it took this long to finally hit this.

the solution is checked in for 4.21 – in the meantime, you can see the fix at: