• Announcements

    • Detrux

      Site Relaunched   10/13/2016

      Welcome back to BFEditor.org! We've upgraded the forum software, removed the spammers, and improved security. Apologies for the downtime! Det
Remdul

New Tool: Bfmeshview

92 posts in this topic

Hi,

I wrote a tool over the last few months to view exporter Battlefield models, and we've used here internally at FHmod. It doesn't do anything fancy, but it is good for debugging, checking texture filepaths, shaders names of statics, check poly count etc. Just something to make our worthless slave-lives a little easier.

Screenshot:

screamschutze.jpg

Not everything is supported or displayed properly. Skinnedmesh does not work (yet), weapon/vehicle collisionmesh is currently not implemented. Works on most BF42, BF2, BF2142, and BF Heroes files. You can view .sm, .staticmesh, .bundledmesh, and .samples files.

There's a world space > tangent space normal map converter, and also ambient occlusion map renderer (load OBJ for this), but these are highly experimental and undocumented.

You can bind file extensions to BfMeshView so you only have to double click files to view them. Just right click on the file > open with > browse to bfmeshview.exe, select checkbox > ok.

For texture loading to work, simply add your mod path to the texture paths list on the options dialog.

>> Download <<

You may need some extra files to run this app, see bottom of the page for download.

Use at your own risk. There is no written documentation. Unfortunately I have very little time to work on this tool. Post suggestions/bugreports in this thread please. I might check back every once in a while if I find the time, but no promises. :P

Cheers,

Remdul

(Reverse Engineer @ Forgotten Hope 2 mod)

Edited by Remdul

Share this post


Link to post
Share on other sites

it's good of you to share this, thanks very much :)

Share this post


Link to post
Share on other sites

Yeah that looks very helpful. If you'd publish what you know about the mesh format , ppl could start to write exporters for other modelling programs.

Moved to Object Editor. Its good to pin this topic but i guess its better here in Object Editor than in Discussion Main.

Share this post


Link to post
Share on other sites

This is awesome, thanks so much for sharing it. Only things I'm missing personally is collsion viewing, and skinnedmeshes, but what's there now should indeed make our slaving a bit easier :|

Share this post


Link to post
Share on other sites

very sweet dude, works like a charm! Took a little bit to work out what to download to get it running and how to get the textures to load but other than that, very easy :D

97017065.jpg

We be sharing this with the PR community tomoz for sure :D

Cheers for making and sharing this, wont need to spend 10mins loading the editor any more to view a object! :D

Share this post


Link to post
Share on other sites

I was just thinking about something like this and to stumble across this today makes me smile. Thanks for the contribution to the community.

Share this post


Link to post
Share on other sites

This is a really great tool Remdul.

I really love the fact that you can drag and drop into the viewer.

Its a great time saver and very handy - thanks for sharing it ;)

Edited by spacemanc

Share this post


Link to post
Share on other sites

New version available, and page/files moved here: http://www.bytehazard.com/bfstuff/

Now supports BF vehicle .collisionmesh files!

I have not tested BF2142 or BF Heroes files, but chances are it just works.

If I broke something else, or you still have problematic .collisionmesh files, please let me know.

Thanks for the feedback. :)

Cheers,

Remdul

Edited by Remdul

Share this post


Link to post
Share on other sites
Wow, it would be great if importing collisionmeshes worked in 3dsmax etc. But yeah, this is fantastic!

Actually, I wrote an import script for 3dsmax:

http://www.bytehazard.com/bfstuff/colmeshimp.ms

Run it via Utilities > MaxScript > Run Script > browse to the script > Open

But it only works for statics for now, I have not updated this script yet to mirror the BfMeshView code.

Edited by Remdul

Share this post


Link to post
Share on other sites

Woah! That should be hugely helpful!

EDIT: Works a treat; nice work again.

Edited by UberWazuSoldier

Share this post


Link to post
Share on other sites

Another new version (0.7.0): http://www.bytehazard.com/bfstuff/

Now fully supports .skinnedmesh!

It also loads skeleton files, though they are not displayed correctly (got my quaternion math mixed up).

Edited by Remdul

Share this post


Link to post
Share on other sites

Are you saying that you can now even import the weigthings of bones to vertices ? That would really be helpful :P

Great job anyway :clap: :clap:

I played a little with the collisionmesh importer and it works well with statics.

When trying to import a vehicle-colmesh i was told to tell Remdul that it didn't work :P

Share this post


Link to post
Share on other sites

Just gave your col mesh script a go Remdul, really sweet script, helped me loads fixing some buildings just now meant I didn't need to remake the col meshes (like i use to do...)

Any chance you can update the script to work on bundle meshes etc? :D

Also any chance I can integrate this into some tools for max?

Cheers! :D

Edited by Rhino

Share this post


Link to post
Share on other sites

I set up mine to have this as a button; but the ultimate would be someone having this run alongside the import mesh. Remdul is definitely the expert in BF2 formats!

Edited by UberWazuSoldier

Share this post


Link to post
Share on other sites

Hi, I'm looking for .collisionmesh and .bundledmesh files format. AFAIK, it's not published. Can you help me?

I'm trying to write several modding scripts.

Share this post


Link to post
Share on other sites
Hi, I'm looking for .collisionmesh and .bundledmesh files format. AFAIK, it's not published. Can you help me?

I'm trying to write several modding scripts.

I hope to release some code when I have time. Internally, the file formats are a complete mess, with redundant data and several different format versions/revisions, so documenting the formats in the traditional way is almost impossible. I haven't looked at the POE tools code (I more or less did 'clean room' approach) but I bet you can get a lot of info from there (esp. import scripts).

Good luck!

Share this post


Link to post
Share on other sites

New version (1.8.0): http://www.bytehazard.com/bfstuff/

Mainly small changes to make it quicker to work with.

Changelog:

	*  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

Cheers,

Remdul

Forgotten Hope 2 mod

Edited by Remdul

Share this post


Link to post
Share on other sites

I've tried it yesterday, works great. But I've noticed some problems open some of SatNavs collision meshes, I will post a list of which ones caused problems asap.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now