Ok, I'll try to explain in detail what I've done to make the car look metallic:
1. Download and unzip the
ZIP archive I've posted on top of this thread.
2. You will get several files, the important ones are:
2.1
mustang.tri - the car mesh
2.1.1
mustang.tga - the main texture file
2.1.2
mustang_interior.tga - the car inside environment color
2.1.3
mustang_exterior.tga - the car outside lacquering color
2.1.4
mustang_glass.tga - different glass types
2.2
mustang_wheel.tri - the wheel mesh
2.2.1
mustang_wheel.tga - the wheel texture
3. Give all triangles from the car
mustang.tri using the
mustang_exterior.tga texture a metallic environment mapping:
3.1 Replace all instances of "
mustang_exterior.tga" with "
mustang_exterior.tga#ENV_map.tga" in the
mustang.tri file.
3.2 Vi command: "
:%s/mustang_exterior.tga/mustang_exterior.tga#ENV_map.tga/g"
4. Give all triangles from the car
mustang.tri using the
mustang_glass.tga texture a mirror environment mapping:
4.1 Replace all instances of "
mustang_glass.tga" with "
mustang_glass.tga#ENV_map.tga" in the
mustang.tri file.
4.2 Vi command: "
:%s/mustang_glass.tga/mustang_glass.tga#ENV_map.tga/g"
5. Give all related triangles, which are chrome and aluminum, from the car
mustang.tri and wheel
mustang_wheel.tri meshes a nice looking environment mapping texture. Some related parts are the front and back badge of the car and the aluminium rims to give an example.
5.1 Here is the problem, because you don't know which triangles are the ones matching the chrome and aluminum parts and you cannot replace all instances of the
mustang.tga in
mustang.tri and all instances of
mustang_wheel.tga in
mustang_wheel.tri, because they include other parts not going to have an environment mapping texture.
Perhaps you want to try it yourself, you will probably understand the problem much better.
Well, there is a solution to solve this problem in splitting up the textures in several other textures, in the extreme case every part has its own texture file, I've already written before:
st wrote:
... IMHO the easiest method for me seems to have a special texture file including all parts of the model which will get the environment texture. ...
I must correct myself: I've found out that this is not the easiest way, because you need at least an extra texture for the transparent looking glass texture. The glass texture has to stay for its own, with or without environment mapping texture added, because otherwise every related triangles using this texture including transparency will look transparent for some reason.
I've quickly viewed both Raydium TRI export scripts, each of them seems to be able to export multi-textured meshes in general, looking at cocorobix.tri for example, but it seems not possible to me to export the mesh with only some previous defined multi-textured triangles, but perhaps I'm completely wrong and you are gladly invited to correct me.
My wish is to have a possibility to select the related triangles inside Blender and assign the environment texture to them as an additional texture, so we can use one texture for all meshes and don't have to split every part into several textures, except the transparent and environment ones indeed.
Please report if something is not clear, I'd understand it.