Atlas Terrain can't be found
by Josef Froschauer · in Technical Issues · 04/17/2009 (3:05 am) · 8 replies
Hi,
I tried to integrate an Atlas Terrain into my Torque world. This is the code block from my mission file:
new AtlasInstance(NewTerrain) {
position = "-151.417 7.48933 80";
rotation = "1 0 0 0";
scale = "1 1 1";
detailTex = "scriptsAndAssets/data/terrains/details/detail1";
atlasFile = "scriptsAndAssets/data/terrains/blah.atlas";
};
The file blah.atlas resides in the terrains folder. I tried the atlas file in the ATLAS demo world and it works perfectly. But for some reason, the engine doesn't find the file in my own project. Why?
(Of corse, I uncommented the //includeModule( 'atlas' ); section in the config file.)
The console says the following:
ResourceObject::construct: NULL resource create function for 'blah.atlas'.
AtlasFile::load - cannot open atlas file 'scriptsAndAssets/data/terrains/blah.atlas'.
AtlasInstance::onAdd - cannot open atlas file.
scriptsAndAssets/data/missions/itchyfeet_final.mis (0): Register object failed for object NewTerrain of class AtlasInstance.
Can anybody help?
I tried to integrate an Atlas Terrain into my Torque world. This is the code block from my mission file:
new AtlasInstance(NewTerrain) {
position = "-151.417 7.48933 80";
rotation = "1 0 0 0";
scale = "1 1 1";
detailTex = "scriptsAndAssets/data/terrains/details/detail1";
atlasFile = "scriptsAndAssets/data/terrains/blah.atlas";
};
The file blah.atlas resides in the terrains folder. I tried the atlas file in the ATLAS demo world and it works perfectly. But for some reason, the engine doesn't find the file in my own project. Why?
(Of corse, I uncommented the //includeModule( 'atlas' ); section in the config file.)
The console says the following:
ResourceObject::construct: NULL resource create function for 'blah.atlas'.
AtlasFile::load - cannot open atlas file 'scriptsAndAssets/data/terrains/blah.atlas'.
AtlasInstance::onAdd - cannot open atlas file.
scriptsAndAssets/data/missions/itchyfeet_final.mis (0): Register object failed for object NewTerrain of class AtlasInstance.
Can anybody help?
#2
04/20/2009 (1:12 am)
yes, it is defined... where else could be the problem?
#3
Like this
04/20/2009 (2:07 pm)
Try removing scriptsAndAssets and replace it with ~Like this
new AtlasInstance(NewTerrain) {
position = "-151.417 7.48933 80";
rotation = "1 0 0 0";
scale = "1 1 1";
detailTex = "~/data/terrains/details/detail1";
atlasFile = "~/data/terrains/arcticBlended.atlas";
};
#4
04/21/2009 (12:47 am)
I also tried this before, but still the same error message... this is so strange. Why doesn't he find the terrain. I tried it with the arcticBlended.atlas terrain from the demo level and with a atlas terrain, I created by my own. Both didn't work...
#5
04/21/2009 (5:53 am)
@Bill Vee: just to play it safe... what exactly do you mean by the "projects preprocessor list"?
#6
TORQUE_SHADERGEN
TORQUE_PLAYER
BAN_OPCODE_AUTOLINK
ICE_NO_DLL
TORQUE_OPCODE
LTC_NO_PROTOTYPES
TORQUE_ATLAS
TORQUE_OGGVORBIS
UNICODE
INITGUID
_CRT_SECURE_NO_DEPRECATE
NOWINBASEINTERLOCK
04/21/2009 (6:18 am)
In the Visual Studio project under project properties/ConfigProperties/C++/preprocessors you should see field labeled Preprocessor Defines a list like this should appear.TORQUE_SHADERGEN
TORQUE_PLAYER
BAN_OPCODE_AUTOLINK
ICE_NO_DLL
TORQUE_OPCODE
LTC_NO_PROTOTYPES
TORQUE_ATLAS
TORQUE_OGGVORBIS
UNICODE
INITGUID
_CRT_SECURE_NO_DEPRECATE
NOWINBASEINTERLOCK
#7
one last question: does MAC already support ATLAS terrains?
04/21/2009 (7:21 am)
thx, it works now. we had ATLAS_TORQUE instead of TORQUE_ATLAS in the list :-)one last question: does MAC already support ATLAS terrains?
#8
There is a comment in the code about how atlas causes a hardlock on macs so it is disabled on macs.
04/21/2009 (7:23 am)
No.There is a comment in the code about how atlas causes a hardlock on macs so it is disabled on macs.
Torque Owner Bill Vee
DayOfWar Studios