Archived

This topic is now archived and is closed to further replies.

n4gix

VC lighting and 3DS Max

Recommended Posts

OK back on the old question of VC lighting. I have programmed all of my gauges in C++ with a Show/Hide

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Attached is a zip file containing a single VC screen (lighted)...The needed info to massage the .x file may be seen in the included .x file, as well as the changes you could make in the .asm file(s) as well.It may well be easier to massage the .asm files instead of the .x file(s), but either way will work. ;)

Share this post


Link to post
Share on other sites

OK another quick Question has this been exported for FS9 or FSX? For the moment i am working on FS9 with the FS9 makemdl i can see how in the x file under the material lists that it has the EmissiveTextureFileName { "pan2_L.bmp";lines that's cool but the moment i put those lines into my .x file i get invalid x file when i run it through makemdl still tinkering though havent been working on it long :)thanks for the helpPaul

Share this post


Link to post
Share on other sites

>OK another quick Question has this been exported for FS9 or>FSX? For the moment i am working on FS9 with the FS9 makemdl >>i can see how in the x file under the material lists that it>has the >> EmissiveTextureFileName {> "pan2_L.bmp";>>lines that's cool but the moment i put those lines into my .x>file i get invalid x file when i run it through makemdl still>tinkering though havent been working on it long :)That's a pure FS9 export, Paul. Only the exporter from FS9 will generate the .asm files, which are the intermediate step before they are sent to the BGLC compiler and renamed as a .mdl file.Make certain that you include the closing brace! } TextureFileName { "$pan2.bmp"; } DiffuseTextureFileName { "$pan2.bmp"; } EmissiveTextureFileName { "pan2_L.bmp"; }Don't forget to copy ALL of the template header data as well, even for those things you aren't going to use... It's a generic template header that's generated for all .x files... ;)

Share this post


Link to post
Share on other sites

Bill you are a god :)added this under the last template header entry in the original panda exported .x file:template Header { <3D82AB43-62DA-11cf-AB39-0020AF71E433> WORD major; WORD minor; DWORD flags;}template Vector { <3D82AB5E-62DA-11cf-AB39-0020AF71E433> FLOAT x; FLOAT y; FLOAT z;}template Coords2d { FLOAT u; FLOAT v;}template Matrix4x4 { array FLOAT matrix[16];}template ColorRGBA { <35FF44E0-6C7C-11cf-8F52-0040333594A3> FLOAT red; FLOAT green; FLOAT blue; FLOAT alpha;}template ColorRGB { FLOAT red; FLOAT green; FLOAT blue;}template TextureFilename { STRING filename;}template Material { <3D82AB4D-62DA-11cf-AB39-0020AF71E433> ColorRGBA faceColor; FLOAT power; ColorRGB specularColor; ColorRGB emissiveColor; [...]}template MeshFace { <3D82AB5F-62DA-11cf-AB39-0020AF71E433> DWORD nFaceVertexIndices; array DWORD faceVertexIndices[nFaceVertexIndices];}template MeshTextureCoords { DWORD nTextureCoords; array Coords2d textureCoords[nTextureCoords];}template MeshMaterialList { DWORD nMaterials; DWORD nFaceIndexes; array DWORD faceIndexes[nFaceIndexes]; [Material]}template MeshNormals { DWORD nNormals; array Vector normals[nNormals]; DWORD nFaceNormals; array MeshFace faceNormals[nFaceNormals];}template Mesh { <3D82AB44-62DA-11cf-AB39-0020AF71E433> DWORD nVertices; array Vector vertices[nVertices]; DWORD nFaces; array MeshFace faces[nFaces]; [...]}template FrameTransformMatrix { Matrix4x4 frameMatrix;}template Frame { <3D82AB46-62DA-11cf-AB39-0020AF71E433> [...]}template FloatKeys { <10DD46A9-775B-11cf-8F52-0040333594A3> DWORD nValues; array FLOAT values[nValues];}template TimedFloatKeys { DWORD time; FloatKeys tfkeys;}template AnimationKey { <10DD46A8-775B-11cf-8F52-0040333594A3> DWORD keyType; DWORD nKeys; array TimedFloatKeys keys[nKeys];}template AnimationOptions { DWORD openclosed; DWORD positionquality;}template Animation { <3D82AB4F-62DA-11cf-AB39-0020AF71E433> [...]}template AnimationSet { <3D82AB50-62DA-11cf-AB39-0020AF71E433> [Animation]}template DiffuseTextureFileName { STRING filename;}template AmbientTextureFileName { STRING filename;}template EmissiveTextureFileName { STRING filename;}template ReflectionTextureFileName { STRING filename;}template ShininessTextureFileName { STRING filename;}template BumpTextureFileName { STRING filename;}template DisplacementTextureFileName { STRING filename;}template PartData { <79B183BA-7E70-44d1-914A-23B304CA91E5> DWORD nByteCount; array BYTE XMLData[ nByteCount ];}then added this to the appropriate material entry: DiffuseTextureFileName { "_panel_Gauges.bmp"; } EmissiveTextureFileName { "Gauges_L.bmp"; }worked a treat onwards and upwards :)thanks heaps you saved the day :)Paul

Share this post


Link to post
Share on other sites

>Bill you are a god :)Well, not quite that, although I do work for Him... (I'm a retired priest) ;)>added this under the last template header entry in the>original panda exported .x file:>then added this to the appropriate material entry:>> DiffuseTextureFileName {> "_panel_Gauges.bmp";> }> > EmissiveTextureFileName {> "Gauges_L.bmp";> }>>worked a treat onwards and upwards :)>>thanks heaps you saved the day :)The template headers are so the exporter knows how to take the raw data and reformat it for the assembly language files (x.asm and x_0.asm). Then the MakeMDL.exe program will compile the .asm files into a renamed .BGL file (.mdl).I am so glad that ACES supplied a seamless exporter for Max8/9 to be used for FSX models! :9 BTW, "_panel_Gauges.bmp and "$Gauges.bmp" both work interchangably...

Share this post


Link to post
Share on other sites