TSE and the long rocky road
by Mark Pilkington · 10/16/2006 (5:09 am) · 12 comments
Virus my TGE game has taken alittle back seat while I try and get my head round the engine more and moving to TSE has been interesting.
Getting my head round shaders all over again has had some highs and some lows but as always the community has done a stirling job.
A TSE project I;ve been working towards called ANIMAL has pushed me into learning the engine alot more from a TSE perspective. I don't want to get into any real detail about the game as theres not been a great deal done and things have a habit of just falling through.
(The front end I knocked up - my first ever front end by the way. Look ma! I'm really learning)

(A place holder environment with some tasty glow maps - built in 3DWS)
My first ever animated character - a place holder that still needs the full set of animations I plan on the player doing)
This is the player head - low-poly with normal map. The place holder guy has a changable head as the player will be able to wear masks and other head gear which will swap the head out for another)
------
OKay What have I learnt:
This is a basic material for a diffuse map and normal map. I always use an _d or _local to tell the textures apart...its a doom3 habit. and I also use _g for glow textures now. The higher the specularPower the less noticable the specularity is - no idea if this is right its just what I've noticed and the parm above is the spec colour.
mapTo = I think is your base diffuse texture that your other texture effects will get applied to or if they are in another location....I think. I've found if I'm not using a texture effect like a glow or normal map then I don't need to use the mapTo parm, it all seems to work fine.
Things I don't know and need to learn:
1) Can you use a specular map texture to specify the specularity of a material rather than using an overall spec.
2) I have no idea how to get textures with an alpha to work; either on a dts model or in a dif model - I'm pretty despirate for this one haha. I read somewhere that alpha textures aren't supported in shaders...if this is true then how the hell is that set up?...maybe I dreamt that.
3) I've been playing around with lights and at the moment I want to make a strong shaft of light for the windows and at the moment I have no idea how to do this.
4) Like 2, I need a shiny transparent sheet of glass material but again..I have no idea how to ahcieve this.
-------
Sorry for such a long plan here but its all new and I'm excited. I still need a programmer that can devote some time to this project and I'd love to shift this over to TorqueX once released. Well this is the level where I'm at in TSE so its going ok
Hope you enjoyed the screenshots.
Getting my head round shaders all over again has had some highs and some lows but as always the community has done a stirling job.
A TSE project I;ve been working towards called ANIMAL has pushed me into learning the engine alot more from a TSE perspective. I don't want to get into any real detail about the game as theres not been a great deal done and things have a habit of just falling through.
(The front end I knocked up - my first ever front end by the way. Look ma! I'm really learning)
(A place holder environment with some tasty glow maps - built in 3DWS)
My first ever animated character - a place holder that still needs the full set of animations I plan on the player doing)
This is the player head - low-poly with normal map. The place holder guy has a changable head as the player will be able to wear masks and other head gear which will swap the head out for another)------
OKay What have I learnt:
new Material(bigblocks)
{
mapTo = bigblocks_d;
baseTex[0] = "bigblocks_d";
bumpTex[0] = "bigblocks_local";
pixelSpecular[0] = true;
specular[0] = "1.0 1.0 1.0 0.1";
specularPower[0] = 38.0;
};This is a basic material for a diffuse map and normal map. I always use an _d or _local to tell the textures apart...its a doom3 habit. and I also use _g for glow textures now. The higher the specularPower the less noticable the specularity is - no idea if this is right its just what I've noticed and the parm above is the spec colour.
mapTo = I think is your base diffuse texture that your other texture effects will get applied to or if they are in another location....I think. I've found if I'm not using a texture effect like a glow or normal map then I don't need to use the mapTo parm, it all seems to work fine.
Things I don't know and need to learn:
1) Can you use a specular map texture to specify the specularity of a material rather than using an overall spec.
2) I have no idea how to get textures with an alpha to work; either on a dts model or in a dif model - I'm pretty despirate for this one haha. I read somewhere that alpha textures aren't supported in shaders...if this is true then how the hell is that set up?...maybe I dreamt that.
3) I've been playing around with lights and at the moment I want to make a strong shaft of light for the windows and at the moment I have no idea how to do this.
4) Like 2, I need a shiny transparent sheet of glass material but again..I have no idea how to ahcieve this.
-------
Sorry for such a long plan here but its all new and I'm excited. I still need a programmer that can devote some time to this project and I'd love to shift this over to TorqueX once released. Well this is the level where I'm at in TSE so its going ok
Hope you enjoyed the screenshots.
About the author
#2
10/16/2006 (6:52 am)
Specular maps are automatically supported if I recall correctly. Make it an 8 bit specular and place it in the alpha channel of a 32 bit PNG or DDS and it will work. So the first 24 bits are your actual graphics and the last 8 are the specular.
#3
10/16/2006 (6:58 am)
I will need to set up the shader to support the specular map right though? I take it the same thing will work for alpha textures? - You wouldn't know how to set up this in the materials.cs file? by any chance haha :)
#5
you may want to try the VolumeLight for this?
10/16/2006 (7:31 am)
"3) I've been playing around with lights and at the moment I want to make a strong shaft of light for the windows and at the moment I have no idea how to do this."you may want to try the VolumeLight for this?
#6
10/16/2006 (7:54 am)
I had a quick look at VolumeLight, while it does put down a light it's no different to the other lights in the scene and I can't dynamically move it anyway. but atleast I know that exists.
#7
new Material(fire_fence)
{
baseTex[0] = "fire_fence_d";
translucent = true;
translucentBlendOp = LerpAlpha;
pixelSpecular[0] = false;
};
You will most probably be able to set a normal map up for this pretty easily aswell.
10/16/2006 (8:37 am)
Well I fugured out the alpha texures.new Material(fire_fence)
{
baseTex[0] = "fire_fence_d";
translucent = true;
translucentBlendOp = LerpAlpha;
pixelSpecular[0] = false;
};
You will most probably be able to set a normal map up for this pretty easily aswell.
#8
10/17/2006 (3:32 am)
mapTo is the name of the texture the actual model uses. If the material name is the same, this isn't required, but that can lead to problems in some instances, say if a datablock or a function uses the same name. So, for safety purposes, and perhaps some treeView sanity, name your materials something universal (Demo_myTexture), and then use mapTo = myTexture;
#9
In opaque materials, the specular value is multiplied by the diffuse texture's alpha. So you use the alpha channel as specular mask.
I'm not sure about transluscent materials, but they probably use the alpha from the normal map texture instead, since the diffuse map alpha defines transluscency.
10/17/2006 (5:52 am)
"1) Can you use a specular map texture to specify the specularity of a material rather than using an overall spec."In opaque materials, the specular value is multiplied by the diffuse texture's alpha. So you use the alpha channel as specular mask.
I'm not sure about transluscent materials, but they probably use the alpha from the normal map texture instead, since the diffuse map alpha defines transluscency.
#10
10/17/2006 (4:34 pm)
@Mark - where are you getting all this information from? Is it from the TDN? Is there a good book on this stuff (thinking there probably isn't right now)?
#11
10/23/2006 (3:52 am)
well theres a doc in TSE you can look at but I mostly just play around and see if it works or ask the good folks here.
#12
10/23/2006 (6:22 am)
I've got the Microsoft DirectX 9 Pipeline / HLSL book, and Shader X1 and 2 - is that code going to be compatible with TSE?
Associate Andy Hawkins
Default Studio Name