TGEA How to remove Detail textures on terrain
by Thanhda Tie · in Torque Game Engine Advanced · 01/01/2008 (11:56 am) · 7 replies
Okay, every time i remove it and hit apply. it should remove the detail texture on the terrain. even when i try to reassign it. it seems to stick with the original one. i find it does that with legacy terrain as well.
About the author
Digital Shock President & CEO, Thanhda's main role is to direct the business development team, and all other technical development. Thanhda began as a business relations manager & programmer, and has since worked on many projects.
#2
01/01/2008 (1:08 pm)
Okay cool. also matt. i noticed i saw you do a lot of stuff with the legacy terrain. can you apply shaders to legacy terrains? or is that only something you can do with atlas2
#3
They both area already fully shader basing.
See the shaders folder, legacyTerrain
01/01/2008 (1:21 pm)
You can not apply shaders to any of both.They both area already fully shader basing.
See the shaders folder, legacyTerrain
#4
Edit: Oh, well there you have it. I wasn't sure what the state of legacy was on the last TGEA release, but that's a general recipe for putting shaders on whatever.
01/01/2008 (1:24 pm)
The easiest way to put a shader on legacy would be to add a field to the terrain datablock (simobject type) and point it at a ShaderData instance. In the render, do:mShaderDataVariableName->shader->process()I would recommend turning the sampler/texture-stage state setup blocks into conditionals that check something like this:
if( mShaderDataVariableName != NULL && mShaderDataVariablename->shader != NULL )
{
// process the shader
}
else
{
// set up fixed-function combiner states
}Edit: Oh, well there you have it. I wasn't sure what the state of legacy was on the last TGEA release, but that's a general recipe for putting shaders on whatever.
#5
This is really buggy... I hope to see it fixed very soon (I mean in the announced big update), sorry but I really can't understand how you put out TGEA with a similar missing feature... :(
02/19/2008 (1:13 pm)
This means that changing the detail texture into the material definition every terrain share the same detail texture?This is really buggy... I hope to see it fixed very soon (I mean in the announced big update), sorry but I really can't understand how you put out TGEA with a similar missing feature... :(
#6
It's probably more or less a "hack", but it does work.
02/21/2008 (6:25 am)
I don't know if this is the best way to do it but to change the detail texture with each different mission I take the detail datablock (as Matt V. listed, above) and put it at the very bottom of the .MIS file. Change the detail texture there, and it loads up fine. It's probably more or less a "hack", but it does work.
#7
Tnx!
02/21/2008 (1:21 pm)
@ Eric: never tought about this way to do it... tnx a lot, I really hope next TGEA release will fix it but for the moment the hack you suggested is enough, it was really unaccaptable to stick with the same detail tex with all terrains... ;)Tnx!
Torque Owner Matt Vitelli
new CustomMaterial(TerrainMaterial) { shader = TerrShader; version = 1.1; texture[3] = "~/data/terrains/details/detail1"; dynamicLightingMaterial = TerrainMaterialDynamicLighting; dynamicLightingMaskMaterial = TerrainMaterialDynamicLightingMask; preload = true; };You can change that to whatever you wish, or simply comment it out.