How to use Blender to make SWBF series models (FAQ)

How to create models in XSI and other 3D applications and make them work in Battlefront 1 & 2. Post models, tips for application usage and share anything XSI, 3DMax, SketchUp, etc.

Moderator: Moderators

Command Sergeant Major
User avatar
Posts: 294
Joined: Sun Mar 01, 2009 4:34 am
Projects :: AotC DoW+++Boonta Eve Classic
Games I'm Playing :: WoT MBWBVC Robocraft
xbox live or psn: No gamertag set

How to use Blender to make SWBF series models (FAQ)

Postby Jaspo » Thu Mar 05, 2009 12:21 am

All of my custom map assets are made and UV map textured in Blender, exported as VRML97, converted to MSH with the MSH viewer, hooked up with an odf file, and brought into ZE to join the party.

It works absolutely awesomely for props and buildings, but I don't think it is possible to attach hard points or do animations with it, though I've never tried, so I can't guarantee that it can't.

Edit: Added a Tutorial Video:
http://starwarsbattlefront.filefront.com/file/Blender_3D_to_SWBF_tutorial_video;116011

Edit 2: While working on a Death Star map that tweaks a lot of stock models, I discovered the following:
Discovered that when you import a formerly-msh-but-converted-to-wrl-with-swbfviewer file into blender, it assigns each texture to a new material, which means you have to go through the whole material list and select the "texface" button for each, or they won't show up when you export as vrml.
Also, objects with no sides visible will not be selected if you box select (press B and drag mouse)...so if you have a room with a flat ceiling which is a seperate object and you try to select the whole room when in top view (orthographic), the ceiling won't be selected.

Useful things to know:

-press b once before trying to box select.

-press a to select/deselect all.

-press f with 3 vertices selected to create a new face between them.

-hold shift to be more precise with movement, or ctrl to snap to grid or by 5 degrees when rotating.

-rotate, etc, the view using the middle mouse button and pan with mmb+shift.

-r,s,and g are shortcuts for rotating, scaling, and moving whatever is selected (in both object and edit mode).

-otherwise these options are on the bar on the bottom of the main window where the white hand icon is.

-next to that you can change whether you are manipulating the object based on global positioning, local positioning, etc.

-you need to be in edit mode to edit verticies of individual objects.

-next to the mode menu is the draw type menu. You must have it set to "textured" to see your textures. Setting it to "wireframe" is useful for seeing objects behind other objects, and seeing if they are selected or not.

-right click to select single vertices, and hold shift to select more than one at a time, but use the left button when box selecting with "b".

-you must UV map textures, rather than simply applying them, if you want them to carry over into VRML format.

-you DON'T need to mark seams before UV mapping. However, marking seams gives you more control over how the texture gets mapped. If there's a part of the model with multiple faces on a part that is supposed to have just one texture applied evenly over it, though, you can just select a connected path of vertices around that section and mark them as a seam, and those faces will then remain together in the UV editor when you map them using some of the available mapping methods.

-you need to select what you want to UV map before you can map it.

-after UV mapping, in the UV editor you will see whatever you have selected in the model window. In the UV window you can select various parts of the selection to move around on the image as needed. In the menu on the bottom of the window you can also go image>open to change the texture for the faces visible.

-it is possible to add more than one texture to an object--just select only the faces you want the texture to be on before applying it.

-right click on the edge of a window in blender to split it into 2 windows.

-switch views from the view menu.

-switch the function of the window in the box near this menu--necessary for opening the UV editor.

-all images that aren't battlefront-compatible targa files will be resized to 256X256 by the MSH viewer...and I can't seem to save them as the right format in either Photoshop or the GIMP--so plan accordingly. EDIT: not sure if this is completely accurate.

-in object mode there are menu options for showing and hiding objects (very useful).

-in edit mode a lot of the manipulation options are in the mesh menu--especially note the section with normals, faces, edges, vertices...

-...and below that more useful options, including duplicate and extrude...extruding creates a set of faces coming from whatever vertices are selected. If you click duplicate and then right click it will place the duplicate in the same location as the original.

-and below that is UV unwrap; cube projection typically works the best. Convert quads to triangles first (in the menu-under faces) to avoid texture distortion.

-flipping normals determines which direction the faces are facing--so if you are doing an indoor model you'll want to flip its normals.

-when extruding or extending use the views to your advantage to get it to go straight...if you are in top-down view it will not change position along the y axis, for example. Also select whichever arrow on the widget is facing the direction you want to go, rather than the whole thing. If an object has been rotated so that it isn't globally aligned anymore, switch to local positioning.

-don't put faces inside objects...all you will do is crash the MSH viewer (the "blah blah blah out of bounds blah blah blah exception not handled blah blah blah" error)

-join objects before exporting as VRML, otherwise it won't work (will also crash the MSH viewer)...export one object at a time, and make sure you don't have lights and cameras and such selected...hit A to unselect all and then select your object. Don't save your blend file after joining your objects though if you want to still have the option of editing them easily in the future.

-place your objects near the center of the workspace (where the grid lines converge) since this is the point that is used as the origin.

-after you export as VRML97, open the MSH viewer and drag the resulting .wrl file into the blue area. Go to save as and choose your world1 folder as the destination. After doing this, copy an existing building .odf file and name it the same thing as your new .msh file.
Open it and name these two lines the name of your .msh as well:

[GameObjectClass]
ClassLabel = "building"
GeometryName = "ISDtunnelarch1.msh"

[Properties]
GeometryName = "ISDtunnelarch1"
FoleyFXGroup = "metal_foley"


-note that the FoleyFXGroup refers to the sounds objects will make when colliding with the object. This can be changed, for example, to "stone_foley" instead. Make sure not to use curly quotes in the .odf. The ClassLabel can be changed to "prop" for props. Check elsewhere on Gametoast for further .odf information. This is all you need in the file for basic models, though.

There. NOW you can jump right into using blender for SWBF series modding (unless I missed something vital which you can't figure out on your own)
Last edited by Jaspo on Sun Sep 12, 2010 11:20 am, edited 5 times in total.

Field Commander
User avatar
Posts: 943
Joined: Thu Jan 24, 2008 12:41 am
Location: The Flatlands of Canada
Projects :: Engineering Degree

Re: How to use Blender to make SWBF series models

Postby jedimoose32 » Thu Mar 05, 2009 1:05 am

By MSH viewer, what exactly do you mean? There must be a dozen such things. Perhaps a link to the program that you mean, please?

Anyways, THANK YOU THANK YOU THANK YOU!! :runaway: :runaway:
Do you know if skeleton/animation export is possible through this method?

EDIT: Oops. Sorry, didn't see that part the first time through. :oops:

Command Sergeant Major
User avatar
Posts: 294
Joined: Sun Mar 01, 2009 4:34 am
Projects :: AotC DoW+++Boonta Eve Classic
Games I'm Playing :: WoT MBWBVC Robocraft
xbox live or psn: No gamertag set

Re: How to use Blender to make SWBF series models

Postby Jaspo » Thu Mar 05, 2009 3:01 am

Here's the MSH viewer:
http://sites.google.com/site/swbfmodding/swbf-tools

And Blender can definitely do animations, I just have no idea if they work in Battlefront at all.

BTW:

I found out how to add the glow effect to textures:

When hex-editing, find where it has ATRB and then edit the...box thing...5 spaces from it. Change it to 02.
so, after the ATRB will be 04 00 00 00 02 00 00 00.
The amount and color of the glow is apparently dependent on the tint and color of the texture.
Also for the flashing door lights on capital ships it's 04 00 00 00 00 19 c2 19. This doesn't glow though.
I haven't tried 04 00 00 00 02 19 c2 19 on a texture but this probably would make a flashing light. I could be wrong.

Master of the Force
User avatar
Posts: 6069
Joined: Wed Sep 27, 2006 11:05 am
Location: Duckburg, Germany

Re: How to use Blender to make SWBF series models

Postby DarthD.U.C.K. » Thu Mar 05, 2009 3:45 pm

im shure you cant make anims or envelopes with blender and export them to battlefront, that has to be done with the pademictool addon for xsi

Lieutenant General
User avatar
Posts: 688
Joined: Sun Apr 13, 2008 1:39 pm
Location: UK

Re: How to use Blender to make SWBF series models

Postby theultimat » Thu Mar 05, 2009 3:52 pm

You can envelop bones, and create anims etc. in Blender, but I don't think you can export them correctly, as D.U.C.K. says.

Master of the Force
User avatar
Posts: 6069
Joined: Wed Sep 27, 2006 11:05 am
Location: Duckburg, Germany

Re: How to use Blender to make SWBF series models

Postby DarthD.U.C.K. » Thu Mar 05, 2009 3:59 pm

thats what i meant

Lieutenant General
User avatar
Posts: 688
Joined: Sun Apr 13, 2008 1:39 pm
Location: UK

Re: How to use Blender to make SWBF series models

Postby theultimat » Thu Mar 05, 2009 4:02 pm

DarthD.U.C.K. wrote:thats what i meant


Ah..sorry... :oops:
There goes me trying to be clever again... :wink:

Master of the Force
User avatar
Posts: 6069
Joined: Wed Sep 27, 2006 11:05 am
Location: Duckburg, Germany

Re: How to use Blender to make SWBF series models

Postby DarthD.U.C.K. » Thu Mar 05, 2009 4:04 pm

no problem, i could be understandet this way too...
but back on topic

Major
User avatar
Posts: 513
Joined: Mon Sep 17, 2007 7:46 pm

Re: How to use Blender to make SWBF series models

Postby ryukaji » Thu Mar 05, 2009 4:53 pm

I was thinking posting this to share it but you beat me to it...

Jaspo wrote:It works absolutely awesomely for props and buildings, but I don't think it is possible to attach hard points or do animations with it, though I've never tried, so I can't guarantee that it can't.

-you need to mark seams before UV mapping.

-all images that aren't battlefront-compatible targa files will be resized to 256X256 by the MSH viewer...and I can't seem to save them as the right format in either Photoshop or the GIMP--so plan accordingly.


I have tried using hardpoints and it does not work so I use XSI as a second step when making weapons. I havent tried animations either but I highly doubt it would work.

What is marking seams I have been using blender for quite some time and I havent heard of marking seams before...and all my models work anyways.

GIMP needs compression turned off, and photoshop works just fine. I always replace the rescaled textures with the original .tga so that it stays quality.
Also they have to be power of two (ex: 256x512 512x512 )


Right now im trying to figure out how to make invisible faces working so I can make collision for stairs, anyone know how to get invisible collision from blender to ingame?

Jedi Admin
User avatar
Posts: 7420
Joined: Mon Aug 21, 2006 11:03 pm

Re: How to use Blender to make SWBF series models

Postby Maveritchell » Thu Mar 05, 2009 6:03 pm

ryukaji wrote:Right now im trying to figure out how to make invisible faces working so I can make collision for stairs, anyone know how to get invisible collision from blender to ingame?

You can always make a second, invisible model.

Major
User avatar
Posts: 513
Joined: Mon Sep 17, 2007 7:46 pm

Re: How to use Blender to make SWBF series models

Postby ryukaji » Thu Mar 05, 2009 6:05 pm

Maveritchell wrote:
ryukaji wrote:Right now im trying to figure out how to make invisible faces working so I can make collision for stairs, anyone know how to get invisible collision from blender to ingame?

You can always make a second, invisible model.


How? Nothing shows up invisible ingame, except one time I was succesful ( i dont know how) but it had no collision, just invisibility (could walk through)

Jedi Admin
User avatar
Posts: 7420
Joined: Mon Aug 21, 2006 11:03 pm

Re: How to use Blender to make SWBF series models

Postby Maveritchell » Thu Mar 05, 2009 6:07 pm

ryukaji wrote:
Maveritchell wrote:
ryukaji wrote:Right now im trying to figure out how to make invisible faces working so I can make collision for stairs, anyone know how to get invisible collision from blender to ingame?

You can always make a second, invisible model.


How? Nothing shows up invisible ingame, except one time I was succesful ( i dont know how) but it had no collision, just invisibility (could walk through)


viewtopic.php?f=27&t=12338&p=217405#p217405

Not all that glitters is gold and not all that is model-related has to be done with a 3D modeling program. Once you have a msh file you can do a lot with hexediting.

Major
User avatar
Posts: 513
Joined: Mon Sep 17, 2007 7:46 pm

Re: How to use Blender to make SWBF series models

Postby ryukaji » Thu Mar 05, 2009 6:29 pm

Hmm that didnt work first time i tried it, but that was exporting out of xsi with mshex. I tried it for a model from blender through msh viewer and it worked!!!! My maps are saved!!!

Command Sergeant Major
User avatar
Posts: 294
Joined: Sun Mar 01, 2009 4:34 am
Projects :: AotC DoW+++Boonta Eve Classic
Games I'm Playing :: WoT MBWBVC Robocraft
xbox live or psn: No gamertag set

Re: How to use Blender to make SWBF series models

Postby Jaspo » Thu Mar 05, 2009 7:45 pm

Marking seams basically says "cut here" for the texture mapping...it will seperate your faces from each other.

Major
User avatar
Posts: 513
Joined: Mon Sep 17, 2007 7:46 pm

Re: How to use Blender to make SWBF series models

Postby ryukaji » Thu Mar 05, 2009 8:43 pm

Oh, I didnt know you could do that, what do you press to do that

Command Sergeant Major
User avatar
Posts: 294
Joined: Sun Mar 01, 2009 4:34 am
Projects :: AotC DoW+++Boonta Eve Classic
Games I'm Playing :: WoT MBWBVC Robocraft
xbox live or psn: No gamertag set

Re: How to use Blender to make SWBF series models

Postby Jaspo » Fri Mar 06, 2009 1:52 am

sselect the edges where you want seams and press ctrl+e

Command Sergeant Major
User avatar
Posts: 294
Joined: Sun Mar 01, 2009 4:34 am
Projects :: AotC DoW+++Boonta Eve Classic
Games I'm Playing :: WoT MBWBVC Robocraft
xbox live or psn: No gamertag set

Tips for avoiding the out of bounds MSH viewer error

Postby Jaspo » Tue Mar 17, 2009 1:55 am

If you make your models incorrectly the MSH viewer will dislike them very much.

For sure, avoid having faces or other geometry inside the exterior geometry of an object. In other words, anything that can't be seen without transparency. This probably only applies to each individual object, even when you join them.

I've also just now had a circumstance where it gave me the error until I removed the bottom faces of my object (which I had simply forgotten to do...you should always do this whenever possible anyway to reduce poly count)

As a side note if you have two door holes in a single plane only one of them will actually behave like a hole when it gets converted to a MSH file, and there will be an invisible wall where the other hole is. Fix this by offsetting some of the vertices a little on one of the holes. Don't forget to convert quads to triangles where needed, as this will probably cause texture distortion if you do not.

Jedi
User avatar
Posts: 1233
Joined: Wed Sep 12, 2007 3:13 pm

Re: How to use Blender to make SWBF series models

Postby Frisbeetarian » Tue Mar 17, 2009 4:11 am

Jaspo wrote:As a side note if you have two door holes in a single plane only one of them will actually behave like a hole when it gets converted to a MSH file, and there will be an invisible wall where the other hole is.

This may be modelmunge and not the converter. A lot of times when you munge a model like you described, you need to add -donotmergecollision to the msh.option file so that the munge won't create the invisible wall.

Command Sergeant Major
User avatar
Posts: 294
Joined: Sun Mar 01, 2009 4:34 am
Projects :: AotC DoW+++Boonta Eve Classic
Games I'm Playing :: WoT MBWBVC Robocraft
xbox live or psn: No gamertag set

Re: How to use Blender to make SWBF series models (FAQ)

Postby Jaspo » Thu Jun 04, 2009 2:31 pm

I recently discovered that (duh!) using the other mouse button after pressing B lets you box-deselect. And no, marking seams isn't necessary, but it can be useful.

In addition, I found that if you use the MSH viewer in conjunction with Blender 2.48 or later, you can bring swbf models into blender and edit them. Previous versions of blender didn't include the option to import as vrml97, only to export. This has changed with 2.48 and later, so simply export the msh as a vrml97 with the MSH Viewer and bring it in. Now, in playing with this I've found that when you import the vrml97 (wrl) model, it won't have the TexFace button selected for the material for the object(s). This must be selected before re-exporting or it won't save the texture info with the model.

In other news, I discovered that textures that have some parts transparent and some parts opaque must have an alpha channel added, where white is opaque and black is transparent. Then after the .msh is created you must enable transparency for the material you want to have transparency, to do this a character value of 04(single sided transparency) or 08(double sided transparency) or 10(Hard Edged Transparency) depending on your particular setup must be inserted in the fifth place from the HATRB for that texture (hex edit).

Recruit Womprat Killer
Posts: 14
Joined: Tue Jun 16, 2009 8:23 pm

Re: How to use Blender to make SWBF series models (FAQ)

Postby Philou231 » Sun Nov 01, 2009 10:27 pm

Hi, I need help with the texture in blender. I am new in using blender and I had a little bit of problem to understand the uv maping part and the mark seams part but I understood everything else about how to put them in SWBF.The problem is that all my models are black, without a single color.It is the only thing I didn't understood so if I can be help I will be really happy and i'll maybe send you my super models in BF :D .

Thanks you

Next

Return to 3D Modeling & Animation

Who is online

Users browsing this forum: No registered users and 2 guests