Getting Models Into the Game

Moderators: GSH, VSMIT, Red Devil, Commando

User avatar
Clavin12
Bull Dog
Posts: 676
Joined: Fri Feb 25, 2011 4:50 pm
Location: The Deep(ish) South

Re: Getting Models Into the Game

Post by Clavin12 »

Mr. Twosheds, I wonder if when you get the chance you could take a look at it. Here's the link: http://dl.dropbox.com/u/15480374/Media% ... _craft.xsi

and for the odf
http://dl.dropbox.com/u/15480374/Media% ... _craft.odf
User avatar
Zax
Attila
Posts: 1388
Joined: Sat Feb 19, 2011 6:56 am

Re: Getting Models Into the Game

Post by Zax »

Clavin12 wrote:Mr. Twosheds, I wonder if when you get the chance you could take a look at it. Here's the link: http://dl.dropbox.com/u/15480374/Media% ... _craft.xsi

and for the odf
http://dl.dropbox.com/u/15480374/Media% ... _craft.odf
Everything in BZ2 is framed. That is how the XSI format works, so that is not the issue.
User avatar
MrTwosheds
Recycler
Posts: 3059
Joined: Sat Feb 19, 2011 8:37 am
Location: Outer Space
Contact:

Re: Getting Models Into the Game

Post by MrTwosheds »

This is a FrameTransformMatrix

Frame HP_CANNON {
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,0.000000,0.000000,1.000000;;
}

every object in an xsi has one, it defines its position and rotation. below it is a Mesh, this creates the geometry you see.
FrameTransformMatrix defines an hp_ the mesh is irrelevant.
All of the FrameTransformMatrix in your model state in the last line 0.000000,0.000000,0.000000,1.000000;; which means they are all at the same point (the pivot point 0 0 0)

In Max there is a way to set pivot points, but I don' see much point in using it for hp_s as they are really simple to move in the xsi.

Using Threed as a viewer ONLY! and notepad2 to save set up your hp_s in the xsi like this.

Frame HP_CANNON {
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,
-1.000000,0.500000,0.250000,1.000000;;
}
Moves hp_cannon left 1, up 0.5 and forward 0.25.


In MY opinion trying to set up hp_s in a modeling program is just a way to make things much more complex than they need to be. Get the visual parts of the model perfected there, hp_s are better tweaked in the exported xsi.

Also your model has no SI_MeshTextureCoords section so you will never see a texture on it as it is. (UV mapping!)
User avatar
Clavin12
Bull Dog
Posts: 676
Joined: Fri Feb 25, 2011 4:50 pm
Location: The Deep(ish) South

Re: Getting Models Into the Game

Post by Clavin12 »

I wasn't concerned about the texture yet.
User avatar
Clavin12
Bull Dog
Posts: 676
Joined: Fri Feb 25, 2011 4:50 pm
Location: The Deep(ish) South

Re: Getting Models Into the Game

Post by Clavin12 »

Yes! It is working. Also, I got the service bay into the game and it works like a service bay should. I noticed that the isdf buildings will snap to a grid but my building won't. Why is this?
User avatar
Zax
Attila
Posts: 1388
Joined: Sat Feb 19, 2011 6:56 am

Re: Getting Models Into the Game

Post by Zax »

Clavin12 wrote:Yes! It is working. Also, I got the service bay into the game and it works like a service bay should. I noticed that the isdf buildings will snap to a grid but my building won't. Why is this?
Welcome to the exciting world of base plate hell.
User avatar
MrTwosheds
Recycler
Posts: 3059
Joined: Sat Feb 19, 2011 8:37 am
Location: Outer Space
Contact:

Re: Getting Models Into the Game

Post by MrTwosheds »

I wasn't concerned about the texture yet.
My point is that you have no way to add texture coordinates to the XSI after conversion, no point rigging up the hp_s on a model that cannot have a texture. (unless your a real cutnpaste fan like me :)

Building base plates need a terrain__h frame, It must be made up of squares exactly 8.000000 (around the edges)
The height of these vertex is also important, for flat 0.000000 is right, 0.000001 is not.

The easy way to do this is nick one from a stock building and paste it (notepad2) as the first frame of the xsi. Might need to add a } at the end of the file.

If you don't want a base plate to be flat, then height values around the edges will only become seamless at *.000000 or *.500000,
This is something to do with the bz2 engine, it took me along time to figure it out.
3ds max seems to be useless at this sort of accuracy, how is blender?
Last edited by MrTwosheds on Sun Mar 13, 2011 11:36 pm, edited 1 time in total.
User avatar
Clavin12
Bull Dog
Posts: 676
Joined: Fri Feb 25, 2011 4:50 pm
Location: The Deep(ish) South

Re: Getting Models Into the Game

Post by Clavin12 »

Ok, thanks. I've been experimenting in notepad and am starting to get the hang of it. If I wanted to add texture coordinates I could paste them in from a version exported with the UV mapping done, or I could paste the HPs into the one with texture coordinates, right?
User avatar
MrTwosheds
Recycler
Posts: 3059
Joined: Sat Feb 19, 2011 8:37 am
Location: Outer Space
Contact:

Re: Getting Models Into the Game

Post by MrTwosheds »

Clavin12 wrote:Ok, thanks. I've been experimenting in notepad and am starting to get the hang of it. If I wanted to add texture coordinates I could paste them in from a version exported with the UV mapping done, or I could paste the HPs into the one with texture coordinates, right?
Right :) doing the hp_s would be easier.
M4BHoward
Sober Scav
Posts: 21
Joined: Thu Mar 17, 2011 3:14 am

Re: Getting Models Into the Game

Post by M4BHoward »

Clavin12 wrote: I've tried exporting from blender in 3ds, obj, and x, and used 3dex and x2xsi to convert to xsi...
There is an exporting script for blender (BZ2Exporter242.py,) that has served me fairly well in the past. It was originally written for blender version 2.42, but it seems to work with 2.49.

It REALLY simplifies the process of exporting (you just pick the script, and out comes a working BZ2 model! :D) All you have to do is put the .py file in [root]/blender/.blender/scripts/ , and it will work.

Here is the file location:---------> http://www.overminddl1.com/forum/index. ... attach=392

Original post at which I found it:---------->http://www.bz2md.com/smf/index.php?topic=3118.0

I have not yet figured out how to stick textures on my models with blender (UV mapping and all that,) but this is probably due to my noobishness, and not a problem with the exporter.

If anyone has the knowledge (and the time) to write a blurb about texturing with blender, I'd LOVE to learn! :)
VSMIT
Sabre
Posts: 479
Joined: Fri Feb 18, 2011 5:50 pm

Re: Getting Models Into the Game

Post by VSMIT »

User avatar
Dianoga
Rattler
Posts: 56
Joined: Sat Feb 26, 2011 1:00 am

Re: Getting Models Into the Game

Post by Dianoga »

That was always the problem with the Blender exporter. It worked great for getting an untextured model into the editor but I could never get a uv mapped model to show the texture. Apparently Overmind got it to work but after asking a few times I never got an explanation as to how. I make all my models in Blender and uv map them in Blender as well and then export them and import them into 3ds max r3 and use that exporter only because I could never get the texture to show up with the Blender exporter. If someone knows how to get that to work please share, I would really like to know if it does actually work.
User avatar
Clavin12
Bull Dog
Posts: 676
Joined: Fri Feb 25, 2011 4:50 pm
Location: The Deep(ish) South

Re: Getting Models Into the Game

Post by Clavin12 »

Ok I've encountered another problem. I'm trying to import my factory but the game crashes and gives me an error saying that it cannot find the binary mesh.
Feenix

Re: Getting Models Into the Game

Post by Feenix »

Clavin12 wrote:It'd be nice if one of you could explain your importing process.
I'm not sure why but Blender screws up my imported X models exported from Truespace. 3DEX, has problems with some newer versions of X. I had to add a top level frame with the GMAX MDL/X exporter to get them to convert to XSI.

Do your models have a texture if not try applying a stock B3D texture and reexport them again. I was having problems at one point on models that didn't have a texture applied prior to exporting; also on models with no UV mapping applied.

Also, look at the other model formats that both Blender and 3DEX supports and try exporting a simple textured cube primitive object and test convert them all with 3DEX to XSI. I've had some success with Truespace exported 3DS, ASC, COB, SCN, and of course my favorite X. OBJ, won't work on BZII models with more then one part as it destroys the H. Tree structure and combines all the parts into a single object.

I have some sample X models posted on my modeling forum that you can download to compare to your Blender equivilent X models maybe that might help you determine why your X models won't convert to XSI. I can also take a look at some of your models in 3DS, and X format in TS to see if I notice anything odd with them.

Oh, and try going into the 3DEX XSI export settings and make sure the Save Normals box is checked too.
User avatar
MrTwosheds
Recycler
Posts: 3059
Joined: Sat Feb 19, 2011 8:37 am
Location: Outer Space
Contact:

Re: Getting Models Into the Game

Post by MrTwosheds »

Ok I've encountered another problem. I'm trying to import my factory but the game crashes and gives me an error saying that it cannot find the binary mesh.
It is supposed to say it cannot find the binary msh (because it does not yet exist) then it looks for the xsi to make one.

The bz2 editor crashes if the xsi is incomplete or broken in some way and is not readable by bz2, this could be anything from simply lacking the correct parenting structure, the curly brackets {} They are important. Or having a , instead of a. Or having been daft enough to try saving it with threed, which of course has then actually eaten most of the file...

This is not a bz2 bug, it is a regular consequence of not using the correct tools to create xsi. Use NotePad to debug... :?
Post Reply