Jump to content

Loading .hdr texture locally -> 404 error


Numa
 Share

Recommended Posts

Hi guys, 

I'm trying to load an hdr map using this code:

var reflectionTexture1 = new BABYLON.HDRCubeTexture("Assets/room.hdr", scene, 512);

On my web server it works fine, in visual studio I get a 404 error:

babylon.2.4.max.js:4758 Uncaught Error: Error status: 404 - Unable to load Assets/room.hdr

 

the file is there in the right folder and I load other regular textures from that same folder just fine. Is there something Ii need to setup to get it to work locally (visual studio with IIS)?

Thanks :)

Link to comment
Share on other sites

Hello,

Please add the Mime type for HDR on the IIS configuration, cause otherwise IIS won t understand it as a served file:

<configuration>
  <system.web>
    <compilation debug="true" targetFramework="4.5" />
    <httpRuntime targetFramework="4.5" />
  </system.web>
  <system.webServer>
    <staticContent>
      <mimeMap fileExtension=".dds" mimeType="application/dds" />
      <mimeMap fileExtension=".tga" mimeType="application/tga" />
      <mimeMap fileExtension=".fx" mimeType="application/fx" />
      <mimeMap fileExtension=".babylon" mimeType="application/babylon" />
	<mimeMap fileExtension=".hdr" mimeType="application/octet-stream" />
      <mimeMap fileExtension=".babylonmeshdata" mimeType="application/babylonmeshdata" />
      <mimeMap fileExtension=".cache" mimeType="text/cache-manifest" />
      <!--<mimeMap fileExtension=".mp4" mimeType="video/mp4" />-->
    </staticContent>

Hope that helps

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...