• 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

X2XSI problems

Started by TheJamsh, December 04, 2007, 03:42:01 AM

Previous topic - Next topic

mrtwosheds

#30
Generally I find 3dex gives a very good indication of what it will do in bz2. what is it? a power gen loop sounds easy to me.

Avatar

Quote from: BNG Da BZ Fool on January 03, 2008, 12:10:03 PM
X2XSI also behaves differently between win xp and win me as does GSL between the 2 different os's. On win me the X files from GSL animate in 3DEX just fine, but on win xp there's no animation visible even though the play controls in 3DEX appear to function without error. What's even stranger yet is that X2XSI yields a runtime 53 file not found error under win me, but none when run under win xp. Why?

My guess is that it's the VB runtime...  XP's is more modern...  X2XSI was created in Visual Basic 5 so, by current standards, it's ancient.

-Av-

BNG Da BZ Fool

I knew there was a difference just by the way each handled the 3 different utilities. The ME created files must get handled better then the way the XP versions are handled by their respective OS's. I suspect that the ME handled GSL does the same thing in terms of creating the right X file for 3DEX to manipulate their animation information as well. On the other hand, X2XSI appears to be adversely affect by the influences of ME's OS; yielding a runtime error when X files are processed for conversion to XSI. The workaround for me has been to create X to XSI files using X2XSI under the XP OS from animated X files created with GSL under the ME OS. Basically, I think that X2XSI is a fine utility and can be used to convert static X files to XSI better then BZ2ME. Has anyone ever looked at the source code for X2XSI? It does a good job of reformatting the file contents from one format to the other and even seems to do a fair job of preserving the animationset info, or is that just added by X2XSI to X converted files by default? If it isn't then that would translate in to something like X2XSI does attempt to convert that info too when it converts the files to XSI. One note that I might add also is that 3DEX does attempt to play the XSI files as I do notice them flickering when the play button is activated but no animation is visually present. I still need to compare the converted XSI files with the known working XS I's in the XSI data pack and try to discern any apparent difference in the layout of 2 XSI files compared side by side in notepad.

PS: I've decided to learn python in an effort to use it to create some XSI file conversion scripts and other BZII related goodies. Although, I don't expect any break th roughs for quite some time as from what I've read about python; it can be learned over time. I'm also searching the web for existing scripts. I found a few for Truespace developed as plug ins which I already installed and have been playing around with in TS. I understand OM's B3d script for XSI is a python script as well. My objective for 2008 is to develop an export script for TS that can export the XSI animation format that BZII uses. No easy task but well worth the effort if something useful results. EOM
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.

Avatar

Under XP you can create a shortcut to a program, and then call up the properties sheet to access a 'compatability' tab.  On that tab you can tell XP to run the program as if it were Windows 95, 98, etc., along with setting a few other choices like system colors, etc..

This will often make an older program work a little more like it should, although in the case of X2XSI I doubt it'll do much.

-Av-

BNG Da BZ Fool

Whoops! Apparently I made a boo-boo on ME by not copying all the files in the zip and once I downloaded X2XSI from BZSCRAP again and unzipped to my Gamespace directory it started to work again. OBTW, the animation data was also added to the X file converted to XSI exactly as that from the the original X file. Unfortunately, there's no actual animation motion present in the XSI version, but 3DEX still goes through the motions of trying to play it, but to no avail. Still, it's a good alternative to using only BZ2ME; which is still somewhat useful as well. 
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

Quotethe animation data was also added to the X file converted to XSI exactly as that from the the original X file. Unfortunately, there's no actual animation motion present in the XSI version,
Could you paste a sample of the xsi anim here?

BNG Da BZ Fool

Here's the original animated X section

AnimationSet NoName {
   Animation Animation0 {
      {CubeMesh-0}
      AnimationKey {
         2;
         2;
         0; 3; 0.000000, 0.000000, 0.000000;;,
         10; 3; -2.877881, 0.000000, 0.000000;;;
      }
      AnimationKey {
         0;
         2;
         0; 4; 1.000000, 0.000000, 0.000000, 0.000000;;,
         10; 4; 1.000000, 0.000000, 0.000000, 0.000000;;;
      }
      AnimationOptions {
         0;
         0;
      }
   }
}

Here's the animated section from the X2XSI created XSI version

AnimationSet NoName {
   Animation Animation0 {
      {CubeMesh-0}
      AnimationKey {
         2;
         2;
         0; 3; 0.000000, 0.000000, 0.000000;;,
         10; 3; -2.877881, 0.000000, 0.000000;;;
      }
      AnimationKey {
         0;
         2;
         0; 4; 1.000000, 0.000000, 0.000000, 0.000000;;,
         10; 4; 1.000000, 0.000000, 0.000000, 0.000000;;;
      }
      AnimationOptions {
         0;
         0;
      }
   }
}

It's somewhat astounding how much the GSL created X version resembles to that of the XSI format that BZII supports. BNG.
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.

Avatar

Um...not really.

'X' is direct x.
'XSI' is direct x "Soft Image" style...  see?  XSI = "X, Soft Image"

The formats are the same if you take into account the extra things that Soft Image added to support their own items.

That's why X2XSI works, because at the time it was made the text version of a regular .X file was virtually identical to the text version of a .XSI file.

X2XSI was created before Pandemic released the exporter for Max, so doing animations was still a far off dream...

-Av-

mrtwosheds

#38
AnimationSet NoName {   // NoName not required, may not be a problem.
   Animation Animation0 { // wrong name should be// Animation Anim-CubeMesh-0
      {CubeMesh-0}
      AnimationKey {
         2;
         2;
         0; 3; 0.000000, 0.000000, 0.000000;;,
         10; 3; -2.877881, 0.000000, 0.000000;;;
      }
      AnimationKey {
         0;
         2;
         0; 4; 1.000000, 0.000000, 0.000000, 0.000000;;,
         10; 4; 1.000000, 0.000000, 0.000000, 0.000000;;;
      }
      AnimationOptions { //unknown delete
         0;
         0;
      }
   }
}
---------------------------------------
This should work, maybe the second animation key (rotation) might misbehave, I allways try to do one or the other t keep it simple. Its not doing anything here.
AnimationSet  {   
   Animation Anim-CubeMesh-0
      {CubeMesh-0}
      AnimationKey {
         2;
         2;
         0; 3; 0.000000, 0.000000, 0.000000;;,
         10; 3; -2.877881, 0.000000, 0.000000;;;
      }
      AnimationKey {
         0;
         2;
         0; 4; 1.000000, 0.000000, 0.000000, 0.000000;;,
         10; 4; 1.000000, 0.000000, 0.000000, 0.000000;;;
      }
   }
}
--------------------------------------
AnimationSet  {   
   Animation Anim-CubeMesh-0
      {CubeMesh-0}
      AnimationKey {
         2;
         2;
         0; 3; 0.000000, 0.000000, 0.000000;;,
         10; 3; -2.877881, 0.000000, 0.000000;;;
      }
   }
}
this will do the same as above.//you cannot put comments like this in .xsi  :-D

BNG Da BZ Fool

Tanks MTS I'll try to edit the changes and see what results in 3DEX. I'm doing my best to get a better understanding of the way data things are entered and formatted as I realize that it makes a significant difference and problems result when data is not assembled the way another application expects to see the data and act on it. It seems like my thoughts lately are focused on the mechanics of data sets and how they are put together especially in regards to learning to script with python as it seems like a logical tool to create a file conversion utility. Does anyone know where I might obtain a copy of the original SDK for the BZII version of Softimage XSI. That would assist me in defining the proper format parameters for a python based conversion script. Python, sounds more or less like a utility where the script maker defines things beforehand and then adds how the things are acted upon in subsequent entries leading to a final result and output afterwords to some other thing like say a converted file. BZII, or some processes it uses also seems to use python as well as I've noticed several .PY files in the root directory. I would imagine that it could be useful for creating mission files for the game, but I don't really understand it yet; just seems logical that it might be useful for BZII.
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

#40
I can give pretty detailed information on reading xsi 1.0/1.1 files, including a few off things BZ2 does different from the actual specifications.  Get me on IM if you need anything, even if I am marked as 'Away', I may still be here, just send a message, I will message back when I get around, or get on my TeamSpeak server.

I have also already made a BZ2 mission scriptor using Python that fully supports multiplayer.  It is a slightly different python dialect, well, same language, just with a few additions, it uses a concept of micro-tasklets so you can write things kinda like this pseudo-code:
from BZ2 import *

def victoryCondition(recy):
    teamNum = recy.GetTeamNum()
    while recy:
        Sleep(10) # Sleeping for ten ticks, which in BZ2 is 1 second
    SetWinningTeam(teamNum) # SetWinningTeam is not something I made, but something you should make to define the winning team, you know, setting end-game message, saying they one, slaughering the loser, etc...

class MyMission(Mission):
    def AddObject(self, o):
        if o.GetOBJInfo(Get_GOClass) == "CLASS_RECYCLER":
            self.new(victoryCondition, o)

This is just a simple example.  Essentially, as soon as any recycler type object is created then a new little tasklet will be created that will test, once a second, if that recycler object is still alive, as soon as any of them die then the function SetWinningTeam (which you would define as stated) is called with the team number of the recycler that died.  Your mission script, instead of being one massive chunk of code where you have to remember to call checks and other such thing, just make tiny little one-off tasklets that only do a specified purpose, like the above (or you could do what you do in C++ or BSer's scriptor and just make one massive chunk of everything, the nice thing about this is you can package up common functions into your own little libraries and let different scripts use those so things like, in BZC where it has DLL specific functions that are the same on all missions, but each mission could be made with only the mission stuff where all the BZC stuff could be in its own library shared by all).

I've also intended to make a decorator so you could get rid of the New line and put it in the function declaration itself, to make the above this:
from BZ2 import *

@AlwaysNewTasklet
def victoryCondition(recy):
    teamNum = recy.GetTeamNum()
    while recy:
        Sleep(10) # Sleeping for ten ticks, which in BZ2 is 1 second
    SetWinningTeam(teamNum) # SetWinningTeam is not something I made, but something you should make to define the winning team, you know, setting end-game message, saying they one, slaughering the loser, etc...

class MyMission(Mission):
    def AddObject(self, o):
        if o.GetOBJInfo(Get_GOClass) == "CLASS_RECYCLER":
            victoryCondition(o)

Good if a function should always only be called as a new tasklet, to help make sure you will not forget, and it is still okay to new it with no adverse effects as originally, just means that it will *always* be a new tasklet, no matter how it is called.

BNG Da BZ Fool

Tanks OM, as I get more of a handle on how python works and start to experiment with some test scripts I appreciate your willingness to answer questions as I learn more about scripting with python. I'm scouring the web for info relating to writing conversion scripts and studying the contents of those I find to get a clue on what I'm attempting to learn/do...BNG
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.

Avatar

*slap*

There's the guy to ask, straight out...

OM, any chance you could do a new converter that does what X2XSI tried to do?  Convert .x to .xsi with the animations intact?

-Av-

OvermindDL1

What exactly needs to be converted (and what else needs to be converted that yours does not do)?

mrtwosheds

QuoteConvert .x to .xsi with the animations intact?
As far as I can see "the Animation" is intact, it is simply not applied to anything in the resulting .xsi model due to it being called
AnimationSet NoName {
   Animation Animation0 {

Of course more complex animations may come out with more differences.