Porting to TSE Question
by Bruno Campolo · in Torque Game Engine · 09/12/2006 (1:52 pm) · 10 replies
Hi I had a few quick questions about TGE and eventually porting to TSE. I'm still new to TGE and I'm not ready to port to TSE considering its still EA, but:
-When I'm ready to port to TSE do the models themselves have to change or just the materials that are attached to the models in order to take advantage of the new shader effects? or does it all just happen automatically using the same exact dts/texture files?
-Also, is a program like Milkshape capable of building or attaching these fancy shader materials or do you need something like max/maya?
-Are there additional art related changes that need to take place to take advantage of the shaders?
The reason I'm asking more art related questions is because I sometimes pay a modeller to create models, but I don't want to pay for one set of models only to have them create another set when I switch to TSE.
Thanks,
Bruno
-When I'm ready to port to TSE do the models themselves have to change or just the materials that are attached to the models in order to take advantage of the new shader effects? or does it all just happen automatically using the same exact dts/texture files?
-Also, is a program like Milkshape capable of building or attaching these fancy shader materials or do you need something like max/maya?
-Are there additional art related changes that need to take place to take advantage of the shaders?
The reason I'm asking more art related questions is because I sometimes pay a modeller to create models, but I don't want to pay for one set of models only to have them create another set when I switch to TSE.
Thanks,
Bruno
About the author
Creator of Bantam City Games, a one-man independent game development studio. To learn more, check out 'A Game Developer's Saga', a game development blog at: http://www.bantamcity.com/blog
#2
2) The shader stuff is done in the engine, not the 3d modelling program. However, the way you seperate which group uses which texture is important, as you apply shaders to texture groups...i think.
3) Other then the texture group thing, no.
09/13/2006 (11:02 am)
1)From my experience with TGE/TSE porting, the only thing needed different as far as models goes, is the addition of a material.cs file. This file contains the needed instructions for any shader effects. 2) The shader stuff is done in the engine, not the 3d modelling program. However, the way you seperate which group uses which texture is important, as you apply shaders to texture groups...i think.
3) Other then the texture group thing, no.
#3
As for "art related", it's just stuff like making a separate normal map rather than baking details into the texture or skin.
09/13/2006 (11:45 am)
The core TSE shaders (Normal/glow/defining base texture) are done via Torque script. Adding new ones takes more effort, but Brian Ramage has a resource giving an example. As for "art related", it's just stuff like making a separate normal map rather than baking details into the texture or skin.
#4
If that is true, then that makes me feel alot better about moving forward with getting the modelling done for TGE.
09/13/2006 (12:12 pm)
So my models and animations would remain intact, but I would in some way tell it which shaders to use for which textures/texture groups? I wouldn't even have to change the texture files themselves?If that is true, then that makes me feel alot better about moving forward with getting the modelling done for TGE.
#5
For examples in the demos, look for a materials.cs that exists inside the directory of the textures it defines (each separate texture directory needs its own materials.cs).
And yes: You should not have to change the texturesl unless you want to add glow, transparancy, normals, etc -- and the models don't need changing at all other than re-exporting in a different format (map2dif has a TSE version; I don't know if anything for DTS is different).
09/13/2006 (1:23 pm)
I haven't worked with DTS in TSE, but if it's anything like DIF it's a simple datablock that defines what the name of the texture in the model is and the name of the texture that will be applied (usually the same name).For examples in the demos, look for a materials.cs that exists inside the directory of the textures it defines (each separate texture directory needs its own materials.cs).
And yes: You should not have to change the texturesl unless you want to add glow, transparancy, normals, etc -- and the models don't need changing at all other than re-exporting in a different format (map2dif has a TSE version; I don't know if anything for DTS is different).
#6
I am interested because I wanted to know if TSE's material mapping system works on objects besides interiors and terrain.
09/13/2006 (3:38 pm)
I would like to know if this is all set up for each object like detail mapping is in TGE using the propertyMap.cs?I am interested because I wanted to know if TSE's material mapping system works on objects besides interiors and terrain.
#7
Its actually quite easy. Just open photoshop, load your [already created] texture for the model, run the nVidia plugin, change a few parameters until you get something that looks right, save it as a seperate texture, then supply a material definition that tells TSE which texture to use for the normal map. You may have to go back and tweak the settings for the generated normal map a few times until it looks right in-game.
However, I do believe the proper way to create a normal map is to generate it from a high-poly version of the model, or from a height map, which will create much better normal maps. Oh, and the base texture should be flat looking, and not contain any painted on lighting. But try the photoshop plugin and see how it works out, I've gotten pretty good results thus far.
As far as creating more textures aside from normal maps, it depends what you are trying to do.
ex: (its script so i don't believe its against the EULA)
new Material(NormalMapArmor)
{
baseTex[0] = "armortexture"; //which texture to the material will use
bumpTex[0] = "armortexture_material"; //the texture that is the actual normal map
pixelSpecular[0] = true; //add specular highlighting; does not require a seperate texture
specularColor[0] = "0.5 0.5 0.5 0.5"; //color and alpha of the specular highlight
specularPower[0] = 8.0; //specular power
}
Hope it helps. Disclaimer: I'm not an artist.
-Jase
09/13/2006 (6:11 pm)
You will have to create a seperate texture for the normal map, if you are going to use normal maps. Normal maps are what provide the awsome looking bump mapping. Fortunately, there are several programs/plugins that can do this for you. I use a photoshop plugin by nVidia, which is free. Heres a link,http://developer.nvidia.com/object/photoshop_dds_plugins.html.Its actually quite easy. Just open photoshop, load your [already created] texture for the model, run the nVidia plugin, change a few parameters until you get something that looks right, save it as a seperate texture, then supply a material definition that tells TSE which texture to use for the normal map. You may have to go back and tweak the settings for the generated normal map a few times until it looks right in-game.
However, I do believe the proper way to create a normal map is to generate it from a high-poly version of the model, or from a height map, which will create much better normal maps. Oh, and the base texture should be flat looking, and not contain any painted on lighting. But try the photoshop plugin and see how it works out, I've gotten pretty good results thus far.
As far as creating more textures aside from normal maps, it depends what you are trying to do.
ex: (its script so i don't believe its against the EULA)
new Material(NormalMapArmor)
{
baseTex[0] = "armortexture"; //which texture to the material will use
bumpTex[0] = "armortexture_material"; //the texture that is the actual normal map
pixelSpecular[0] = true; //add specular highlighting; does not require a seperate texture
specularColor[0] = "0.5 0.5 0.5 0.5"; //color and alpha of the specular highlight
specularPower[0] = 8.0; //specular power
}
Hope it helps. Disclaimer: I'm not an artist.
-Jase
#8
Yes, you do! The biggest change in going from old-school to shader engines is in the art path, and in the amount of time it takes to create art. In typical non-shader engines, you paint things like specular highlights and surface roughness into the texture. Thus, the texture for a soldier's skin will contain wrinkles for six-pack abs, and the texture for a leather jacket will contain white highlights around the creased areas.
In a shader engine, none of that happens anymore. The "color" of things is much more uniform. Instead, you add a normal map, which detains the creasing of the material, and use per-pixel specular to get the highlights. The advantage is that the highlights actually move when the character moves in the light.
If you create your textures in a paint program with layers, and start out with a well-defined diffuse color that is JUST color (no surface roughness or highlights), then add a layer for "structure" (roughness), and another layer for highlights, then you can go back and re-export the textures without the highlights (and possibly without the roughness) when time comes to update to the TSE.
Yes, it is a lot more work to create art for a modern shader engine. The visuals, however, do get significantly better.
09/13/2006 (10:36 pm)
Quote:I wouldn't even have to change the texture files themselves?
Yes, you do! The biggest change in going from old-school to shader engines is in the art path, and in the amount of time it takes to create art. In typical non-shader engines, you paint things like specular highlights and surface roughness into the texture. Thus, the texture for a soldier's skin will contain wrinkles for six-pack abs, and the texture for a leather jacket will contain white highlights around the creased areas.
In a shader engine, none of that happens anymore. The "color" of things is much more uniform. Instead, you add a normal map, which detains the creasing of the material, and use per-pixel specular to get the highlights. The advantage is that the highlights actually move when the character moves in the light.
If you create your textures in a paint program with layers, and start out with a well-defined diffuse color that is JUST color (no surface roughness or highlights), then add a layer for "structure" (roughness), and another layer for highlights, then you can go back and re-export the textures without the highlights (and possibly without the roughness) when time comes to update to the TSE.
Yes, it is a lot more work to create art for a modern shader engine. The visuals, however, do get significantly better.
#9
While I would agree that separating texture layers into files would be the ideal way, I disagree that it's a must. If he's already got a lot of art content made, he may not wish to change all of it. What he might consider is putting them all in TSE and go from there. Maybe then he could go back and change the key textures for effect (like any that glow).
09/13/2006 (10:48 pm)
Quote:Yes, you do!
While I would agree that separating texture layers into files would be the ideal way, I disagree that it's a must. If he's already got a lot of art content made, he may not wish to change all of it. What he might consider is putting them all in TSE and go from there. Maybe then he could go back and change the key textures for effect (like any that glow).
#10
09/14/2006 (11:42 am)
Ok thanks guys. I think my concerns have been addressed. I will move forward with modelling and textures in TGE.
Torque Owner Bruno Campolo
Thanks.