Battlezone Universe

Battlezone Universe => Battlezone 2 => Maps and Modding => Topic started by: BNG Da BZ Fool on April 06, 2008, 11:43:22 PM

Title: More questions about the X that BZII is compatible with...
Post by: BNG Da BZ Fool on April 06, 2008, 11:43:22 PM
As another experiment I made a simple cube and save it as testxbldg01.x in GSL. Then I renamed a data pack building ODF (bldg01.odf) to (testxbldg01.odf) and changed the geometryName entry to testxbldg01.x and saved the file. Both files were placed in my 1.2 addon folder under my assets folder BNG. Then I opened the map editor with MM5 and loaded the Alien Dunes map (FE), and then entered the editor and typed testxbldg01 in object config name and hit enter. I expected the program to crash, but instead my  cube appeared where I placed it, but it was untextured. The program continued to function normally. Afterwords, I opened the bindata folder and sure enough BZII had created a .msh file of my cube.

Does this mean that the X version GSL saves in is the compatible version of X for BZII? I would have thought if it was not then the map editor would have crashed as it has done so many times in the past. I guess what I need to do now is try one of my other working X models in game after checking to see that all the hp_points are correctly labeled as GSL has a nasty habit of adding stuff to name like extra 0's. I always realized that this version of X very closely resembled the XSI version that the game uses, but until now never really gave the issue much thought until recently when I've desperately been seeking a way to make some animated models for BZII. Any feedback is always appreciated...BNG.

PS: I'm not getting too excited this time after bumming out on the 1.5.5 disappointment, but still have my fingers crossed that something will finally give way to making animated models for the game. There's still the 650 face limit with GSL, but as far as I know there is no limit to the number of keyframes that can be created on the low poly models it supports. I'm going to do some testing and will post again if anything pops up guys.

BZ2ME, sucks, it won't even let me make changes to the X file like deleting the extra numbers added after the Hp_points. Guess I'll have to remove them in notepad manually one by one.
Title: Re: More questions about the X that BZII is compatible with...
Post by: mrtwosheds on April 07, 2008, 04:44:55 AM
I find it much quicker and easier to remove such litter in notepad, once you get the hang of which bits need changing.
Under my own process the second line in the si_materials section always winds up as 200.000000, so I always run a quick replace all on that value and set it to 0. Its the reflectivity value.

Threed can be used fairly effectively once you have figured out what NOT to do with it. I rarely experience its many crashes now.

Tip
When editing buildings with terrain in threed always open in notepad first and paste a quick
Frame frm-dummy {

   FrameTransformMatrix {
      1,0,0,0,
      0,1,0,0,
      0,0,1,0,
      0,0,0,1;;
   }
above the terrain__h frame (take it out again before testing in bz2)

Its allot quicker than rebooting your pc and finding that you now have to construct that recycler again because bz2me decided to destroy its model for you.
Title: Re: More questions about the X that BZII is compatible with...
Post by: BNG Da BZ Fool on April 07, 2008, 08:53:11 PM
Tanks MTS, I'll add a dummy cube in GSL when I make my models from now on. I also need to figure out how to get the texture I applied to my X file as it appears untextured when it's spawned in the map editor. I'm guessing the X version that GSL saves in is the version that OM mentioned the other day and in the past about a BZII compatible X format. Below is the actual X format that loaded into the map editor:

xof 0302txt 0032

# This DirectX file was written by a Caligari (tm) product

Header {
   1;
   0;
   1;
}
Frame Cube-0 {
   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.000000, 1.000000, 0.000000, 1.000000;;
   }
   Mesh CubeMesh {
      24;
      1.000000;-1.000000;1.000000;,
      1.000000;1.000000;1.000000;,
      -1.000000;-1.000000;1.000000;,
      -1.000000;1.000000;1.000000;,
      1.000000;-1.000000;-1.000000;,
      -1.000000;-1.000000;-1.000000;,
      -1.000000;1.000000;-1.000000;,
      1.000000;1.000000;-1.000000;,
      -1.000000;-1.000000;1.000000;,
      1.000000;-1.000000;1.000000;,
      -1.000000;-1.000000;1.000000;,
      -1.000000;1.000000;1.000000;,
      -1.000000;-1.000000;-1.000000;,
      1.000000;1.000000;1.000000;,
      -1.000000;1.000000;-1.000000;,
      -1.000000;1.000000;1.000000;,
      1.000000;-1.000000;-1.000000;,
      -1.000000;-1.000000;-1.000000;,
      -1.000000;1.000000;-1.000000;,
      1.000000;1.000000;-1.000000;,
      1.000000;-1.000000;-1.000000;,
      1.000000;1.000000;-1.000000;,
      1.000000;1.000000;1.000000;,
      1.000000;-1.000000;1.000000;;
      12;
      3;1,3,2;,
      3;0,1,2;,
      3;8,5,4;,
      3;9,8,4;,
      3;10,11,6;,
      3;12,10,6;,
      3;13,7,14;,
      3;15,13,14;,
      3;16,17,18;,
      3;19,16,18;,
      3;20,21,22;,
      3;23,20,22;;
      MeshNormals {
         24;
         0.577350;-0.577350;0.577350;,
         0.577350;0.577350;0.577350;,
         -0.577350;-0.577350;0.577350;,
         -0.577350;0.577350;0.577350;,
         0.577350;-0.577350;-0.577350;,
         -0.577350;-0.577350;-0.577350;,
         -0.577350;0.577350;-0.577350;,
         0.577350;0.577350;-0.577350;,
         -0.577350;-0.577350;0.577350;,
         0.577350;-0.577350;0.577350;,
         -0.577350;-0.577350;0.577350;,
         -0.577350;0.577350;0.577350;,
         -0.577350;-0.577350;-0.577350;,
         0.577350;0.577350;0.577350;,
         -0.577350;0.577350;-0.577350;,
         -0.577350;0.577350;0.577350;,
         0.577350;-0.577350;-0.577350;,
         -0.577350;-0.577350;-0.577350;,
         -0.577350;0.577350;-0.577350;,
         0.577350;0.577350;-0.577350;,
         0.577350;-0.577350;-0.577350;,
         0.577350;0.577350;-0.577350;,
         0.577350;0.577350;0.577350;,
         0.577350;-0.577350;0.577350;;
         12;
         3;1,3,2;,
         3;0,1,2;,
         3;8,5,4;,
         3;9,8,4;,
         3;10,11,6;,
         3;12,10,6;,
         3;13,7,14;,
         3;15,13,14;,
         3;16,17,18;,
         3;19,16,18;,
         3;20,21,22;,
         3;23,20,22;;
      }
      MeshTextureCoords {
         24;
         0.000000;0.000000;,
         0.000000;-1.000000;,
         1.000000;0.000000;,
         1.000000;-1.000000;,
         0.000000;0.000000;,
         1.000000;0.000000;,
         1.000000;-1.000000;,
         0.000000;-1.000000;,
         1.000000;-1.000000;,
         0.000000;-1.000000;,
         0.000000;0.000000;,
         0.000000;-1.000000;,
         1.000000;0.000000;,
         0.000000;0.000000;,
         1.000000;-1.000000;,
         1.000000;0.000000;,
         1.000000;0.000000;,
         0.000000;0.000000;,
         0.000000;-1.000000;,
         1.000000;-1.000000;,
         0.000000;0.000000;,
         0.000000;-1.000000;,
         1.000000;-1.000000;,
         1.000000;0.000000;;
      }
      MeshVertexColors {
         12;
         6; 0.427451; 0.427451; 0.427451; 0.000000;,
         7; 0.878431; 0.878431; 0.878431; 0.000000;,
         10; 0.427451; 0.427451; 0.427451; 0.000000;,
         11; 0.427451; 0.427451; 0.427451; 0.000000;,
         12; 0.427451; 0.427451; 0.427451; 0.000000;,
         13; 0.878431; 0.878431; 0.878431; 0.000000;,
         14; 0.878431; 0.878431; 0.878431; 0.000000;,
         15; 0.878431; 0.878431; 0.878431; 0.000000;,
         16; 0.886275; 0.886275; 0.886275; 0.000000;,
         17; 0.886275; 0.886275; 0.886275; 0.000000;,
         18; 0.886275; 0.886275; 0.886275; 0.000000;,
         19; 0.886275; 0.886275; 0.886275; 0.000000;;
      }
      MeshMaterialList {
         1;
         12;
         0,
         0,
         0,
         0,
         0,
         0,
         0,
         0,
         0,
         0,
         0,
         0;;
         Material CubeMaterial_0_0 {
            0.501961; 0.250980; 0.000000; 1.000000;;
            0.000000;
            0.100000; 0.100000; 0.100000;;
            0.050196; 0.025098; 0.000000;;
            TextureFilename {
               "C:\gameSpaceLight\Textures\desertcamo.bmp";
            }
         }
      }
   }
}

Still need to figure out how to get the camo texture to appear on the cube, but I'll try editing the references section of the X file and also try copying the BMP file into my addon folder to see what happens. I wish I understood more about this modeling stuff, so I don't always feel so lost when I stumble on to stuff that actually works in some way. Your notepad method makes a lot of sense, but I have so limited time with work an all that I just need to find a simpler method of eventually animating models. I still have a long ways to go in understanding how the key frame editor in TS and GSL works. So far as I understand the process in both TS and GSL, is that the length needs to be defined, then a starting key frame is recorded, then the modeler manipulates the model and the in between movements are calculated by the program itself. For each part that moves additional key frames are recorded for easch animated part. Both TS and GSL display this information in the scene editor and reflected in the heirachial tree displayed in the same window.

In the pic below my animated cube has 6 frames, and has 3 seperate manipulations: 1. The cube flips upside down, 2. moves along a straight path, and 3. grows to  a larger size all in the same single rec'd key frame. The hierarchial tree reflects this by adding entries under the cube name as can be seen in the pic. I just don't quite understand how to add additional key frames at this time, but that should come with more practice on my part. If there are any other GSL users out there then I could use some other testers to gets some feedback from as sometimes it's better to have someone other then myself trying stuff with GSL too. As I mentioned before this X format works with the BZII engine and may be just what other modelers are looking for as a way to make animated BZII models. Anyone that needs the web addy for GSL can visit www.caligari.com\gamespace to DL the free version, and help me and other modders for that matter figure some of this stuff out along with myself. Calling all modders willing to render assistance on this issue. I think this will work for BZII modders searching frantically for a way to animate stuff for the game.
(http://static1.filefront.com/images/personal/l/lppena/106799/kyxvpcjqeb.thumb500.jpg)
Title: Re: More questions about the X that BZII is compatible with...
Post by: mrtwosheds on April 07, 2008, 09:56:33 PM
the materials section from an xsi looks like this.
            SI_Material {
               0.7;0.7;0.7;1;;
               0;
               0.5;0.5;0.5;;
               0;0;0;;
               2;
               0;0;0;;

               SI_Texture2D  {
                  "drep00.dxtbz2";
                  3;
                  256;256;
                  0;255;0;255;
                  0;
                  1;1;
                  0;0;
                  1;1;
                  0;0;
                  0.944739,0.327825,0,0,
                  -0.327825,0.944739,0,0,
                  0,0,1,0,
                  0,1,0,2.20406e-39;;
                  3;
                  1;
                  0.75;
                  1;
                  0;
                  0;
                  0;
                  0;
               }
            }
         }
You would probably at least need to change          Material CubeMaterial_0_0
and            TextureFilename {
There seem to be some values missing too.

QuoteTanks MTS, I'll add a dummy cube in GSL when I make my models from now on.
That's not what I meant. Once you have made a functioning (in bz2) terrain using building, with terrain__h as its top level frame and then attempt to modify that model in bz2me(threed) sometimes the lack of a dummy frame causes threed to destroy that model when saving...(not just an error most of the data is gone)
Getting into the habit of adding a dummy frame (in notepad) before modifying buildings.xsi will save allot of stress and time.
Title: Re: More questions about the X that BZII is compatible with...
Post by: BNG Da BZ Fool on April 07, 2008, 10:29:57 PM
Remember this not an XSI file at all, but the X file format that GSL saves in. It does not get processed by BZ2ME or X2XSI to get prepped for use in the game. In this case wouldn't I just add the top level terrain_h frame along with the dummy frame you mention earlier as an object in GSL before saving as X?

Also, I'm trying to get away from BZ2ME altogether and instead making any changes either in GSL directly or in notepad like you do. This is still a work in progress and I don't quite understand fully yet what changes need to be made. More testing is needed to understand why BZII will even allow my X model to appear in the map editor at all. I'll also try your suggestion for the missing texture as well. Without any texture what good is getting my X model into the game, so I need to figure out that one too.

PS: I uploaded a zipped file with the ODF, X, and texture map used on the X model if anyone would like to test it in the BZII map editor. Click on the web link to File Front. http://files.filefront.com/testxbldg01zip/;9969245;/fileinfo.html
Title: Re: More questions about the X that BZII is compatible with...
Post by: mrtwosheds on April 08, 2008, 02:04:17 AM
if your not going to use threed you would not want the dummy frame on the building, I only put it there to stop threed destroying the model when saving it, and then remove it after.

I did a google on gsl and found 10000+ things, what is its full name or a link?
Title: Re: More questions about the X that BZII is compatible with...
Post by: OvermindDL1 on April 08, 2008, 05:22:29 PM
Game Studio Lite I think.
(http://www.overminddl1.com/image_scripts/image_sig.php?type=ODL1signitures&image/sig.gif)
Generated by OvermindDL1's Signature Auto-Add Script (http://overminddl1.com) via GreaseMonkey (http://greasemonkey.mozdev.org/)

Title: Re: More questions about the X that BZII is compatible with...
Post by: BNG Da BZ Fool on April 08, 2008, 08:43:27 PM
The name is Gamespace lite. DL it at www.caligari.com\gamespace. If you decide to install it then try adding a simple cube into the work space. Then click file>save>object. Then use the drop down menu and select the save as directx export option. Then select settings and put an x in the triangulate all faces box and save the file. A simple texture can be applied using the other icon controls. In GSL the texture icon has 3 ball looking objects on it and clicking on it pops up another window with the default texture library collection. It's a drag and drop type system, so if you left click hold you can drag the texture file directly on to the cube object. I believe it automatically applies cubic mapping by default. Alternatively, I uploaded a zip file you can DL @ File Front if you don't want to mess with GSL to try in the BZII map editor to see what I mean about the untextured cube loading okay without crashing it. PS: If you open the ODF file in notepad you'll see that the geometryName is actually filename.x rather then filename.xsi. I believe this X format is compatible with BZII, but I would like to have some other modders try it out too if possible so I can get some unbiased feedback about this discovery.
Title: Re: More questions about the X that BZII is compatible with...
Post by: BNG Da BZ Fool on April 09, 2008, 08:59:01 PM
Update, apparently while BZII can read the first object in the X format that GSL saves in it can not read any other objects attached as either a child or sibling. It basically loads the first object and igonores all other objects. Oh well back to the drawing board.
Title: Re: More questions about the X that BZII is compatible with...
Post by: Nielk1 on April 09, 2008, 09:19:29 PM
Some XSIs do that to me. See if you can find one little thing wrong with it.
Title: Re: More questions about the X that BZII is compatible with...
Post by: OvermindDL1 on April 09, 2008, 09:28:38 PM
If you send me a very basic example file (like two cubes or something), I could parse through it and see how BZ2 handles it...
(http://www.overminddl1.com/image_scripts/image_sig.php?type=ODL1signitures&image/sig.gif)
Generated by OvermindDL1's Signature Auto-Add Script (http://overminddl1.com) via GreaseMonkey (http://greasemonkey.mozdev.org/)

Title: Re: More questions about the X that BZII is compatible with...
Post by: mrtwosheds on April 09, 2008, 09:32:19 PM
That usually happens if they are not parented, In threed It will only read things parented under the top frame.
The process I use always creates un-parented frames in the .x file, this I convert with x2xsi.
Then I copy the first frame (notepad)

Frame frm-dummy {

   FrameTransformMatrix {
      1,0,0,0,
      0,1,0,0,
      0,0,1,0,
      0,0,0,1;;
   }

without its mesh. I always rename it dummy...
And paste it above itself, this makes it the top level frame, all the other frames become useable. Presumably a similar technique will work in .x format.
Title: Re: More questions about the X that BZII is compatible with...
Post by: BNG Da BZ Fool on April 09, 2008, 09:47:55 PM
Hmm, interesting. I'll try to send what you ask OM. Your email addy is hidden. How about if I upload it to File Front then you can DL it when you have the time? Here's the link to the 2 object X file. http://files.filefront.com/testxbldg01zip/;9980658;/fileinfo.html
Title: Re: More questions about the X that BZII is compatible with...
Post by: BNG Da BZ Fool on April 09, 2008, 10:21:51 PM
MTS, what if I add the dummy frame in GSL prior to saving in GSL X format. Would that work?
Title: Re: More questions about the X that BZII is compatible with...
Post by: OvermindDL1 on April 10, 2008, 12:07:18 AM
overminddl1 at my website, overminddl1.com always works, or at gmail.com, either or. :P
I will download that though.
(http://www.overminddl1.com/image_scripts/image_sig.php?type=ODL1signitures&image/sig.gif)
Generated by OvermindDL1's Signature Auto-Add Script (http://overminddl1.com) via GreaseMonkey (http://greasemonkey.mozdev.org/)

Title: Re: More questions about the X that BZII is compatible with...
Post by: mrtwosheds on April 10, 2008, 01:30:15 AM
QuoteMTS, what if I add the dummy frame in GSL prior to saving in GSL X format. Would that work?
If your conversion to .x is doing what mine does, no it wont. It will still un-parent everything.

{
Parenting in .xsi is done with these curly bracket things...

               }
            }
         }
Title: Re: More questions about the X that BZII is compatible with...
Post by: OvermindDL1 on April 10, 2008, 01:36:20 AM
Okay, first of all, sorry for the double post, but I am typing this up over probably an hour period as I go through the file and how BZ2 executes it, someone may post before me and I do not want my edit to be skipped.  Now on to the file.

First of all, the top line version "xof 0302txt 0064", only "xof 0302txt " is read, the "0064" is not, does not hurt anything, just is worthless.  Ditto with the comment (the hash(#) line), does not seem to hurt anything, but is worthless anyway.
Now, the first thing that could hurt things, the whole header section:
Header {
1;
0;
1;
}

Is *NOT* read by BZ2, and as such it is missing an entire coordinate system, looks like you need to put in an XSI version 1.0 style coordinate system like this:
CoordinateSystem {
0, line 1
0, line 2
0, line 3
0, line 4
0, line 5
0, line 6
}

Obviously do not put the "line #" in there, BZ2 will choke on that, that is just so I can describe them.  As with XSI the format is this:
If "line 1" is NOT 1 AND "line 6" is NOT 5, then flip the model on the Z-axis,
If "line 4" is 0 then flip the model on the X-axis,
Else leave the model as-is, normal XSI description.

Hmm, from what I can see, the rest of it 'looks' fine, seemed to go through it fine, you do not have any texture definitions (GSL's exporter maybe?) so there is no texture, but that is easy to fix, just add this to the bottom, but before the } of the Material definition you want it in, with the proper spacing to make it pretty of course (but not required), the file has the texture coords fine, so it looks like GSL just did not put out the texture for some reason, either way, for a .X style texture put this at the bottom of the Material section before the last brace (}) as stated:
TextureFilename {
   "myTextureName.dxt/png/whatever"
}

And that looks like it should work...

Do note, if you had your Sphere a child of the Cube or something, it isn't now, so if it was the .X exporter is probably broken in GSL too, but moving a few braces can fix that too, should not strictly be necessary as it looks like it should still appear in the right place...
(http://www.overminddl1.com/image_scripts/image_sig.php?type=ODL1signitures&image/sig.gif)
Generated by OvermindDL1's Signature Auto-Add Script (http://overminddl1.com) via GreaseMonkey (http://greasemonkey.mozdev.org/)

Title: Re: More questions about the X that BZII is compatible with...
Post by: BNG Da BZ Fool on April 12, 2008, 10:08:29 PM
Another discovery I made is that GSL is also capable of saving scenes in the X format along with the default .scn format that TS uses. Don't know is that is of any usefulness. Some utilities like 3DEX can read the file completely, but with BZ2ME only the first object is loaded. In order to see it all the objects must be attached somehow, i.e., parented, unioned, etc.

My goal, however, is to continue the search for a suitable 3d modeler that supports the BZII X format. If one exist then I'll find it and post a link on where to download it. Question, would anyone out there by chance have a sample BZII compatible X file that I could study? I would love to get my hands on a sample to examine it in notepad. Also, it would be useful to compare that with the version that GSL supports. If the 2 samples are similar enough then perhaps some editing magic could be applied to make the GSL version more compatible with the X supported by BZII. Tanks, BNG
Title: Re: More questions about the X that BZII is compatible with...
Post by: mrtwosheds on April 12, 2008, 11:26:30 PM
I just have those I created from .3ds with 3dex v155.
They are more compatable than the version saved by lithunwrap, with a bit of x2xsi and some tweaking I get them working.
You might want to try searching other site's like time disruptor for old info, seems that allot of people found different ways round the same problem.
Title: Re: More questions about the X that BZII is compatible with...
Post by: OvermindDL1 on April 13, 2008, 08:49:00 AM
.X models were a horrible format, format changed often, had no real capabilities, etc... so things tend to implement it a hundred different ways.  As stated though, BZ2 reads the .X files just like .xsi files sans the few differences I found out and listed earlier...
(http://www.overminddl1.com/image_scripts/image_sig.php?type=ODL1signitures&image/sig.gif)
Generated by OvermindDL1's Signature Auto-Add Script (http://overminddl1.com) via GreaseMonkey (http://greasemonkey.mozdev.org/)

Title: Re: More questions about the X that BZII is compatible with...
Post by: BNG Da BZ Fool on April 13, 2008, 08:57:34 PM
Tanks guys, quite a bit to chew on, but very helpful information to get a better handle on understanding how BZII likes to have things formated in the right places. Still feel that the BZII X format has some potential if a suitable 3d modeler can be foundd.

Say, I wonder if an earlier X exporter designed to work with an earlier version of Blender might do the trick? I seem to remember a site that had older versions of B3D and a number of X exporters as well...I'm off to see the wizard...the wonderful wizard of OZ.