• 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

FYI, TS based X models work in BZII with one major glitch...help!

Started by BNG Da BZ Fool, November 16, 2009, 01:32:44 PM

Previous topic - Next topic

What modeling format do you like best?

3DS
1 (33.3%)
XSI
1 (33.3%)
X
1 (33.3%)
BLEND
0 (0%)
NOT LISTED
0 (0%)

Total Members Voted: 3

BNG Da BZ Fool

...I figured a few a things out about using DirectX models straight out of the box (so to speak) for use in BZII. Initially my models were appearing and flying backwords when I placed them in the map editor. I finally  figured out why...by default TS uses the left hand coordinate system. Apparently, I was contructing my models with a right handed coordinate orientation in mind, so when I rotated the model 180 degrees and reset the rotation to 0 0 0 the model was now properly oriented for exportation using the left handed coordinate system. Now when I placed my X based models in the map editor everything was perfectly oriented.

Secondly, my hp's never worked initally because TS adds a -number to the names end cauising BZII not to read the thing correctly. I fixed this problem by renaming the ODF entry to like hp_gun_1-whatever number TS added to the objects name and wala the gun 1 icon appeared on my ship and works perfectly now! Apparently, BZII only cares that the names match between the model and ODF. I other words hp_gun_1-1 when changed in the models ODF file is the same thing as the standard hp_gun_1. Here's a zip file with the X model and ODF file http://cid-380832c976843acb.skydrive.live.com/self.aspx/BNG%5E4s%20BZII%20Models%20and%20Props%20for%20other%20BZII%20Modders/ivhawkts.zip Could someone check the model and give me a clue on what I might try?

Now for the major glitch...the BMP texture I used on the model still won't appear. Why? I used a blue and brown camo texture, but only the brown portion appears on the model. Why no blue? I believe it's a 24 bit BMP. Does BZII have problems with this type of texture file. I know that BZII prefers PIC format, but TS doesn't support it. What other formats will BZII accept? TS supports TGA, PNG, TIF, JPG, AVI, TXR, and LWI. PS: Really would apreciate some feedback as this might also lead to X animations being possible as well; still need to work on that one a bit, but theoredically it is possible if BZII can read a non-animated X model file. Tanks, 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.

Dianoga4

I use PNG on my models for BZ2 and haven't had a problem so far.

TheJamsh

Use dxtbz2 wherever possible (AND HAVE YOUR MODEL POINT TO A .DXTBZ2 TEXTURE, NOT .PIC/.PNG). dxtbz2 is the most compressed form of texture, it cannot be converted back into any other format which also prevents others from 'stealing' it. Obviously keep the original .pngs or .psd's around for future editing if you wish.

Using other supported textures is fine, but you can swap file extension in notepad, so it doesn't make any difference if your modelling program doesn't support it. (NO program supports .dxtbz2, yet some of the new stock models have that specified). If your creating .dxtbz2 and want them to be used, make sure that the model points to a .dxtbz2 texture, because as mrtwosheds says, theres no point referencing a non-existant texture. In fact it DOES cause huge problems doing so every now and again.

Next point, DO NOT change this:
weaponHard1 = "hp_gun_1-number".

CHANGE THE MODEL, ALWAYS. just rename the frames in notepad, and remove the extra number. Its really easy.

Also, remember that BZ2 doesn't support .x as well as .xsi. I would expect there to be problems using the .x format. If you cannot convert to XSI in TS, then just use that bodged old program xtoxsi if you have to.


BZII Expansion Pack Development Leader. Coming Soon.

General BlackDragon

just use bmp in TS but when you export to XSI, use xnview to convert the images to .pic format.



*****General BlackDragon*****

mrtwosheds

Quote
Now for the major glitch...the BMP texture I used on the model still won't appear. Why? I used a blue and brown camo texture, but only the brown portion appears on the model.

NOTEPAD!!!
In .x you are looking for MeshTextureCoords {

In .xsi it is called  SI_MeshTextureCoords {

I have no idea if it works without the SI_ bit on it

It is simply a list of paired coordinates, that define the UV mapping.

We are so lucky to be using a format that can be read as text. Most other formats would be very difficult to debug.

USe x2xsi its very simple, I have it if you can't find it.

Nielk1


Click on the image...

TheJamsh



BZII Expansion Pack Development Leader. Coming Soon.

Avatar

I was never able to get a textured .x object to work, period, which is sortof why I made X2XSI...  BZ2 uses .x objects for very simple things, like the 'scrap field' marker and such...  I can't remember offhand if any of the stock .x's are even textured.

It'd be nice to know if BZ2 will even show the texture for a straight .X object before spending major time on getting them to work.

-Av-

mrtwosheds


BNG Da BZ Fool

I found X2xsi does a cleaner conversion from X to XSI as it doesn't truncate the numerical entries in the text body part like Threed does. Kudos, to AV for releasing it. However, I couldn't figure out how to get textures to covert properly with X2xsi. As I recall I tried using another appy called Winmerge to combine parts of both the X2xsi and the Threed X variation files. I basically copied the texture portion and pasted that into the X2xsi file from the Threed file. I got part of an animation section to work by adding SI_ to the animation section of the X2xsi version. After a while though I ran out of ideas to try, and just sort of put things on the back burner with the whole thing.

Renaming the hp_whatever-number in the ODF file does work, otherwise, BZII would have flagged it (AV'd) or simply not allowed the hp's to work, but the missing texture part still has me baffled. For exanple, an untextured X model will indeed show the base material colors applied in TS and display them in the map editor without issue, but if a standard texture is applied then BZII can't display it properly. what I may try now that I thinke about it is apply the texture to another layer by adding it with the material editor in TS and see what happens. TS handles these type of textures by outputting it as a Procmap0.BMP which is why I don't think it will work either.

The X exporter in TS has options for exporting the mesh vertex colors along with the texture file and geometry, but when applied I don't even see the model, but it's there because I can still see the ships name tag in the map editor, but I can't get into the ship; go figure that one out? No, please try to figure that one out.

Has anyone had time to check out my X model zip file to give me some feedback? Might help if someone besides myself took a second look.

PS: I mostly still make X models in TS and converted them with Threed and Notepad to edit the Hp's and other BZII dependent frames like flame__h, etc, but I've started to play around with Blender and OM's exporter. It still has some issues with textures and animation. As far as testing is concerned I'm doing what little I understand about testing such things. Hopefully, you Blender guys can post some stuff for OM to shake his head at. I tried exporting 3ds models from TS to Blender for XSI conversion, but there's no texture on the models. In fact they look a lot like my X model they work, but still no texture. Why? Why? Why? 99 bottles of beer on the wall...99 bottles of beer..... :|
     
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.

TheJamsh

I dont understand why people are obsessed with having six decimal places AT ALL TIMES in .xsi files. Its not neccesary, and in fact, makes it easier for BZ2 to read. (Source: OvermindDL1). In fact i have a .xsi that was converted back by his MSH to XSI program, and there are no digits to six decimal places unless they need to be.

Oh and just re-name the hardpoints. Notepad makes it easy. You are very likely going to find problems with this at some point down the line, ESPECIALLY with turret hardpoints. Remember that BZ2's code is NOT flexible when i comes to things like this (and why should it be? If one method works why program in safety code for another?)

Just import a .3ds file into 3DS max, then export so that 3DExploration can convert it. (Why no one has made an xsi exporter for this i do not know.)


BZII Expansion Pack Development Leader. Coming Soon.

mrtwosheds

If I convert the ivhawkts.x with x2xsi, I can open it in threed if a texture is not present in that folder.
If a texture is present threed locks up.
I cannot convert your .x files to working .xsi

The material entry's look all wrong.

This is a working SI_material entry from one of my plants, compare this to one of yours, and you can see a whole bunch of stuff is missing.

SI_Material {
           0.500000;0.700000;0.500000;1.000000;;
           0.000000;
           0.00000;0.00000;0.00000;;
           0.000000;0.000000;0.000000;;
           2;
           0.500000;0.500000;0.500000;;

           SI_Texture2D {
"leafplnt.dxtbz2";
              3;
              256;256;
              0;255;0;255;
              0;
              1;1;
              0;0;
              1.000000;1.000000;
              0.000000;0.000000;
              0.944739,0.327825,0.000000,0.000000,
              -0.327825,0.944739,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;
}
}
}

The version of .x exported by 3dexploration 1.5.50 produces .x that can be converted to working .xsi with x2xsi, I assume TS uses a newer version of .x and the data set it outputs is different.
EDIT
I just noticed that my own (3dex) .x also has that data missing, so that cannot be what's wrong...hmmm
when I converted ivhawkts to xsi it did not get the data seen above under the "leafplnt.dxtbz2"; texture entry.

Viewed in 3dex ivhawkts.x has a texture ivhawkts.xsi does not...

If TS exports .3ds try converting that to .x with 3dex and then to .xsi with x2xsi.
Copy/paste animations from the TS .x to the .xsi

BNG Da BZ Fool

It's got be the an X version issue/conflict then. I have used the X converter that 3dex writes out. Also, remember that I'm using the right hand coordinate system when exporting and not the default left hand system TS uses by default.

I know it's all a bit confusing, but I only recently discovered that the top view in TS given the 3d axis are displayed in the lower right hand corner of the modeler workspace is the actual point where the coordinate system is referenced on. This is why my models appeared backwords in game, because, I was orienting and building models with the front of the model at the top portion of the workspace; in essences 180 degree off the true left handed coordinate system itself.

Like I've said so many times in the past I am indeed a true modeling idiot for the most part, but everyday I learn a bit more about how 3d modeling works in general. I have several different 3d modelers all of which seem to support various versions of the DirectX format. They include TS 3.2, Gamespace Lite, TS 7.6; it has 2 X versions, Blender, and GMAX via an MDL plugin. Oh, and as you've mentioned 3dex has it's own version as well.

BZII, at least in part supports some version of DirectX as the game itself was originally designed to run under some past version of DirectX as well. What really confuses me is that X model support is/was not better optimized from the beginning or subsequent releases of BZII public betas. Perhaps, that could be considered in future releases as the old SI XSI format is all but dead now.

How hard would it be to enhance support for DirectX models as far as BZII is concerned? If not X then some other model format like the current SI XSI format or perhaps a popular one like 3ds? Can it be adapted as a addon to future releases of public beta's? 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.

mrtwosheds

My last post above is a bit confused, and inconclusive, not sure it is the .x format at all, the coordinate system should be irrelevant to this.
The model (with texture) crashes threed, this is a fairly good indicator that bz2 will also have problems with it too.

The header             SI_Texture2D {
Is missing after conversion with x2xsi.

Ok. I make a .3ds and convert to .x (with 3dex 1.5.50) this produces headers in this order.

Frame
Mesh
MeshMaterialList
Material
MeshTextureCoords
MeshNormals

Your .x has headers in this order
Frame
Mesh
MeshNormals
MeshTextureCoords
MeshMaterialList
Material

x2xsi cannot convert this order correctly, and neither can bz2, I assume.





QuoteHow hard would it be to enhance support for DirectX models as far as BZII is concerned?
Probably impossible.

mrtwosheds

So it is probably the version of .x that TS uses that is not compatible with bz2.
can TS save as .3ds?