Hello, I am rather new to PlayCanvas, and I have one little question. While uploading texture image to Editor - it’s all fine. Then, I create new Cube Map and try to attach uploaded texture to Cube Map, but Chrome Browser every time give me an error: “Uncaught SecurityError: Failed to execute ‘toDataURL’ on ‘HTMLCanvasElement’: Tainted canvases may not be exported”. It happens with any texture/image on Cube Map. And as the result, I can’t test my app. What can I do to solve this problem, except changing the browser to something like Firefox?
P.S. And, please, sorry for my English
Hi, could you please share the project url or link to file giving you a trouble?
OK. Draft of this project is public and it’s named “1911”, but it has not published yet. So, I have some good news - if I delete prefiltered data from Cube Map, the app is loading well. But now Cube Map placed on the scene is black, I don’t know why, it looks like reversed normals in Autodesk Maya or something like that. So, please, help me.
Update: http://playcanv.as/p/K01d0J80.
I noticed that, in Chrome’s JavaScript console, there are a number of errors when I run your project:
So I looked at your project in WebGL Inspector:
You’ve put the same 1200x765 image onto all six faces of a cube map. This is not the correct way to set up a cube map.
The user manual for cube maps is here:
http://developer.playcanvas.com/en/user-manual/assets/cubemaps/
What the manual page doesn’t seem to say is that each cube face must be power of 2 in dimension and square (32x32, 64x64, 128x128, 256x256, 512x512, etc)
There are a few samples cubemaps already in the PlayCanvas Asset Store. You could simply import one of those if you can’t find any online. Here are some that I found with Google:
Thanks, it was my fault. Last question: how can I attach whole skybox texture to PlayCanvas Cube Map? Or I need to divide it to six square textures and then import to project?
PlayCanvas can’t slice up cross format images into the 6 individual faces for you. You have to upload 6 separate images. Hopefully, the Editor will get the ability to import cross format too some time in the future.