How to use Blender to make SWBF series models (FAQ)
Posted: 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.co ... deo;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)
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.co ... deo;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)