TX3D 3.1.5 Beta - RAW terrain format
by Patrick Force · in Torque X 3D · 06/28/2010 (8:44 am) · 1 replies
build: 3.1.5 beta
Platform: WIN XP Pro SP3 / Nvidia GeForce 6800
project template: Starter Game 3D (3.1.5) Pro
target: vS2008 express
Issue: Old Problem, not fixed / Continued support for the RAW terrain format?
Error: XTerrain.cs Line 403 "Inalid Unique texture file specicified"
Steps to Repeat:
1). Create new Starter Game 3D (3.1.5) Pro project.
2). Compile and Run, open in TX3D Builder.
3). Add RAW terrain.Save and Close TX3D Builder and reload in VS.
4). Debug in VS and "error" "Inalid Unique texture file specicified"
Possible Fix: XTerrain.cs Line 2767
Replace:
// if a material wasn't set on the terrain, get one from the terrain data
if (_material == null)
{
_createdMaterial = true;
_material = _terrainData.CreateMaterial();
}
with:
// if a material wasn't set on the terrain, get one from the terrain data
if (_material == null)
{
_createdMaterial = true;
//_material = _terrainData.CreateMaterial();
// Generate a SimpleMaterial instead, doesn't suffer from InvalidOperationException
_material = new SimpleMaterial();
((SimpleMaterial)_material).TextureFilename = this._terrainData.UniqueTextureFilename;
}
That fix just does not work any more..
see pictures below 1). TX3D 3.1.4

see pictures below 2). TX3D 3.1.5

Platform: WIN XP Pro SP3 / Nvidia GeForce 6800
project template: Starter Game 3D (3.1.5) Pro
target: vS2008 express
Issue: Old Problem, not fixed / Continued support for the RAW terrain format?
Error: XTerrain.cs Line 403 "Inalid Unique texture file specicified"
Steps to Repeat:
1). Create new Starter Game 3D (3.1.5) Pro project.
2). Compile and Run, open in TX3D Builder.
3). Add RAW terrain.Save and Close TX3D Builder and reload in VS.
4). Debug in VS and "error" "Inalid Unique texture file specicified"
Possible Fix: XTerrain.cs Line 2767
Replace:
// if a material wasn't set on the terrain, get one from the terrain data
if (_material == null)
{
_createdMaterial = true;
_material = _terrainData.CreateMaterial();
}
with:
// if a material wasn't set on the terrain, get one from the terrain data
if (_material == null)
{
_createdMaterial = true;
//_material = _terrainData.CreateMaterial();
// Generate a SimpleMaterial instead, doesn't suffer from InvalidOperationException
_material = new SimpleMaterial();
((SimpleMaterial)_material).TextureFilename = this._terrainData.UniqueTextureFilename;
}
That fix just does not work any more..
see pictures below 1). TX3D 3.1.4

see pictures below 2). TX3D 3.1.5

About the author
Using tools like Maya, MotionBuilder, ZBrush, Photoshop, MS Visual Studio, rapidly delivering custom solutions, where only your imagination is the limit.
Associate Matt Fairfax
PopCap