Game Development Community

Environment Map

by luggage · in Torque X 2D · 06/16/2008 (12:58 pm) · 1 replies

Hello

I'm trying to get an environment map working but I'm having trouble. I'm using a DTS which when loaded into the show tool comes out lovely and shiny when the environment map is set. When I bring it into my game as StaticGeometry it's not shiny. I can't see how I specify the environment map name. I've tried adding a CubeMapMaterical with...
<CubemapMaterial type="GarageGames.Torque.Materials.CubemapMaterial" name="CubemapMaterial">
     <IsDynamic>false</IsDynamic>
     <CubemapSize>128</CubemapSize>
     <Priority>1</Priority>
     <CubeFaceFilenames>
          <string>data/skies/clear/back</string>
          <string>data/skies/clear/left</string>
          <string>data/skies/clear/front</string>
          <string>data/skies/clear/right</string>
          <string>data/skies/clear/top</string>
          <string>data/skies/clear/bottom</string>
     </CubeFaceFilenames>
</CubemapMaterial>

But that just crashes as it's failed to fill in _cubeFaceFilenames - so I don't even know if that will sort it.

Any ideas? And any ideas when we'll get some more documentation or at least a set of "How To..." documents.

#1
06/16/2008 (2:55 pm)
By hardcoding some filenames for now it's not crashing but I still see no environment map on the object. It will also crash on load if any of the textures you use are a different size to the others.

To sum up, any ideas on how to get an environment map working? It looks ok in Show Tool when I assign a texture to the environment settings.

Any ideas?