• 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

Members
  • Content count

    77
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Remdul

  • Rank
    Member
  • Birthday 09/06/1983

Contact Methods

  • Website URL
    http://www.fhmod.org
  • ICQ
    0

Profile Information

  • Gender
    Male
  • Location
    Netherlands
  • Interests
    Pie
  1. I just released a new version (BfMeshView 2.4.0)! http://www.bytehazard.com/bfstuff/bfmeshview/ 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. We've used many of the new features to fix hundreds of statics glitches for the upcoming FH2 release. The highlights: * Generate Weighted Normals: this makes many models look significantly better * Vertex Normal editing tools: this has allowed us to fix many lighting glitches * improved UV Editor: this has allowed us to fix stretched textures * mesh editing 'Fix' tool set: this has allowed us to fix many popping LODs * improved .sample generation: allows quicker fixes of .sample files * improved navigation: quickly locate to texture map files on disk * updated shaders: all BF2 models should now appear definitively correct in BfMeshView Note that this is a raw untested beta-release; some things may be utterly broken, incomplete, or undocumented.
  2. I mentioned DUV because doing multiple texture fetches from the same texture to build your normal gets expensive really quick. Especially with 6 layers of detail textures, I guess the only reason you don't hit the SM2 limits is because BF2 alpha-blends the detail layers (texture fetches spread over several drawcalls/pixel shader invokations). Not sure about vertex colors actually. The BF2 mesh files (.staticmesh, .bundledmesh and .skinnedmesh are virtually identical internally) do store a table of vertex attribute information, with a field for the type (position/normal/UV/weight etc). This information includes the attribute usage type, which maps to a D3D constant. By adding an attribute for vertex colors it *may* work. But you'd have to seriously modify the exporter tools. If I have time I'll see if I can generate a blank VC channel in some staticmesh file and see if I can get access it in a BF2 shader (that's the critical part, does BF2 actually bind the attribute if it exists in the mesh file); a proof of concept. There's however an easier alternative, and that's by storing the vertex colors in UV channels (you need two channels to get RGBA). The POE exporter at least exports always at least 4 UV channels, even if not all are used. Alternatively, you can even use an (uncompressed!) lookup texture (rainbow) and index into it via UV coordinates. 3dsmax does (or did) this internally, it's really stupid and confusing, but it works.
  3. By the way Corona, you can store 'kind of' store a normal map in one channel. I found this out by accident in one of my own game projects where I stored a terrain normal map in two XY and reconstructing Z. Except that I bungled the shader code, and was actually passing and unitialized value (zero) as Y. Yet the normal map looked pretty acceptable. Essentially it's like a DUV map, where you reconstruct one component. For most terrain detail normal maps (= tangent space) you have relatively little bump/contrast (blue channel is mostly blank), so you can get often away with it. It may reveal itself more with specular reflection and envmaps though.
  4. I just released a new version (BfMeshView 2.3.2)! http://www.bytehazard.com/bfstuff/bfmeshview/ The highlights: * 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 (enable in "config.ini": promode=1) * 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 Feedback welcome. Please report regressions and new bugs. PS: GitHub code is temporarily out of date, will sync my SVN repo with GitHub later.
  5. Nice work guys! I might take a look at it this, if time allows. By the way, is it just me or did nVidia break PCF texture filtering in BF2? IIRC DICE poorly hardcoded hardware SM detection, so modern NV hardware falls back to crappy ATI low quality stuff. We fixed this in FH2 by getting rid of the (now useless) optimizations altogether (SpecularLUT etc to get nicer specular), but PCF remains rather broken in my NV setups after updating drivers some years ago. Passing variables to shaders is a very neat feature, this could allow some nice post processing effects without the hacks we did in FH2.
  6. 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: 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. Cheers, Remdul (Reverse Engineer @ Forgotten Hope 2 mod)