Embedding paths in the atlas files?
by David Dougher · in Torque Game Engine Advanced · 09/11/2006 (9:05 pm) · 3 replies
I had a rather odd problem and thought I would share.
I made a copy of the terrain_water_demo so I could run some tests and still keep the orginal files intact for reference. I named the new subdirectory "game". Original no?
Imagine my surprise when I discovered that after doing a couple of minor changes to main.cs to load my new version that it came up and all the terrain was completely black! Water, sky, and a character I put on the terrain were correctly visible. But the terrain was black.
So, it looks like the terrain engine is embedding the full path of either the textures used or the lighting info into the final atlas file.
Furthermore, when I went to use the Editor it halted with an error complaining about missing textures. Looks like the editor is aware of the paths in the atlas terrain file and objects if it can't find the requisite files.
Which makes it pretty hard to generate a new terrain from anyplace other than the original terrain_water_demo subdirectory.
Perhaps there is a global that I am unaware of that sets the paths that are causing my game not to work, but I did a search with torsion and didn't find any references to "terrain_water_demo", except in the location where the original atlas file can be compiled (the if(0) routine in main.cs).
Anybody know anything about this?
I made a copy of the terrain_water_demo so I could run some tests and still keep the orginal files intact for reference. I named the new subdirectory "game". Original no?
Imagine my surprise when I discovered that after doing a couple of minor changes to main.cs to load my new version that it came up and all the terrain was completely black! Water, sky, and a character I put on the terrain were correctly visible. But the terrain was black.
So, it looks like the terrain engine is embedding the full path of either the textures used or the lighting info into the final atlas file.
Furthermore, when I went to use the Editor it halted with an error complaining about missing textures. Looks like the editor is aware of the paths in the atlas terrain file and objects if it can't find the requisite files.
Which makes it pretty hard to generate a new terrain from anyplace other than the original terrain_water_demo subdirectory.
Perhaps there is a global that I am unaware of that sets the paths that are causing my game not to work, but I did a search with torsion and didn't find any references to "terrain_water_demo", except in the location where the original atlas file can be compiled (the if(0) routine in main.cs).
Anybody know anything about this?
About the author
Owner - Pariah Games, Adjunct Professor - Bristol Community College, Mentor - Game Design - Met School Newport, Mentor - Game Design - Met School Providence
#2
I am considering simple script global(s) that would be read when the system starts that would contain the paths. The actual texture names would still be embedded in the file. Then when the engine runs it would read the path variable plus the texture name to know what it's looking for.
Sound feasible to everyone?
09/12/2006 (5:06 am)
Thanks for the confirmation Tom. I already have someone from my team working on a rewrite of the pop-up panel to compile Atlas terrain. Since he is already familiar with the scripts and relevant pieces of code I'll ask him to extend his work to cover a fix for this as well. We were going to post anyway so we'll post a fix and a resource update.I am considering simple script global(s) that would be read when the system starts that would contain the paths. The actual texture names would still be embedded in the file. Then when the engine runs it would read the path variable plus the texture name to know what it's looking for.
Sound feasible to everyone?
#3
Ideally I'd like to specify a relative path or something similar but it's not clear what the best fix is... Maybe just doing a path relative to the .atlas file?
09/14/2006 (12:05 pm)
That sounds like a good workaround. Ideally I'd like to specify a relative path or something similar but it's not clear what the best fix is... Maybe just doing a path relative to the .atlas file?
Associate Tom Spilman
Sickhead Games
Ben said there was some sticky issue with it, but i don't remember off the top of my head what it was. If we want to see this fixed soon someone is probably gonna have to step up and post a patch.