• Welcome to Battlezone Universe.
 

News:

Welcome to the BZU Archive dated December 24, 2009. Topics and posts are in read-only mode. Those with accounts will be able to login and browse anything the account had access granted to at the time. No changes to permissions will be made to be given access to particular content. If you have any questions, please reach out to squirrelof09/Rapazzini.

Main Menu

More questions about the X that BZII is compatible with...

Started by BNG Da BZ Fool, April 06, 2008, 05:43:22 PM

Previous topic - Next topic

BNG Da BZ Fool

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.
When I'm not in hot water with the community I'm usually making models for BZII. I've made a few models for other peeps. BNG.

mrtwosheds

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.

BNG Da BZ Fool

#2
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.
When I'm not in hot water with the community I'm usually making models for BZII. I've made a few models for other peeps. BNG.

mrtwosheds

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.

BNG Da BZ Fool

#4
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
When I'm not in hot water with the community I'm usually making models for BZII. I've made a few models for other peeps. BNG.

mrtwosheds

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?

OvermindDL1


BNG Da BZ Fool

#7
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.
When I'm not in hot water with the community I'm usually making models for BZII. I've made a few models for other peeps. BNG.

BNG Da BZ Fool

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.
When I'm not in hot water with the community I'm usually making models for BZII. I've made a few models for other peeps. BNG.

Nielk1

Some XSIs do that to me. See if you can find one little thing wrong with it.

Click on the image...

OvermindDL1

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...

Generated by OvermindDL1's Signature Auto-Add Script via GreaseMonkey


mrtwosheds

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.

BNG Da BZ Fool

#12
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
When I'm not in hot water with the community I'm usually making models for BZII. I've made a few models for other peeps. BNG.

BNG Da BZ Fool

MTS, what if I add the dummy frame in GSL prior to saving in GSL X format. Would that work?
When I'm not in hot water with the community I'm usually making models for BZII. I've made a few models for other peeps. BNG.

OvermindDL1

overminddl1 at my website, overminddl1.com always works, or at gmail.com, either or. :P
I will download that though.

Generated by OvermindDL1's Signature Auto-Add Script via GreaseMonkey