Materials from the Car demo, as per request.
by dsfsd · in Torque Game Engine Advanced · 01/10/2006 (10:32 pm) · 3 replies
I saw a request on the Public forum for these, but I can't post these in there since it's the public forum.
The materials on the car in the demo don't use any custom shaders or anything, they are just standard TSE Materials.
Here is what I used to create the different cars. I had only been using TSE for two weeks at the time these were done, so they are fairly simple as I wasn't into advanced materials or shaders.
Diffuse Only Car:
Cube Mapped, Specular, Normal Mapped Car:
Glow Car:
Animated Texture Car:
Refraction Car:
(Note this just uses the standard refract shader included with TSE, but is a customMaterial)
Ghost Car:
Note: This uses the same cubemap defined in Car2, no need to post it twice in the same script.
The materials on the car in the demo don't use any custom shaders or anything, they are just standard TSE Materials.
Here is what I used to create the different cars. I had only been using TSE for two weeks at the time these were done, so they are fairly simple as I wasn't into advanced materials or shaders.
Diffuse Only Car:
datablock Material(Car1)
{
baseTex[0] = "~/data/interiors/junk/texture_map_car2_1024";
};Cube Mapped, Specular, Normal Mapped Car:
datablock CubemapData( Garage )
{
cubeFace[0] = "~/data/interiors/junk/cubexpos2";
cubeFace[1] = "~/data/interiors/junk/cubexneg2";
cubeFace[2] = "~/data/interiors/junk/cubezneg2";
cubeFace[3] = "~/data/interiors/junk/cubezpos2";
cubeFace[4] = "~/data/interiors/junk/cubeypos2";
cubeFace[5] = "~/data/interiors/junk/cubeyneg2";
};
datablock Material(Car2)
{
baseTex[0] = "~/data/interiors/junk/texture_map_car2_1024_cube";
bumpTex[0] = "~/data/interiors/junk/texture_map_car2_1024_b";
cubemap = Garage;
pixelSpecular[0] = true;
specular[0] = "0.3 0.3 0.3 1.0";
specularPower[0] = 8.0;
};Glow Car:
datablock Material(Car3)
{
baseTex[0] = "~/data/interiors/junk/texture_map_car2_1024_cube";
glow[0] = true;
emissive[0] = true;
pixelSpecular[0] = true;
specular[0] = "1.0 1.0 1.0 0.1";
specularPower[0] = 32.0;
};Animated Texture Car:
datablock Material(Car4)
{
baseTex[0] = "~/data/interiors/junk/rot_b_1";
bumpTex[0] = "~/data/interiors/junk/rot_b_1_b";
emissive[0] = true;
glow[0] = true;
pixelSpecular[0] = true;
specular[0] = "1.0 1.0 1.0 0.1";
specularPower[0] = 32.0;
animFlags[0] = $scroll;
scrollDir[0] = "1.0 0.0";
scrollSpeed[0] = 2.0;
};Refraction Car:
(Note this just uses the standard refract shader included with TSE, but is a customMaterial)
datablock ShaderData( RefractVert )
{
DXVertexShaderFile = "shaders/refractVertV.hlsl";
DXPixelShaderFile = "shaders/refractVertP.hlsl";
pixVersion = 2.0;
};
datablock CustomMaterial( Car5 )
{
texture[0] = "$backbuff";
texture[1] = "~/data/shapes/test/refractTest";
shader = RefractVert;
version = 2.0;
refract = true;
};Ghost Car:
Note: This uses the same cubemap defined in Car2, no need to post it twice in the same script.
datablock Material(Car6)
{
texture[0] = "~/data/interiors/junk/texture_map_car2_1024_cube";
texture[1] = "~/data/interiors/junk/texture_map_car2_1024_b";
animFlags[0] = $scroll;
scrollDir[0] = "0.0 1.0";
scrollSpeed[0] = 0.4;
glow[0] = true;
emissive[0] = true;
cubemap = Garage;
specular[0] = "0.65 0.65 0.65 0.65";
specularPower[0] = 20.0;
};About the author
#2
There is nothing like that in stock TSE, but with a little programming it'd probably be easy to accomplish. My expertise is in the art side of things however. :)
01/11/2006 (4:24 pm)
More than likely, but we didn't do that for the car demo, we had seperate objects, we had to make the whole demo in 2 days.There is nothing like that in stock TSE, but with a little programming it'd probably be easy to accomplish. My expertise is in the art side of things however. :)
#3
If Mapto somehow could be called to swap materials.... something like that.
Edit: I found an existing discussion on the topic. www.garagegames.com/mg/forums/result.thread.php?qt=26266
01/14/2006 (11:05 pm)
Would be a good one for wish list. If Mapto somehow could be called to swap materials.... something like that.
Edit: I found an existing discussion on the topic. www.garagegames.com/mg/forums/result.thread.php?qt=26266
Torque Owner Vashner
Thanks Tim.