Battlefield Mesh Viewer
About
BfMeshView is a 3D model viewer for the Battlefield series, and has evolved to provide many useful editing features for modding.
It supports virtually all BF1942, BF2, BF2142, BFH and BFP4F mesh files.
BfMeshView is Free Open Source software! The source code is included in the download.
Keep in mind that this program is a work in progress. New versions may include experimental features that are unfinished and not thoroughly tested. Please report any issues to moc.drazahetyb@njitram!
Screenshots
Download
2019-02-02 (version 2.5.3)
This release is mainly a bug-fix release.
- added viewport screenshot function (press F12)
- added warning for incompatible locale settings (common on Polish locales)
- added option to disable GDI overlay rendering (which flickers on Windows 7 and later)
- fixed regression causing BF1942 StandardMesh (*.sm) files fail to load
- fixed bug in Material > Select Faces not properly marking all face vertices
- empty OpenGL extension strings are now filtered out (cosmetic issue on Linux/Wine)
- collision mesh edges are now drawn more visibly
Known Issues:
- BfMeshView windows do not show up in taskbar on Linux Mint 19 (this is a Wine 3.x issue)
Windows 10 users will need to run the application with administrator privelidges to work around the error message of missing DLL and OCX files.
- Right click on the executable file, choose "Properties"
- Go to the "Compatibility" tab
- Check "Run this application as administrator"
The VB6 source code, and runtimes (DLL files) are included. You can keep your settings from previous versions by copying the "config.ini" file to the new BfMeshView directory.
Download: bfmeshview253.zip (2.5 MB)
Usage
Viewing
To view a model, run BfMeshView and open the file through the menu (File > Open). However, it is generally much more productive to enable file type association via Options > Preferences so that you can open the files by double clicking on the file in Windows Explorer. This will also allow you to view meshes from ZIP archives without extracting them manually.
BfMeshView also supports file drag and drop for all supported file types.
Textures
To view models with textures, add your mod directory to the texture path list (Options > Preferences).
As of version 2.2.0, BfMeshView now supports suffixed texture loading. To add custom suffixes, close BfMeshView, open config.ini in notepad, add the suffix, save, and start BfMeshView. Suffixes can be activated/deactivated via the menu Options > Texture Suffix.
Animation
To play back BF2 animations, first load the player model (*.skinnedmesh), then drag and drop the respective skeleton file (*.ske) onto the BfMeshView window, then drag and drop the animation file (*.baf).
Workspace Files
BfMeshView also has limited workspace support for BF2 files. This is mainly intended for binding together a skinnedmesh, a skeleton and an animation file. It allows you to quickly open a file without drag-and-drop again and again, when you are debugging a player model or animation. You can create one manually in Notepad, saving the file with .bfmv extension. An example is displayed below:
; BFMESHVIEW WORKSPACE FILE ske=flag_setup.ske mesh=flag_us.skinnedmesh anim=flag_idle.baf ; END OF FILE
Both relative and absolute file paths are supported. Relative paths are relative to the workspace file.
BfMeshView on Linux
BfMeshView runs on Linux with Wine and is fully functional. You may need to install or update your Linux graphics drivers for good performance and GLSL shading.
If you see viewport corruption when resizing the BfMeshView window, or if mouse input results into delayed viewport refreshes, disable v-sync of your graphics driver. For example, if your machine has an nVidia graphics card, you can do this through the "NVIDIA X Server Settings" control panel.
If BfMeshView fails to start, or if the "File Open", dialog doesn't show, you may need to download and place the runtime libraries (linked elsewhere on this page) to the BfMeshView directory. You can also copy the runtimes to the Wine c:/windows/system32/ directory, but be careful to make backups when overwriting files, as replacing these libraries may affect other software running under Wine!
Older Versions
These system files may, or may not, be needed to run BfMeshView on your computer. If BfMeshView refuses to start, place these files inside the BfMeshView executable directory.
Download: runtimes.zip (1.89 MB)
2018-02-12 (version 2.4.0)
This release brings a large number of changes that have accumulated over the last year, mainly adding BF2 mesh editing tools and productivity improvements for common or repetitive tasks. Note that this is a raw untested beta-release; some things may be utterly broken, incomplete, or undocumented.
- added toolbar to main window
- added improved icons
- added static/dynamic lighting toggle
- added dummy normal map when bump map file is missing
- added tool to select material from viewport
- added user friendly material names to tree view and UV Editor
- added Open Folder in texture map context menu (opens nearest existing folder in Explorer)
- added more intuitive UV Editor tools (rotation, move, scaling)
- added UV Editor scale type-in tool
- added UV Editor Unwrap tool (WIP)
- added mesh editing mode, allows selection of vertices/faces/polygons/elements
- added vertex normal editing tools (weld/flatten)
- added Delete Faces tool
- added Collapse Vertices tool
- added Fix tool, allows copying of normals & UVs between LODs (to fix popping/shifting textures)
- added Edit > Select Bad Tangents, selects vertices with degenerate tangent vectors
- added Tools > Fix Tangents, recomputes tangent vectors after UV editing, or if degenerate
- added Tools > Generate Weighted Normals, generates better vertex normals
- added experimental matcap shading mode (WIP)
- added experimental faux Gamma correction shading toggle
- added option to enable/disable right mouse button zooming in Preferences
- added keyboard shortcuts (W/S = zoom in/out, SPACE = zoom to fit)
- added zoom-to-fit when opening files via command-line argument
- added dependency on Windows Scripting (please report error messages of any missing DLLs!)
- added texture override option to load .tga instead of .dds (set "texoverride=1" in "config.ini")
- fixed incorrect UVs when exporting OBJ from .skinnedmesh
- fixed missing toolbar tooltips
- fixed crash when in UV Editor switching to LOD with smaller number of materials
- fixed UV Editor lightmap UVs not being drawn properly if mesh has less than 5 UV channels
- fixed UV editor selection bug
- fixed UV editor not showing texture for .bundledmesh files
- fixed Edit Material browse dialog incorrect file path
- fixed Edit Material dialog tab order
- fixed default lightmap UV channel index on Generate Samples dialog
- fixed minor internal DDS texture loader bug
- fixed various shader bugs
- fixed bundledmesh tracks/wheels being invisible with GLSL shaders
- fixed potential overflow and other math errors
- fixed bump map lighting being inverted on statics with mirrored UVs
- fixed GLSL shading of statics with only base texture
- fixed incorrect in-viewport shading of copied materials
- optimized BF2 mesh rendering
- the Fix Texture Paths tool now trims absolute file paths
- the Vertex Transform tool has been moved to mesh editor toolbar
- renamed View > 'Bump Map' to 'Normal Map'
- relaxed zoom limits in UV Editor
- UV Editor now shows proper aspect ratio based on background texture
- Generate Samples dialog is now non-modal
- the Fix Samples tool now runs on all loaded samples files
- sample generator now shows hourglass cursor when busy
- sample treeview nodes are now unfolded by default
- tree view is now refreshed when samples files are reloaded
Known Issues:
- tool bar tooltips sometimes do not appear
- edge selection is not yet implemented
Download: bfmeshview240.zip (398 KB)
2017-01-11 (version 2.3.2)
- added 'Copy UV Channel' tool
- added mouse wheel zoom to 'UV Editor'
- added 'Fix Overgrowth Alpha Mode' for BF2 .staticmesh
- added 'Pro user' mode to skip overwrite warning on mesh save (set "promode=1" in "config.ini")
- added option to choose UV channel for OBJ export
- added option to export transformed vertices for OBJ export
- fixed OBJ export UVs being vertically inverted
- fixed error message when selecting missing material texture maps
- 'Generate Samples' tool now automatically reloads samples
Download: bfmeshview232.zip (361 KB)
2012-10-04 (version 2.2.0)
- added full BF2 shader emulation
- added BF1942 StandardMesh triangle strip support (player models)
- added suffixed texture loading
- added integrated animation tools to main window
- added dummy texture when texture fails to load
- added uncompressed DDS support
- added bumpmap alpha transparency support
- added vehicle component positioning
- added 1P camera option when 1P skeleton is loaded (preview 1P animations)
- added CollisionMesh color legend
- added SkinnedMesh vertex weight tools (experimental)
- added texture bake tool (requested by Command & Conquer 2142 mod)
- added UV Editor hardware accelerated rendering
- added UV Editor texture rendering
- added possible workaround for division by zero bug on Windows 7
- fixed selected material texture map rendering
- fixed AnimatedUV materials rendering
- fixed tangent vector clipping triangles
- fixed saving mesh when workspace is loaded
- fixed minor vertex selection bug
- fixed minor UV selection bug
- fixed crash when loading StaticMesh under certain conditions
- fixed UV editor selection after loading mesh
- fixed TGA output bug
- fixed and optimized viewport redraws while loading files
- fixed number of minor UV Editor bugs
- fixed unwieldy zoom tool in UV-Editor
- fixed BundledMesh wreck alpha shader
- fixed opening files through explorer when BfMeshView is located in a directory path with spaces
- texture paths including drive letters/network paths no longer accepted (helps to prevent errors)
Download: bfmeshview220.zip (349 KB)
2011-05-15 (version 2.1.0)
- fixed skinnedmesh corruption when saving (mayor bug!)
- fixed error when selecting some geoms with BF2 skinnedmesh and skeleton loaded
- fixed viewport redraw after startup on Windows 7
- fixed viewport redraw after changing viewport background color
- added support for Battlefield Play4Free meshes
- added some form of application state recovery if errors occured during rendering of BF2 meshes
- lowered registry security priveliges in futile attempt to please Vista/Win7
- minor GUI workflow tweaks
Download: bfmeshview210.zip (205 KB)
2011-03-14 (version 2.0.0)
- fixed BF2/BFH mesh loader crash if material had no texture maps
- fixed more alpha rendering glitches
- fixed stubborn behavior when closing BfMeshView while loading a file
- fixed bug that allowed texture paths to become duplicated
- fixed race condition that caused flicker/rendering glitches at startup
- fixed incorrect display of number of vertex attributes
- fixed potential buffer overflow bugs that could cause UI corruption
- fixed buffer overflow in BF1942 StandardMesh loader
- added basic workspace file support
- added BF2 animation playback
- added texture mass-rename tool
- added option to skip error checks for sample generator
- added scale tool to UV editor
- added support for BF2 occluder files
- added overdraw visualization
- added "fix mesh" tool to zero out NaN vertex attributes
- added browse buttons to material editor
- added option to change viewport background color
- added debug console
- added BF1942 StandardMesh shader/texture loading
- slightly improved file loading performance
- BF2 skeletons are now rendered correctly
- UV editor channel dropdown now only lists channels present in mesh
- vertex attribute info now includes attribute types
- changed file association keys so that files can be properly sorted by extension in Explorer/WinZip
- when generating samples the user will now be prompted if the file already exist
- more drag and drop support for BF2 skeleton+mesh+animation combo
- slightly improved tree view structure display
Download: bfmeshview200.zip (206 KB)
2010-08-06 (version 1.9.0)
- fixed crash when restoring child windows under certain conditions
- fixed double clicking on texture not always opening file
- fixed error when double clicking in treeview when no BF2 mesh was opened
- fixed transparancy for some shaders
- fixed crash when selecting some .geo nodes in treeview
- fixed rare crash in normal map converter
- fixed bundledmesh shader shadow/wreck texture
- fixed bug in sample generator
- fixed assert in sample generator
- added material editing
- added UV editor
- added sample generator
- added tool to fix broken samples
- added BF2 file format version to treeview
- added BF2 vertex attribute info to treeview
- added full BF1942 tree mesh (*.tm) support
- added display of texture memory use
- added "open folder" in treeview context menu
- added support for all BF2 collisionmesh files (including weapons)
- added experimental vertex transform tool
- added normal map converter options
- invalid sample points are now no longer rendered at origin
- upgraded treeview control
- disabled annoying treeview node hover tooltips
- optimized treeview refreshing
- texture maps that fail to load are now marked in treeview
- double clicking on textures in treeview will now open the file
- can now view single unshaded texture by selecting map in treeview
- skin bone transforms are now drawn in viewport
- arrow keys now properly selects treeview node again
Download: bfmeshview190.zip (180 KB)
2009-08-14 (version 1.8.0)
- added support for OBJ files with UNIX linebreaks
- textures are now loaded from local textures directory if explicit path is missing
- fixed texture loading/rendering bug for DDS files without complete mimap chain
- added option to disable texture loading
- added option to disable samples loading
- added option to remember view settings between sessions
- added reload textures tool
- vegetation trunk textures are now shaded correctly
- information is now displayed for .obj and .samples files
- geom1 is now selected by default for .skinnedmesh files
- added additional safeguards to prevent possibly rare crash
- few minor aesthetic changes
Download: bfmeshview180.zip (141 KB)
2009-04-19 (version 1.7.0)
- full skinnedmesh support!
- fixed support for 'version 4' BF2 mesh files
Download: bfmeshview170.zip (133 KB)
2009-04-17 (version 1.6.0)
- added support for BF2 vehicle and weapon collisionmesh files
- added new file loaders
- improved emulation for several shaders
- fixed a few minor GUI bugs
Download: bfmeshview160.zip (129 KB)
2008-12-04 (version 1.5.0)
- added vertex order color rendering
- added proper BF2 texture loading
- added approximate rendering of most BF2 shaders
- fixed normal map converter crash when no input texture was specified
- fixed number of minor GUI bugs
- fixed incorrect lighting on backfaces when View > Backfaces was checked
Download: bfmeshview150.zip (116 KB)
2008-10-28 (version 1.4.0)
- fixed crash when restoring minimized child windows
- fixed .sm file loader bug
- added hierarchy tree view
- added more detailed geometry info to status bar
Download: bfmeshview140.zip (114 KB)
2008-10-09 (version 1.3.0)
- more complete BF2 .collisionmesh file loader
- added object-space to tangent-space normal map converter
Download: bfmeshview130.zip (111 KB)
2008-05-17 (version 1.2.0)
- now loads BF1942 StandardMesh (.sm) files
- restructured file loader code, meshes are now grouped
- experimental ".collisionmesh" loader
- loading ".skinnedmesh" files may now display some useful results
- fixed bug in texture loader when texture wasn't found in first path
- polygon count of the selected mesh is now displayed in status bar
- view is now zoomed in and centered on object
- added anisotropic texture filtering
- added experimental Wavefront OBJ export (works on some meshes)
- added normal/tangent vector rendering option
- added tools (experimental and undocumented)
- added experimental WaveFront OBJ export
Download: bfmeshview120.zip (107 KB)
2008-02-15 (version 1.1.0)
- much more robust ".staticmesh" and ".bundledmesh" loader
- added texture search path option and configuration file
Download: bfmeshview110.zip (72.7 KB)
2008-02-09 (version 1.0.0)
- Currently loads most Battlefield 2 ".staticmesh" and ".bundledmesh" files, but not all. Picks up DDS textures if they are in the same folder as the mesh. Future versions will add support for all mesh file formats, better texture file finding and perhaps support for Battlefield 1942 meshes as well.
Download: bfmeshview100.zip (64.3 KB)