General Category > ASL Scripts
I'm working on an XSI export script modifying Raxx's BZII X exporter script.
Raxx:
Ippena, this is somewhat uncharted territory for me now, since I don't have access to the game and can only act as an observer. There could be any number of things that's causing it. All I can suggest is to take the model and export it with 3DEX so that it loads the texture properly in the game, and then slowly plug in blocks of Anim8or's version into it until it the textures disappear.
cooldude234, not sure if that's actual shrinkage or just noise. I don't know what texture is being tested on it, or the UVs, and I'm not sure if that's the kind of effect that non-normalized coordinates would have. However, the UVs exported seem to already be normalized. That is, between 0 and 1, so I doubt that's the issue.
Raxx:
Ippena, perhaps the attached script will work. I only made a minor change to it, but I have no way of testing it.
lppena:
You both have good points. I'll try the revised script with and w/o textures. It's odd though as the cube has zero issues in 3DEX. The old XSI format is a strange beast and many variants have evolved from 3rd party efforts to replicate a usable variant that that will work with the older BZII game engine. Raxx's XSI variant is on e of the best versions I've seen to date. As I've mentioned the BZII engine handles the processing of the XSI model and converts that to a binary .MSH model that also must hold true for the processing of the textures as well. BZII, supports BMP, PNG, JPG, TGA, and a Softimage version of PIC. The latest beta of BZII now only uses a modified DXT version called BZ2DXT; however, I use the older BZII version that does not use BZ2DXT. Also, the X to XSI models I normally use that are converted with 3DEX oddly work in BZII even thought the XSI model does not use the SI_Texture2D entry; it reuses the TextureFilename like the X format uses. Also, because Anim8or models are grouped rather then linked in hierchal tree form there may limited usefulness of Anim8or other then creating the geometry itself; don't know for sure though. What I may start doing is creating the model parts in Anim8or grouping the object together and exporting them to Truespace as X models where I can UV map, and link the model parts for BZII in TS and export that as X for converting to XSI with 3DEX. Unless, I can figure out how to get the A8 XSI model exporter to display the texture properly in BZII; the convert A8 XSI to 3DEX XSI will probably work for single objects models only; BZII uses these for simple terrestrial props like trees. Thanks for the XSI revision I'll test it out throughly and repoert back on the results. Leroy.
lppena:
The revision seem to make no differences as far as showing the texture, and using 3DEX to reconvert the A8 XSI to 3DEX XSI was no good as BZII just crashed. However, using the BZII X exporter you fixed up for me seems to convert well using 3DEX to convert the X model to XSI. Here's what the converted BZII X to XSI model looks like. I can live with this solution if issues can not be sorted out with the BZII XSI exporter Raxx. Perhaps using this as a reference could help sort out issues with the XSI exporter you are attempting to modify will yield some clues on what to change? If not no biggy Raxx. You've spent quite some valuable time, so I don't want to push anymore then you feel comfortable with. Leroy. PS: I zipped up the X and XSI models for you to examine if you want.
--- Code: ---xsi 0101txt 0032
SI_CoordinateSystem coord {
1;
0;
1;
0;
2;
5;
}
Frame mesh01 {
FrameTransformMatrix {
1.000000,0.000000,0.000000,0.000000,
0.000000,1.000000,0.000000,0.000000,
0.000000,0.000000,1.000000,0.000000,
0.000001,0.000000,0.000000,1.000000;;
}
Mesh mesh01_mesh {
20;
-9.166700;15.877000;-20.497000;,
3.501400;25.690001;-9.166700;,
20.497000;15.877000;-9.166700;,
18.333000;0.000000;-20.497000;,
0.000000;0.000000;-27.500000;,
-9.166700;-15.877000;-20.497000;,
-23.999001;-9.812600;-9.166700;,
-23.999001;9.812500;-9.166700;,
20.497000;-15.877000;-9.166700;,
3.501400;-25.690001;-9.166700;,
23.999001;9.812600;9.166700;,
23.999001;-9.812600;9.166700;,
-20.497000;15.877000;9.166700;,
-3.501400;25.690001;9.166700;,
-3.501400;-25.690001;9.166700;,
-20.497000;-15.877000;9.166700;,
9.166700;15.877000;20.497000;,
9.166700;-15.877000;20.497000;,
-18.333000;0.000000;20.497000;,
0.000000;0.000000;27.500000;;
36;
3;1,2,0;,
3;2,3,0;,
3;3,4,0;,
3;6,7,5;,
3;7,0,5;,
3;0,4,5;,
3;8,9,3;,
3;9,5,3;,
3;5,4,3;,
3;10,11,2;,
3;11,8,2;,
3;8,3,2;,
3;12,13,7;,
3;13,1,7;,
3;1,0,7;,
3;14,15,9;,
3;15,6,9;,
3;6,5,9;,
3;13,16,1;,
3;16,10,1;,
3;10,2,1;,
3;17,14,11;,
3;14,9,11;,
3;9,8,11;,
3;15,18,6;,
3;18,12,6;,
3;12,7,6;,
3;19,17,16;,
3;17,11,16;,
3;11,10,16;,
3;19,16,18;,
3;16,13,18;,
3;13,12,18;,
3;19,18,17;,
3;18,15,17;,
3;15,14,17;;
MeshMaterialList {
1;
36;
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0;
SI_Material {
0.878431;0.878431;0.878431;1.000000;;
0.200000;
1.000000;1.000000;1.000000;;
0.000000;0.000000;0.000000;;
1;
0.000000;0.000000;0.000000;;
TextureFilename {
"Raxsiblob_0.bmp";
}
}
}
SI_MeshNormals {
57;
0.303532;0.525702;-0.794673;,
0.303530;0.525713;-0.794667;,
0.303534;0.525725;-0.794657;,
0.303535;0.525737;-0.794649;,
0.303543;0.525750;-0.794638;,
-0.607043;0.000000;-0.794669;,
-0.607054;0.000000;-0.794661;,
-0.607060;0.000000;-0.794656;,
-0.607076;0.000000;-0.794643;,
0.303542;-0.525719;-0.794658;,
0.303532;-0.525716;-0.794664;,
0.303535;-0.525727;-0.794655;,
0.303532;-0.525731;-0.794654;,
0.303543;-0.525750;-0.794638;,
0.982241;0.000000;-0.187625;,
0.982242;0.000000;-0.187617;,
0.982243;0.000000;-0.187613;,
0.982245;0.000000;-0.187601;,
-0.491148;0.850643;-0.187566;,
-0.491137;0.850646;-0.187581;,
-0.491133;0.850645;-0.187593;,
-0.491125;0.850647;-0.187607;,
-0.491124;0.850645;-0.187618;,
-0.491145;-0.850636;-0.187602;,
-0.491136;-0.850645;-0.187586;,
-0.491131;-0.850645;-0.187598;,
-0.491124;-0.850650;-0.187595;,
-0.491122;-0.850646;-0.187622;,
0.491138;0.850641;0.187600;,
0.491126;0.850647;0.187604;,
0.491133;0.850646;0.187590;,
0.491131;0.850648;0.187585;,
0.491148;0.850643;0.187561;,
0.491122;-0.850645;0.187621;,
0.491123;-0.850648;0.187608;,
0.491131;-0.850646;0.187592;,
0.491136;-0.850647;0.187578;,
0.491148;-0.850643;0.187561;,
-0.982242;-0.000014;0.187621;,
-0.982242;-0.000003;0.187617;,
-0.982242;-0.000002;0.187620;,
-0.982242;0.000004;0.187619;,
-0.982241;0.000000;0.187625;,
0.607076;0.000000;0.794643;,
0.607060;0.000000;0.794656;,
0.607054;0.000000;0.794661;,
0.607043;0.000000;0.794669;,
-0.303543;0.525750;0.794638;,
-0.303532;0.525731;0.794654;,
-0.303535;0.525727;0.794655;,
-0.303532;0.525716;0.794664;,
-0.303542;0.525719;0.794658;,
-0.303543;-0.525750;0.794638;,
-0.303535;-0.525737;0.794649;,
-0.303534;-0.525725;0.794657;,
-0.303530;-0.525713;0.794667;,
-0.303532;-0.525702;0.794673;;
36;
0;3;0,1,2;,
1;3;1,3,2;,
2;3;3,4,2;,
3;3;5,5,6;,
4;3;5,7,6;,
5;3;7,8,6;,
6;3;9,10,11;,
7;3;10,12,11;,
8;3;12,13,11;,
9;3;14,14,15;,
10;3;14,16,15;,
11;3;16,17,15;,
12;3;18,19,20;,
13;3;19,21,20;,
14;3;21,22,20;,
15;3;23,24,25;,
16;3;24,26,25;,
17;3;26,27,25;,
18;3;28,29,30;,
19;3;29,31,30;,
20;3;31,32,30;,
21;3;33,34,35;,
22;3;34,36,35;,
23;3;36,37,35;,
24;3;38,39,40;,
25;3;39,41,40;,
26;3;41,42,40;,
27;3;43,44,45;,
28;3;44,46,45;,
29;3;46,46,45;,
30;3;47,48,49;,
31;3;48,50,49;,
32;3;50,51,49;,
33;3;52,53,54;,
34;3;53,55,54;,
35;3;55,56,54;;
}
SI_MeshTextureCoords {
44;
0.636290;-0.500000;,
1.297900;-0.882000;,
0.143180;-0.882000;,
1.213600;-1.500000;,
0.500000;-1.500000;,
0.565830;-0.881970;,
0.565830;-0.118040;,
1.143180;-1.118030;,
0.565830;-1.118040;,
1.143180;-0.882000;,
1.143180;-2.118030;,
0.143180;-2.118030;,
1.297900;-1.118030;,
0.636290;-1.500000;,
1.213600;-0.500000;,
0.143180;-1.118030;,
0.500000;-0.500000;,
0.434200;-1.118030;,
0.434200;-1.881970;,
0.297900;-0.882000;,
0.297900;-2.118030;,
0.213600;-1.500000;,
0.702120;-0.882000;,
1.363710;-0.500000;,
1.636290;-0.500000;,
0.702120;-0.118030;,
0.702120;-1.118030;,
1.636290;-1.500000;,
0.363710;-0.500000;,
0.856820;-0.882000;,
1.434200;-1.118030;,
0.856820;-1.118030;,
0.363710;-1.500000;,
1.434200;-0.881970;,
0.786360;-0.500000;,
0.786360;-1.500000;,
0.565830;-1.881970;,
0.856820;-2.118030;,
1.434200;-1.881970;,
1.500000;-1.500000;,
1.856820;-0.882000;,
1.500000;-0.500000;,
1.856820;-1.118030;,
1.856820;-0.118030;;
36;
0;3;0,1,2;,
1;3;1,3,2;,
2;3;3,4,2;,
3;3;5,6,7;,
4;3;8,9,10;,
5;3;2,4,11;,
6;3;12,13,14;,
7;3;13,15,14;,
8;3;15,16,14;,
9;3;17,18,19;,
10;3;18,20,19;,
11;3;20,21,19;,
12;3;22,23,8;,
13;3;23,24,8;,
14;3;24,9,8;,
15;3;23,25,24;,
16;3;26,5,27;,
17;3;5,7,27;,
18;3;28,29,0;,
19;3;29,30,0;,
20;3;30,1,0;,
21;3;31,32,33;,
22;3;32,13,33;,
23;3;13,12,33;,
24;3;26,34,5;,
25;3;35,22,36;,
26;3;22,8,36;,
27;3;4,37,29;,
28;3;37,38,29;,
29;3;38,30,29;,
30;3;39,40,35;,
31;3;40,23,35;,
32;3;23,22,35;,
33;3;41,34,42;,
34;3;34,26,42;,
35;3;25,23,43;;
}
}
}
--- End code ---
Raxx:
The next thing I would test would be to go into Anim8or's exported .xsi file and replace the SI_Texture2D block of code with the TextureFilename one. SI_Texture2D is used in the sample XSI files I found online that supposedly work in the game engine, but since the block output by the script is incomplete, that may be causing the problem.
I went ahead and adjusted it in the script attached.
By the way, there is a way to link everything together. If you can point me to a guide that shows the exact kind of linking for more complex models that use different parts of the mesh for different things, I can go ahead and implement it in the script.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version