What do these numbers mean in an XSI model?

Moderators: GSH, VSMIT, Red Devil, Commando

Post Reply
Col Klink
Sabre
Posts: 368
Joined: Fri Apr 15, 2011 8:24 am
Contact:

What do these numbers mean in an XSI model?

Post by Col Klink »

I'm still working on improving the Raxx XSI exporter and I was hoping someone could clue me in on what this group of numbers represent under the texture file name. Thanks, and feel free to elaborate enough so I can add the information to the exporter script entries.

Code: Select all

               SI_Texture2D  {
                  "Z:/modelsdirectory/Power_Ups/PICTURES/p_ammo.pic";
                  3;
                  256;256;
                  0;255;0;255;
                  0;
                  1;1;
                  0;0;
                  1.000000;1.000000;
                  0.000000;0.000000;
                  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.000000,0.000000,0.000000,1.000000;;
                  3;
                  1.000000;
                  0.750000;
                  1.000000;
                  0.000000;
                  0.000000;
                  0.000000;
                  0.000000;
User avatar
MrTwosheds
Recycler
Posts: 3059
Joined: Sat Feb 19, 2011 8:37 am
Location: Outer Space
Contact:

Re: What do these numbers mean in an XSI model?

Post by MrTwosheds »

Still a bit of a mystery to me that bit. I can tell you what just about everything else does.
I guess it has something to do with how the texture is displayed, never found the need to mess with it.

exports from 3dsmax make these numbers different.
SI_Texture2D {
"orgscale.dxtbz2";
3;
0;0;
0;12594;0;543;

This seems to upset Threed (ignore it) and makes model appear to glow blue in it. But they still work just fine in bz2.
The rest never seems to change and are the same in all the models I have examined.
The Silence continues. The War Of Lies has no end.
User avatar
Nielk1
Flying Mauler
Posts: 2991
Joined: Fri Feb 18, 2011 10:35 pm
Contact:

Re: What do these numbers mean in an XSI model?

Post by Nielk1 »

Below is a list of variables and types used in a program I have been working on based on XSI format documentation that I tested and modified to fit the older version we use.

Note that BZ2 probably ignores a lot of this but this is the exact format information. Probably no one else has this.

';' is between variables
',' is between sub-values of the same variable

string - imageName - Name of the image file. ;
int - mappingType - Type of mapping used to associate texture image to the geometry. ;

Code: Select all

0 = XY projection
1 = XZ projection
2 = YZ projection
3 = UV map (unwrapped)
4 = UV map (wrapped)
5 = Cylindrical projection
6 = Spherical projection
7 = Reflection map
int - width - Number of horizontal pixels in image. ;
int - height - Number of vertical pixels in image. ;
int - cropUMin - Start the cropping region in U. ;
int - cropUMax - End the dropping region in U. ;
int - cropVMin - Start the cropping region in V. ;
int - cropVMax - End the cropping region in V. ;
boolean - UVSwap - Indicated if the U and V orientations are swapped. ;

Code: Select all

When FALSE, U goes from 0.0 (left) to 1.0 (right) and V goes from 0.0 (bottom) to 1.0 (top).
When TRUE, U goes from 0.0 (top) to 1.0 (bottom) and V goes from 0.0 (right) to 1.0 (left).
int - URepeat - Number of horizontal repetitions of the image ;
int - VRepeat - Number of vertical repetitions of the image ;
boolean - UAlternate - Mirror texture horizontally when tiling ;
boolean - VAlternate - Mirror texture vertically when tiling ;
float - UScale - Scaling of image in U. ;
float - VScale - Scaling of image in V. ;
float - UOffset - Offset of image in U. ;
float - VOffset - Offset of image in V. ;
4x4 float matrix - projectionMatrix - Texture projection matrix ,,,,,,,,,,,,,,,;; (note it ends with 2 semicolons after the 16 floats)

Code: Select all

Description from the documentation of a higher version that is still relevant: To compute the UV texture coordinates, you need to transform the geometry using the inverse of the texture projection matrix. This generates vertex positions in the the projection coordinate system. Then you compute the actual projection of the geometry into the UV domain defined by the projection method.
int - blendingType - Type of blending between texture and material attributes ;

Code: Select all

1 = Alpha Mask
2 = Intensity Mask
3 = No Mask
4 = RGB Modulation
float - blending ;

Code: Select all

Normalized contribution of texture attributes (ambient, diffuse, specular, transparency, reflectivity).
Note: When blendingType is No Mask, this value corresponds to the Overall Blending parameter in the 2D Texture dialog box. Otherwise, this value is multiplied with either the alpha channel or the RGB intensity of the image pixels.
float - ambient ;

Code: Select all

Normalized contribution of texture pixel colors to the material ambient color.
The weight used to normalize the contribution is a scalar and is multiplied by the average intensity of the global ambience.
Note: When this value is 0.0, SI|3D uses the material ambient value. Otherwise, the texture ambient value is multiplied with the atmosphere ambience, and then blended with the material ambient color according to the blending value.
float - diffuse ;

Code: Select all

Normalized contribution of texture pixel colors to the material diffuse color.
Note: If this value is 0.0, then SI|3D uses the material diffuse value. Otherwise, it blends the texture diffuse value with the material diffuse color according to the blending value.
float - specular ;

Code: Select all

Normalized contribution of texture pixel colors to the material specular color.
Note: If this value is 0.0, then SI|3D uses the material specular value. Otherwise, it blends the texture specular value with the material specular color according to the blending value.
float - transparency ;

Code: Select all

Normalized contribution of texture pixel colors to the material transparency level.
Note: If this value is 0.0, then SI|3D uses the material transparency value. Otherwise, it blends the texture transparency value with the material transparency color according to the blending value.
float - reflectivity ;

Code: Select all

Normalized contribution of texture pixel colors to the material reflectivity level.
Note: If this value is 0.0, then SI|3D uses the material reflectivity value. Otherwise, it blends the texture reflectivity value with the material reflectivity color according to the blending value.
float - roughness ;

Code: Select all

Bump mapping intensity and/or displacement of geometry along surface normals.
For bump mapping, mappingType determines the axis frame or bump basis vectors, which displaces the normals (according to the differences in values between neighboring pixels along the U and V axes).

Do note that the height and width of the texture are only used as the basis for all the numbers that follow, they are simply scaled to match whatever the actual resolution of the texture is. In some modeling formats, this is expressed as a % of the image width and height where 0.0 is the most left and 1.0 is the most right (unless mirrored) but for XSI it uses an actual concrete integer allowing you to more easily fit the texture pixel perfect.
User avatar
MrTwosheds
Recycler
Posts: 3059
Joined: Sat Feb 19, 2011 8:37 am
Location: Outer Space
Contact:

Re: What do these numbers mean in an XSI model?

Post by MrTwosheds »

:P That is very interesting. Thank you. Would never have figured that out with experimentation alone.
The Silence continues. The War Of Lies has no end.
Col Klink
Sabre
Posts: 368
Joined: Fri Apr 15, 2011 8:24 am
Contact:

Re: What do these numbers mean in an XSI model?

Post by Col Klink »

Thanks Nielk I need to figure this one out to edit the entries in the XSI script but the info is very much appreciated.
User avatar
MrTwosheds
Recycler
Posts: 3059
Joined: Sat Feb 19, 2011 8:37 am
Location: Outer Space
Contact:

Re: What do these numbers mean in an XSI model?

Post by MrTwosheds »

Did a quick bit of fooling about with these values, on a barrel, textured with a grey orange isdf texture.
set material colour to different primarys like so
SI_Material {
0.000000;1.000000;0.000000;1.000000;;
1.000000;
0.500000;0.000000;0.000000;;
0.000000;0.000000;5.000000;;
2;
0.500000;0.000000;0.500000;;

SI_Texture2D {
"ibextw02.dxtbz2";
3;
0;0;
0;12594;0;543;
0;
1;1;
0;0;
1.000000;1.000000;
0.000000;0.000000;
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.000000,0.000000,0.000000,1.000000;;
3;
0.500000;
0.750000;
1.000000;
1.000000;
1.000000;
1.000000;
1.000000;
0.5 blending and the other texture values to 1.
The grey parts of the barrel now go blue in the shade, sort of greeny in the sun light and the orange parts mostly stay orange :)
Some where in here is a Team colors solution! maybe. Probably only for mods though is my guess.
But then again maybe it would only be useful for a race of psychedelicly intoxicated hippies...Acid dll?
Can't see much evidence of the texture blend modes doing much at all.
The Silence continues. The War Of Lies has no end.
Col Klink
Sabre
Posts: 368
Joined: Fri Apr 15, 2011 8:24 am
Contact:

Re: What do these numbers mean in an XSI model?

Post by Col Klink »

It seems the numerial entries aren't really required on a BZII XSI model as 3DEX doesn't add them to my X converted models. Truespace is still a better option then Anim8or as Truespace exports full animation in my X models where's Anim8or can only export static non-animated XSI models in a single group. It also has a wierd object linking quirk where it uses a group rather then the actual sub group name. I doubt it will ever get fixed as Anim8or is no longer being developed by it's creator Steve Glanville. I may take a closer look at GMAX and the MDL/X exporter again to see where that leads. Now that I have a better understanding of modeling software I should be able to make something work with GMAX. As far as I know the X exporter can probably export animations. As I recall I only had to add a top-level frame when converting GMAX based X models to XSI with 3DEX.
User avatar
Nielk1
Flying Mauler
Posts: 2991
Joined: Fri Feb 18, 2011 10:35 pm
Contact:

Re: What do these numbers mean in an XSI model?

Post by Nielk1 »

If your exporter can access the objects and understand how you intend them to be in hierarchy from how the program did it, they can be properly exported. That is all there is to it. Can you get from A to B, not does it already present it the way you want.

In the case of my vertex bone envelope export script in max it was a case of finding a modifier that was set up similarly to what BZ2 used, then shoehorning the data into an BZ friendly format.
Col Klink
Sabre
Posts: 368
Joined: Fri Apr 15, 2011 8:24 am
Contact:

Re: What do these numbers mean in an XSI model?

Post by Col Klink »

I see from the entries in the XSI script seem to make function calls using mostly C programming references, but I'm having to search the web to get some kind of information on what the functions actually do. Apparently, variables can be defined by the user to access the Anim8or engine or whatever its actually called. It's really hard for a non-programmer like myself. I found a lot of information but still need to try to make sense of what's relevent to Anim8or.
Post Reply