Rolento Posted October 5, 2016 Share Posted October 5, 2016 Hi All I am experimenting with heightmaps and have encountered a strange glitch (but more likely a noob mistake!). Basically when I use certain image files (supported file formats) for the heightmap and/or texture I discover that the heightmap does not work. See below: Test 1: Here I am referencing two files from WikiMedia for the heightmap and texture (SUCCESS) http://playground.babylonjs.com/#KYAC1#0 (see lines: 19 and 21) Test 2: Here I am referencing a different texture file but the same heightmap as above (FAILURE) http://playground.babylonjs.com/#KYAC1#2 I thought the problem might be a permissions / security issue - therefore I did two additional experiments; (a) copied all JS and image files locally and reran the test (failed), and (b) copies the image files on to my own web server and tried to reference them from that location (failed). Therefore, its possibly an issue with the file format or image format? So I am left wondering why the texture file in the above example wont work - if anyone can shed some light on this matter I would appreciate - Thanks... Quote Link to comment Share on other sites More sharing options...
adam Posted October 5, 2016 Share Posted October 5, 2016 http://playground.babylonjs.com/#KYAC1#3 Looks like it was a CORS issue. Quote Link to comment Share on other sites More sharing options...
Rolento Posted October 6, 2016 Author Share Posted October 6, 2016 Hi Adam So it appears that (in my case) our Apache webserver is blocking external sites from accessing resources (e.g. image files). I will investigate to find out how to disable that. I guess what really confused me was when I copied all image and source JS files on to my local computer - and then proceeded to run the code, but I still found that the files would not be referenced. So it appears there is some other security issue occurring when running locally... Thanks for your help. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.