TGEA 1.8 Beta: Terrain texture paths saving incorrectly
by Jesse (Midhir) Liles · in Torque Game Engine Advanced · 12/05/2008 (10:49 pm) · 29 replies
I'm having an issue with the mission editor's saving of terrain texture pathnames.
I started up the New Mission Template mission in the Stronghold game example.
I opened up the mission editor using F11.
I changed the mission name in the inspector and used Save Mission As... to give it a new filename.
I quit TGEA, reloaded it, and opened up my new mission.
All of the terrain textures loaded black, and the console log gives errors of the following sort for each
texture that has been saved into the .ter file:
ClipMapBlenderCache::registerSourceImage - couldn't locate texture 'D/Dev/Torque/scriptsAndAssets/data/terrains/Test/dirt_grass' for blending.
I am not able to hand-edit the .ter file to see if the problem is with the saving or the loading of the pathnames. As all of the pre-existing missions in the Stronghold demo work I'm assuming this is an error
with the way the terrain editor is saving path information.
I started up the New Mission Template mission in the Stronghold game example.
I opened up the mission editor using F11.
I changed the mission name in the inspector and used Save Mission As... to give it a new filename.
I quit TGEA, reloaded it, and opened up my new mission.
All of the terrain textures loaded black, and the console log gives errors of the following sort for each
texture that has been saved into the .ter file:
ClipMapBlenderCache::registerSourceImage - couldn't locate texture 'D/Dev/Torque/scriptsAndAssets/data/terrains/Test/dirt_grass' for blending.
I am not able to hand-edit the .ter file to see if the problem is with the saving or the loading of the pathnames. As all of the pre-existing missions in the Stronghold demo work I'm assuming this is an error
with the way the terrain editor is saving path information.
#22
In the past i would use the Terrain Editor Settings Smooth Factor to set the terrain paint blend amount, and the Soft Select settings to customize the brush 'pressure'. But this might have been a feature i hot wired long ago. As it is NOW the Soft Select settings dont seem to change anything.
01/27/2009 (6:58 am)
Cool, that will be great. In the past i would use the Terrain Editor Settings Smooth Factor to set the terrain paint blend amount, and the Soft Select settings to customize the brush 'pressure'. But this might have been a feature i hot wired long ago. As it is NOW the Soft Select settings dont seem to change anything.
#23
01/27/2009 (7:56 am)
This is still broken, cannot select different textures in the 6 slots and it still blacks out.
#24
@Chris
Hmm, odd. Works for me.
Can you give a rundown of the exact steps to reproduce the problem? That would be helpful. Also, which system are you running this on (Mac/Win)?
01/27/2009 (8:06 am)
@Chris
Hmm, odd. Works for me.
Can you give a rundown of the exact steps to reproduce the problem? That would be helpful. Also, which system are you running this on (Mac/Win)?
#25
I'm simply resaving my mission, and the paths get "cat" onto eachother. After three saves, three paths are contained where only one should exist. Going to try the "hack" William posted.
01/27/2009 (8:08 am)
It didn't work for me either (like I posted previously) so I don't find it very odd.I'm simply resaving my mission, and the paths get "cat" onto eachother. After three saves, three paths are contained where only one should exist. Going to try the "hack" William posted.
#26
That test case results in the textures not changing, seems to be a new issue.
As far as the blackness I'm not the one who was editing the map but I did see it all go black after the patch happened.
It looks like there might have been a missed \n in the .ed.cs script too.
01/27/2009 (8:11 am)
Win, open SH recompiled with patch and new script, press F11, select File/Open Mission, Select my mission, attempt to drop texture into any of the slots except the first.That test case results in the textures not changing, seems to be a new issue.
As far as the blackness I'm not the one who was editing the map but I did see it all go black after the patch happened.
It looks like there might have been a missed \n in the .ed.cs script too.
#27
Yes, noted your post.
@Chris
Thanks for the info.
As far as the texture not being changed on the terrain, that's because the clipmap isn't getting updated. I fixed that in 1.8.1.
01/27/2009 (8:16 am)
@StefanYes, noted your post.
@Chris
Thanks for the info.
As far as the texture not being changed on the terrain, that's because the clipmap isn't getting updated. I fixed that in 1.8.1.
#28
01/27/2009 (8:28 am)
One more thing, Terrain Texture Editor placement Operations dont works quite right. Might be related to the non alpha blending of terrain paint.
#29
The following fixed it:
In tools/missionEditor/scripts/editors/terrainEditor.ed.cs ETerrainEditor::changeMaterial(%this, %matIndex)
after:
add
Edit: I just looked into 1.82 terrainEditor.ed.cs, there is the same line, so this post is obsolete i guess ;)
01/24/2010 (8:26 am)
I still had the problem in stock 1.81, because ETerrainEditor::changeMaterial used the absolute path from OpenFileDialog instead of a relative path.The following fixed it:
In tools/missionEditor/scripts/editors/terrainEditor.ed.cs ETerrainEditor::changeMaterial(%this, %matIndex)
after:
if(%ret)
{
$Pref::TerrainEditor::LastPath = filePath( %dlg.FileName );
%file = %dlg.FileName;
}
%dlg.delete();
if(! %ret)
return;add
%file = makeRelativePath(%file,getMainDotCsDir());
Edit: I just looked into 1.82 terrainEditor.ed.cs, there is the same line, so this post is obsolete i guess ;)
Associate Rene Damm
@Caylo
I've checked back against TGE 1.5.2 and can't see any difference in how the editors handle terrain painting.
However, all the painting actions indeed always operate at full strength which of course isn't quite so good. I've added a brush strength slider to 1.8.1's editor that scales the brush strength of various terrain actions (material and height paint actions at the moment).