Stan` Posted October 7, 2019 Report Share Posted October 7, 2019 Currently, it can be a little annoying to get a mesh from the game in Blender, especially when it has a lot of props. So I created this little blender addon for blender 2.8 What it does is it loads all the files used by the actor recursively (it picks random variants like the game does) and place all objects on their respective prop points using constraints. (Do not forget to disable constraints before exporting, else you might get into trouble) It also assign a diffuse, norm and spec material to the object @Syn I believe this will be way better than the explanation I gave you by e-mail, as it's a one click business @Alexandermb @LordGood @Enrique @Trinketos @The Undying Nephalim I believe you only use blender as a proxy, but it might be helpful for you as well. Here is an example with a model with a lot of props You can test it here https://github.com/StanleySweet/blender_pyrogenesis_importer/releases/download/1.3.6/io_scene_pyrogenesis.zip EDIT: Textures are assigned in the link above. EDIT2: The importer may edit files, to remove materials, effects or images that might have broken the import otherwise EDIT3: Update version. 9 1 Quote Link to comment Share on other sites More sharing options...
Stan` Posted October 7, 2019 Author Report Share Posted October 7, 2019 Better version https://github.com/StanleySweet/blender_pyrogenesis_importer/releases/download/1.3.0/io_scene_pyrogenesis.zip Now with proper player color and transparency support. 2 Quote Link to comment Share on other sites More sharing options...
Alcibiades Posted November 28, 2019 Report Share Posted November 28, 2019 Hello I tried your plugin and unfortunately it gave me the following error messages when importing .... Traceback (most recent call last): File "C:\PortableApps\BlenderPortable\Data\user_scripts\addons\io_scene_pyrogenesis\__init__.py", line 124, in execute return self.import_pyrogenesis_actor(context) File "C:\PortableApps\BlenderPortable\Data\user_scripts\addons\io_scene_pyrogenesis\__init__.py", line 263, in import_pyrogenesis_actor self.parse_actor(root) File "C:\PortableApps\BlenderPortable\Data\user_scripts\addons\io_scene_pyrogenesis\__init__.py", line 448, in parse_actor fixer.execute() File "C:\PortableApps\BlenderPortable\Data\user_scripts\addons\io_scene_pyrogenesis\__init__.py", line 674, in execute warnings.warn("subchild: "+ subchild.tag) NameError: name 'warnings' is not defined location: <unknown location>:-1 Quote Link to comment Share on other sites More sharing options...
Stan` Posted November 28, 2019 Author Report Share Posted November 28, 2019 49 minutes ago, Alcibiades said: Hello I tried your plugin and unfortunately it gave me the following error messages when importing .... Traceback (most recent call last): File "C:\PortableApps\BlenderPortable\Data\user_scripts\addons\io_scene_pyrogenesis\__init__.py", line 124, in execute return self.import_pyrogenesis_actor(context) File "C:\PortableApps\BlenderPortable\Data\user_scripts\addons\io_scene_pyrogenesis\__init__.py", line 263, in import_pyrogenesis_actor self.parse_actor(root) File "C:\PortableApps\BlenderPortable\Data\user_scripts\addons\io_scene_pyrogenesis\__init__.py", line 448, in parse_actor fixer.execute() File "C:\PortableApps\BlenderPortable\Data\user_scripts\addons\io_scene_pyrogenesis\__init__.py", line 674, in execute warnings.warn("subchild: "+ subchild.tag) NameError: name 'warnings' is not defined location: <unknown location>:-1 Sorry for the inconvenience can you try with the fix I just pushed? Quote Link to comment Share on other sites More sharing options...
Alcibiades Posted November 28, 2019 Report Share Posted November 28, 2019 Thank you so much. The majority of the units I have tested are now importing into Blender 2.81. This Addon is very helpful. There are some units still giving errors such as below. \0ad-master\binaries\data\mods\public\art\actors\structures\athenians\trireme.xml Traceback (most recent call last): File "C:\PortableApps\BlenderPortable\Data\user_scripts\addons\io_scene_pyrogenesis\__init__.py", line 124, in execute return self.import_pyrogenesis_actor(context) File "C:\PortableApps\BlenderPortable\Data\user_scripts\addons\io_scene_pyrogenesis\__init__.py", line 263, in import_pyrogenesis_actor self.parse_actor(root) File "C:\PortableApps\BlenderPortable\Data\user_scripts\addons\io_scene_pyrogenesis\__init__.py", line 430, in parse_actor variant['props'].append(prop) TypeError: element indices must be integers location: <unknown location>:-1 Quote Link to comment Share on other sites More sharing options...
Stan` Posted November 28, 2019 Author Report Share Posted November 28, 2019 Interesting, thanks. In general I would avoid animated objects. The support isn't complete and action are not imported. For those it's better to use the blendfiles when available. Let me know if you need a specific one. Might I ask what your use of the tool is? 1 Quote Link to comment Share on other sites More sharing options...
Alcibiades Posted November 28, 2019 Report Share Posted November 28, 2019 4 minutes ago, Stan` said: Interesting, thanks. In general I would avoid animated objects. The support isn't complete and action are not imported. For those it's better to use the blendfiles when available. Let me know if you need a specific one. Might I ask what your use of the tool is? I began learning Blender in my spare time 6 months ago and I am fascinated by Ancient Civilizations. Exploring the models helps me understand how they are made and if I can I would like to contribute as my skills improve. 1 Quote Link to comment Share on other sites More sharing options...
Stan` Posted November 28, 2019 Author Report Share Posted November 28, 2019 1 minute ago, Alcibiades said: I began learning Blender in my spare time 6 months ago and I am fascinated by Ancient Civilizations. Exploring the models helps me understand how they are made and if I can I would like to contribute as my skills improve. @feneur can you lift his post limit. Nice to hear! Let me know if there is anything I can do to help you get started. Like if you need help creating a mod, getting a model in the game or looking for a specific topic related to art. You can also anything you might need for this project really. Quote Link to comment Share on other sites More sharing options...
Alcibiades Posted November 28, 2019 Report Share Posted November 28, 2019 Currently on import "Specular" images are set to SRGB. I read somewhere that "Specular" images should be set to the Color Space "Non-Color". I tried this one a few models and it increased the effect. I hope this helps. Quote Link to comment Share on other sites More sharing options...
Alcibiades Posted November 28, 2019 Report Share Posted November 28, 2019 This works ... if texture.split('|')[0] == 'specTex': #My Change Start texImage.image.colorspace_settings.name='Non-Color' #My Change End mat.node_tree.links.new(bsdf.inputs['Specular'], texImage.outputs['Color']) continue Quote Link to comment Share on other sites More sharing options...
Stan` Posted November 28, 2019 Author Report Share Posted November 28, 2019 Does it work as well if the specular has actual color? Thanks a lot for testing Quote Link to comment Share on other sites More sharing options...
Alcibiades Posted November 28, 2019 Report Share Posted November 28, 2019 From what I read they are usually black & white for game engines for performance reasons but this is all new to me. Quote Link to comment Share on other sites More sharing options...
Stan` Posted November 28, 2019 Author Report Share Posted November 28, 2019 8 minutes ago, Alcibiades said: From what I read they are usually black & white for game engines for performance reasons but this is all new to me. Usually they are (Actually most of the time), but our engine supports using the color channel and the alpha channel to do stuff. Quote Link to comment Share on other sites More sharing options...
Alcibiades Posted November 28, 2019 Report Share Posted November 28, 2019 Found some bronze armour with a colored spec map. 1 Quote Link to comment Share on other sites More sharing options...
Stan` Posted November 28, 2019 Author Report Share Posted November 28, 2019 Alright Quote Link to comment Share on other sites More sharing options...
Stan` Posted November 28, 2019 Author Report Share Posted November 28, 2019 It's committed thanks. 2 Quote Link to comment Share on other sites More sharing options...
Bestinbest Posted December 31, 2019 Report Share Posted December 31, 2019 Please how can we export the meshes? Is there an other topic? Quote Link to comment Share on other sites More sharing options...
Stan` Posted December 31, 2019 Author Report Share Posted December 31, 2019 54 minutes ago, Bestinbest said: Please how can we export the meshes? Is there an other topic? Hello, As implied by the name I only wrote the importer. To export you need to use the standard workflow with XML and collada. Do you need help? Quote Link to comment Share on other sites More sharing options...
Bestinbest Posted December 31, 2019 Report Share Posted December 31, 2019 (edited) Yes thank you I just discovered the game and I find it amazing. I downloaded the add-on but where are the dae files? And how to import them? I thought the add-on was for special files I found but it only suggest xml. My problem is that I don't know how to find dae file : all that I found is dae.cached.pmd (D:\jeux\0 A.D. alpha\binaries\data\mods\public\public.zip\art\meshes\structural), and I don't know how to import them. After yhat, I suppose that I only need to replace them to change the game objects. Edited December 31, 2019 by Bestinbest orthographe Quote Link to comment Share on other sites More sharing options...
Loki1950 Posted December 31, 2019 Report Share Posted December 31, 2019 In your local install all of the games assets are found in the public.zip though the textures/images are in compressed dds format which you may find a bit tricky to open with out a dds plugin for your image editing app the reason that it's under mods is that even the main game is in fact a mod for the base engine which you can also see on the mod selection screen so do not disable it on that screen by mistake if you have problems getting to a file on your hard drive you can browse the svn repo on trac which you can get to by the Development link on the forums header that's also our wiki with lots on useful links there. Enjoy the Choice Quote Link to comment Share on other sites More sharing options...
Stan` Posted December 31, 2019 Author Report Share Posted December 31, 2019 To access the assets in a usable format for blender you need the development version. The dae are also cached in the release version. If you need me to explain it in French let me know 1 Quote Link to comment Share on other sites More sharing options...
Bestinbest Posted January 1, 2020 Report Share Posted January 1, 2020 (edited) Speaking english is not to hard for me but maybe for who reads me. Is it possible to get the development version? and this is my public.zip, I don't find any texture or images... Edited January 1, 2020 by Bestinbest add picture Quote Link to comment Share on other sites More sharing options...
Stan` Posted January 1, 2020 Author Report Share Posted January 1, 2020 2 minutes ago, Bestinbest said: Speaking english is not to hard for me but maybe for who reads me. Is it possible to get the development version? Sure it is possible. If you are more familiar with git you can clone the repository https://github.com/0ad/0ad (It is slightly less up to date (lagging one day behind) and you'll need to compile the game if you want to play) Else you need to clone the SVN repository https://svn.wildfiregames.com/public/ps/trunk/ If you need to build you'll find more detailed information here. https://trac.wildfiregames.com/wiki/BuildInstructions Quote Link to comment Share on other sites More sharing options...
Bestinbest Posted January 2, 2020 Report Share Posted January 2, 2020 Ok thank you I cloned with git on linux... Sorry to not respond earlier, my number of post per day is limited to 3. Quote Link to comment Share on other sites More sharing options...
Stan` Posted January 2, 2020 Author Report Share Posted January 2, 2020 Just now, Bestinbest said: Ok thank you I cloned with git on linux... Sorry to not respond earlier, my number of post per day is limited to 3. Oh my bad, I usually ping someone to lift the post limit. How can I help? Quote 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.