Ralle321 Posted March 15, 2019 Report Share Posted March 15, 2019 That's it. When i remove the vertex colors the export works flawless. 1 Quote Link to comment Share on other sites More sharing options...
RPGista Posted March 19, 2019 Report Share Posted March 19, 2019 Hmmm, thats a shame, Im working on a coulple of terrain models that have vertex blending... Will be looking foward to the fix. Quote Link to comment Share on other sites More sharing options...
OrbWeaver Posted March 20, 2019 Report Share Posted March 20, 2019 I've committed some initial changes to stop the script from crashing when vertex colour information is present in the mesh, however I have not yet tested that the exported vertex colours are correct. You're welcome to try the latest version and see if it does what you expect. EDIT: The results look fairly reasonable I think; at least this more or less matches what I see in Blender. 2 Quote DarkRadiant homepage ⋄ DarkRadiant user guide ⋄ OrbWeaver's Dark Ambients ⋄ Blender export scripts Link to comment Share on other sites More sharing options...
Snehk Posted March 31, 2019 Report Share Posted March 31, 2019 (edited) I know that this thread is mostly focused on getting LWO and ASE from Blender, but I don't want to make another thread for this one. I downloaded this https://sourceforge.net/p/blenderbitsbobs/wiki/MD5%20exporter/ and tried to check whether it'd work with Blender 2.80.0 and it didn't. I checked the code block by block in Blender's console, most of which resulted in no errors whatsoever until the menu and registering parts, which throwed up a lot of errors: def menu_func_import_mesh(self, context): self.layout.operator( ImportMD5Mesh.bl_idname, text="MD5 Mesh (.md5mesh)") def menu_func_import_anim(self, context): self.layout.operator( MaybeImportMD5Anim.bl_idname, text="MD5 Animation (.md5anim)") def menu_func_export_mesh(self, context): self.layout.operator( MaybeExportMD5Mesh.bl_idname, text="MD5 Mesh (.md5mesh)") def menu_func_export_anim(self, context): self.layout.operator( MaybeExportMD5Anim.bl_idname, text="MD5 Animation (.md5anim)") def menu_func_export_batch(self, context): self.layout.operator( MaybeExportMD5Batch.bl_idname, text="MD5 (batch export)") def register(): bpy.utils.register_module(__name__) bpy.types.INFO_MT_file_import.append(menu_func_import_mesh) bpy.types.INFO_MT_file_import.append(menu_func_import_anim) bpy.types.INFO_MT_file_export.append(menu_func_export_mesh) bpy.types.INFO_MT_file_export.append(menu_func_export_anim) bpy.types.INFO_MT_file_export.append(menu_func_export_batch) def unregister(): bpy.utils.unregister_module(__name__) bpy.types.INFO_MT_file_import.remove(menu_func_import_mesh) bpy.types.INFO_MT_file_import.remove(menu_func_import_anim) bpy.types.INFO_MT_file_export.remove(menu_func_export_mesh) bpy.types.INFO_MT_file_export.remove(menu_func_export_anim) bpy.types.INFO_MT_file_export.remove(menu_func_export_batch) if __name__ == "__main__": register() >>> def menu_func_import_mesh(self, context): ... self.layout.operator( ... ImportMD5Mesh.bl_idname, text="MD5 Mesh (.md5mesh)") ... def menu_func_import_anim(self, context): File "<blender_console>", line 4 def menu_func_import_anim(self, context): ^ SyntaxError: invalid syntax >>> self.layout.operator( File "<blender_console>", line 1 self.layout.operator( ^ IndentationError: unexpected indent >>> MaybeImportMD5Anim.bl_idname, text="MD5 Animation (.md5anim)") File "<blender_console>", line 1 MaybeImportMD5Anim.bl_idname, text="MD5 Animation (.md5anim)") ^ IndentationError: unexpected indent >>> >>> def menu_func_export_mesh(self, context): ... self.layout.operator( ... MaybeExportMD5Mesh.bl_idname, text="MD5 Mesh (.md5mesh)") ... def menu_func_export_anim(self, context): File "<blender_console>", line 4 def menu_func_export_anim(self, context): ^ SyntaxError: invalid syntax >>> self.layout.operator( File "<blender_console>", line 1 self.layout.operator( ^ IndentationError: unexpected indent >>> MaybeExportMD5Anim.bl_idname, text="MD5 Animation (.md5anim)") File "<blender_console>", line 1 MaybeExportMD5Anim.bl_idname, text="MD5 Animation (.md5anim)") ^ IndentationError: unexpected indent >>> def menu_func_export_batch(self, context): ... self.layout.operator( ... MaybeExportMD5Batch.bl_idname, text="MD5 (batch export)") ... >>> def register(): ... bpy.utils.register_module(__name__) ... bpy.types.INFO_MT_file_import.append(menu_func_import_mesh) ... bpy.types.INFO_MT_file_import.append(menu_func_import_anim) ... bpy.types.INFO_MT_file_export.append(menu_func_export_mesh) ... bpy.types.INFO_MT_file_export.append(menu_func_export_anim) ... bpy.types.INFO_MT_file_export.append(menu_func_export_batch) ... >>> def unregister(): ... bpy.utils.unregister_module(__name__) ... bpy.types.INFO_MT_file_import.remove(menu_func_import_mesh) ... bpy.types.INFO_MT_file_import.remove(menu_func_import_anim) ... bpy.types.INFO_MT_file_export.remove(menu_func_export_mesh) ... bpy.types.INFO_MT_file_export.remove(menu_func_export_anim) ... bpy.types.INFO_MT_file_export.remove(menu_func_export_batch) ... >>> if __name__ == "__main__": ... register() ... Traceback (most recent call last): File "<blender_console>", line 2, in <module> File "<blender_console>", line 2, in register AttributeError: module 'bpy.utils' has no attribute 'register_module' I'm not an expert of Blender API (in fact, I passionately hated earlier versions of the software), but I know that it was one of the major changes in 2.80.0 and I wanted to ask if the plugin may work correctly after updating this part. Edited March 31, 2019 by Snehk Quote 'What do I care for your suffering?' Link to comment Share on other sites More sharing options...
RPGista Posted April 1, 2019 Report Share Posted April 1, 2019 Its more complicated than that. The script will really only work up to version 2.72. If you use it on version 2.79, eveything looks great and the model and animations will go through, but they will actually be corrupted internally. I wasted countless hours trying to make it work before it finally crossed my mind to use an earlier version, because there were no visible errors pointing out the problem. So updating the scripts would probably take a bit more work. 2 Quote Link to comment Share on other sites More sharing options...
Snehk Posted April 1, 2019 Report Share Posted April 1, 2019 I guess that rewriting the scripts would be the best solution. Quote 'What do I care for your suffering?' Link to comment Share on other sites More sharing options...
OrbWeaver Posted June 4, 2019 Report Share Posted June 4, 2019 I'm happy to update the script for API changes and bring it into my repository along with the LWO and ASE exports, but I don't have any experience with the MD5 animation system so testing it would be somewhat challenging. Probably the most reliable way to do it would be to get hold of an example BLEND file along with the correct exported result (from earlier Blender versions) and then treating this export as canonical test data which the updated script needs to produce. In fact I should do that with the ASE and LWO scripts too, to make it easier to check for future breakages without having to do a full export and manual inspection in game. Quote DarkRadiant homepage ⋄ DarkRadiant user guide ⋄ OrbWeaver's Dark Ambients ⋄ Blender export scripts Link to comment Share on other sites More sharing options...
R Soul Posted June 29, 2019 Report Share Posted June 29, 2019 Hi OrbWeaver. Each time I load Blender, for your ASE and LWO addons the console lists a load of warnings about properties that should be annotations. It doesn't say why, just that they should be. Warning: class <class name> contains a property which should be an annotation! ... assign as a type annotation: EXPORT_OT_ase.filter_glob assign as a type annotation: EXPORT_OT_ase.filepath ... assign as a type annotation: EXPORT_OT_ase.option_scale Fortunately all that's necessary is to change the = to a : and the console loses a lot of clutter. 1 Quote Link to comment Share on other sites More sharing options...
OrbWeaver Posted July 9, 2019 Report Share Posted July 9, 2019 On 6/29/2019 at 11:18 PM, R Soul said: Each time I load Blender, for your ASE and LWO addons the console lists a load of warnings about properties that should be annotations. It doesn't say why, just that they should be. Thanks, fixed in Git. 1 1 Quote DarkRadiant homepage ⋄ DarkRadiant user guide ⋄ OrbWeaver's Dark Ambients ⋄ Blender export scripts Link to comment Share on other sites More sharing options...
Popular Post OrbWeaver Posted August 5, 2020 Popular Post Report Share Posted August 5, 2020 The LWO export script has now been updated to support Autosmooth settings. A new option is present in the export dialog, allowing you to choose No Smoothing, Full Smoothing (looks the same as ASE), and Use Autosmooth settings. If you choose Use Autosmooth settings, the settings of Autosmooth in Blender will be exported into the LWO file, allowing you to use both smoothing and flat shading on the same model without needing to manually split vertices. 1 4 Quote DarkRadiant homepage ⋄ DarkRadiant user guide ⋄ OrbWeaver's Dark Ambients ⋄ Blender export scripts Link to comment Share on other sites More sharing options...
motorsep Posted January 23, 2023 Report Share Posted January 23, 2023 Is there an LWO exporter that works with Blender 3.4.1 ? I use some rogue ASE exporter and while it seems to work fine on small low poly models, it seems that it doesn't export properly larger higher poly models Quote Link to comment Share on other sites More sharing options...
stgatilov Posted January 23, 2023 Report Share Posted January 23, 2023 As far as I remember, the engine drops smoothing information from LWO file and applies automatic determination of smooth groups depending on some hardcoded angle. So I'm not sure these smoothing settings will help in TDM or Doom 3. Quote Link to comment Share on other sites More sharing options...
motorsep Posted January 24, 2023 Report Share Posted January 24, 2023 5 hours ago, stgatilov said: As far as I remember, the engine drops smoothing information from LWO file and applies automatic determination of smooth groups depending on some hardcoded angle. So I'm not sure these smoothing settings will help in TDM or Doom 3. Where can I get LWO exporter for Blender 3.4.x to give it a try ? Quote Link to comment Share on other sites More sharing options...
HMart Posted January 25, 2023 Report Share Posted January 25, 2023 On 1/23/2023 at 7:53 PM, stgatilov said: As far as I remember, the engine drops smoothing information from LWO file and applies automatic determination of smooth groups depending on some hardcoded angle. So I'm not sure these smoothing settings will help in TDM or Doom 3. What?! That is news to me, I use .lwo for all my static models and smoothing imports to idtech4 just fine! Thou I most say, I don't use Blender for anything but MD5 models and still use old Modo 601, the same tool Seneca Menard a idSoftware artist uses, and also use his custom Modo plugging's, that he made public, exactly to streamline making static models for Doom 3 and Rage. In modo you can set smoothing angle or edge smoothing (hard or soft edge) and it works in idTech 4, perhaps blender and other tools handle .lwo differently? After all modo was made by the same people that created lightwave 3D, so they literally created the .lwo file system. Quote Link to comment Share on other sites More sharing options...
OrbWeaver Posted January 26, 2023 Report Share Posted January 26, 2023 On 1/23/2023 at 7:27 PM, motorsep said: Is there an LWO exporter that works with Blender 3.4.1 ? As far as I know the most up-to-date one is the script I maintain (there is a single tdm_export script which supports both ASE and LWO export). However I haven't specifically tested with the latest Blender 3.4 series, so it's possible that it will need an update. On 1/23/2023 at 7:53 PM, stgatilov said: As far as I remember, the engine drops smoothing information from LWO file and applies automatic determination of smooth groups depending on some hardcoded angle. So I'm not sure these smoothing settings will help in TDM or Doom 3. I believe this information is out of date. The problem of LWO losing smoothing information was caused by the Blender exporter itself ignoring object-specific data and enforcing a hard-coded smoothing angle. This is now fixed in my latest version, although the old behaviour is selectable at the time of export if you don't want to deal with object smooth groups. As far as I can recall, when I was testing this, the smoothing options did take effect in the engine (although I couldn't say whether they were 100% mathematically correct). 1 Quote DarkRadiant homepage ⋄ DarkRadiant user guide ⋄ OrbWeaver's Dark Ambients ⋄ Blender export scripts Link to comment Share on other sites More sharing options...
stgatilov Posted January 26, 2023 Report Share Posted January 26, 2023 On 1/26/2023 at 9:55 AM, OrbWeaver said: I believe this information is out of date. The problem of LWO losing smoothing information was caused by the Blender exporter itself ignoring object-specific data and enforcing a hard-coded smoothing angle. Well, if I look into the code at https://github.com/stgatilov/darkmod_src/blob/trunk/renderer/Model.cpp#L1101 I see that vertices which are almost equal by positions, texcoords and normals, are merged together. And the constants which control that are r_slopVertex = 0.01, r_slopTexCoord = 0.001, r_slopNormal = 0.02. On the other hand, it is probably OK. It does not break convex or concave edges. And only on mixed-convexity edges of edges with tangential points smoothing can be enforced near tangential points. But only in cases where it is almost zero anyway. Quote Link to comment Share on other sites More sharing options...
OrbWeaver Posted January 26, 2023 Report Share Posted January 26, 2023 Actually I might be confusing two different things. What the latest LWO exporter fixes is the smoothing angle. Previously this was hard-coded at some weird value slightly less than 90°, but this can now be configured to smooth everything, smooth nothing, or use the Autosmooth Angle setting on the object. I have no idea if explicit smooth groups are supported, or if this is even a thing in Blender. Quote DarkRadiant homepage ⋄ DarkRadiant user guide ⋄ OrbWeaver's Dark Ambients ⋄ Blender export scripts Link to comment Share on other sites More sharing options...
Popular Post OrbWeaver Posted April 23 Popular Post Report Share Posted April 23 The Blender export scripts have been updated to work with the new Blender 4.1 series. In this Blender version, they removed "Autosmooth" altogether, along with the corresponding parts of the Python API. This meant that the "Use Autosmooth settings" option had to be removed from the LWO exporter, where it was previously the default setting. The new default is "Full", which smooths the whole mesh, giving similar behaviour to ASE models, although "None" is still an option if you want a completely unsmoothed mesh. 4 1 Quote DarkRadiant homepage ⋄ DarkRadiant user guide ⋄ OrbWeaver's Dark Ambients ⋄ Blender export scripts Link to comment Share on other sites More sharing options...
grodenglaive Posted July 27 Report Share Posted July 27 (edited) Thanks for this. Btw, the very fine ASE exporter for Blender is also working with the new Blender 4.2. In my experience, if Blender gives you an error on export, check that the materials are correctly applied and that the UV map is good. If it still fails, check the object data properties and delete the VertexColourMap attribute (if there is one). That usually fixes it for me. Blender models made from scratch do not have that attribute set by default, so it isn't usually an issue. Note that if you import LWO models from Darkradiant to edit in Blender, that they will have a VertexColourMap. Just delete that or your ASE export will fail. Also the imported LWO models often (always?) have duplicate vertices that will need to be deleted in Blender (just select all, hit m and merge by distance). Edited July 28 by grodenglaive Typo Quote Link to comment Share on other sites More sharing options...
OrbWeaver Posted July 28 Report Share Posted July 28 On 7/27/2024 at 1:28 PM, grodenglaive said: Thanks for this. Btw, the very fine ASE exporter for Blender is also working with the new Blender 4.2. Thanks for testing. I don't rigorously re-test with every new Blender release because most Blender releases don't break the export scripts, although some do obviously (particularly when they make huge changes like removing the whole Autosmooth function). On 7/27/2024 at 1:28 PM, grodenglaive said: In my experience, if Blender gives you an error on export, check that the materials are correctly applied and that the UV map is good Yes, the scripts aren't particularly good at reporting errors unfortunately. I should probably fix that when I have time. By the way, it's LWO — LightWave Object — not IWO. 1 Quote DarkRadiant homepage ⋄ DarkRadiant user guide ⋄ OrbWeaver's Dark Ambients ⋄ Blender export scripts Link to comment Share on other sites More sharing options...
Arcturus Posted September 7 Report Share Posted September 7 The ASE importer doesn't work with Blender 4 series nor Blender 3.6. It works in 2.83.9. In newer versions the error message is KeyError: 'bpy_prop_collection[key]: key "Color" not found' Quote It's only a model... Link to comment Share on other sites More sharing options...
OrbWeaver Posted September 8 Report Share Posted September 8 The ASE importer has never been updated to work with the latest Blender (this is mentioned in the README). Both exporters should work, but the only importer which works is LWO. Quote DarkRadiant homepage ⋄ DarkRadiant user guide ⋄ OrbWeaver's Dark Ambients ⋄ Blender export scripts Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.