Jump to content
Official BF Editor Forums

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. Remdul

    New Tool: Bfmeshview

    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. Remdul

    Corona's Shaders

    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. Remdul

    Corona's Shaders

    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. Remdul

    New Tool: Bfmeshview

    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. Remdul

    Corona's Shaders

    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. Remdul

    New Tool: Bfmeshview

    Since development has effectively ended, BfMeshView has been Open Sourced (GPL), and is available via GitHub: https://github.com/ByteHazard/BfMeshView If someone is in need of a copy of VB6, drop me a line.
  7. Remdul

    New Tool: Bfmeshview

    Could you verify some things: * what does your mod/texture path look like? It should be like this: "H:\Games\Battlefield 2\mods\fh2test" * are the green map icons marked by a red cross? * after loading a BF2 model, do you see in View > Debug Log any errors about textures not being loaded (near bottom)? * is View > Diffuse Map checked? * is Options > Load Textures checked? * is View > GLSL Shaders checked or unchecked?
  8. Remdul

    New Tool: Bfmeshview

    @Outlawz: I will see if I can write a BF2 occlusion mesh tutorial. Short answer: if you place your ready-for-export static in 3dsmax at the origin (root node is at 0/0/0), then the occlusion mesh will line up properly. An occlusion mesh should generally be entirely inside the visible mesh. Occlusion testing ensures that any objects behind the occlusion mesh are never rendered to the framebuffer, which improves framerate. An occlusion mesh has no effect on the model itself however. Big objects such as highrises tend to occlude large number of objects, so they are good occluders. You can test this in BF2 by moving the camera inside the visible mesh, but outside the occluder. You should see objects disappear. @Rhino: lightmapped destroyable objects are so rare, I didn't bother adding support. But I think there is a workaround: export the destroyed model seperately as regular static, generate the samples for it with BfMeshView, then rename the samples and put them along the destroyable version. The report about "bad faces" means there are some errors in your model. Most likely these are degenerate (infinitely thin) triangles. These cause all sorts of mathematical problems. You can detect them using this MaxScript: http://www.bytehazard.com/bfstuff/meshcheck.ms. The source of these thin triangles tends to come from CSG modeling techniques, and poor triangulation with Editable Poly in 3dsmax. Since I'm old-skool, I always re-triangulate my models as Editable Mesh ('Edge' mode > 'Turn' tool) before UV-ing. @[sFaith]neko: I believe this bug is addressed in the latest BfMeshView version.
  9. Remdul

    New Tool: Bfmeshview

    I just released a new version (BfMeshView 2.2.0)! I didn't realize last release was over a year ago! http://www.bytehazard.com/bfstuff/bfmeshview/ UPDATE: the contents of the v220 archive was borked, if you downloaded before the time of this edit, please re-download! The highlights: * full BF2 shader emulation * support for suffixed textures * added vehicle component positioning (loads .CON) * added CollisionMesh color legend * experimental SkinnedMesh vertex weight tools * much improved UV editor * integrated animation player with main window * lots of bug fixes, performance tweaks and improved compatibility Feedback welcome. Please report regressions and new bugs. PS: I will try to address your questions if I find the time. Some of the bug fixes may solve the problems mentioned.
  10. Remdul

    Question Regarding Bf3 File System

    I just laid my paws on BF3 alpha files, I'll probably do a quick assessment.
  11. Remdul

    New Tool: Bfmeshview

    New release (2.1.0). Mostly bugfixes, and this version brings full BFP4F support. http://www.bytehazard.com/bfstuff/bfmeshview/
  12. Remdul

    New Tool: Bfmeshview

    That usually happens if there is an glitch in the exported mesh. If you check "Ignore Errors" it should usually work. If it doesn't, better fix that glitch. It's usually a very thin triangle. You can use this MaxScript (meshcheck.ms) to locate it.
  13. Remdul

    New Tool: Bfmeshview

    Just a minor heads-up: I've added a few small tools on my page. Nothing fancy, but it might help that tiny bit. http://www.bytehazard.com/bfstuff/ BF2MeshChecker and DDScheck in particular may come in handy. Tip: if you come across NaNs with Bf2MeshChecker on statics, these objects may have lighting bugs. You can usually fix the samples files of these with the BfMeshView "Fix Samples" tool. While on the subject, I would not recommend to use the BfMeshView "Fix Mesh" or "Fix Samples" tool if there is no visible issue.
  14. Remdul

    New Tool: Bfmeshview

    Kevin notified me today that .skinnedmesh output is borked, I have fixed the bug. Will wait to see if any other bugs surface, will do a bugfix release later. For now, here's a beta build: http://www.bytehazard.com/bfstuff/bfmeshview/bfmeshview202.zip *Edit: rhysm_08 could you please edit your post and remove the debug blurb? It's kind of spammy. Thanks.
  15. Remdul

    New Tool: Bfmeshview

    Ok, I took another look today at work, and it looks like it indeed has to do with security. For reasons unknown, Win7 decides that some of the associations may be created, but not others. I lowered the security demands for the registry operations in 2.0.1, but Windows security still doesn't grant the rights needed for basic registry operations. However it seems to me it all should work with administrator privileges. You can try granting BfMeshView admin access, you can do this by right clicking on the executable, click "Properties" and go to the "Security" tab. There should be something there you can check. Another solution that worked for me is to set the compatibility mode to "Windows XP". Anyway, BfMeshView is, to my knowledge (MSDN is greatly lacking in recent years), doing everything by the book, so I'm guessing this is probably a Windows 7 problem.
×