OpenSAGE.BlenderPlugin icon indicating copy to clipboard operation
OpenSAGE.BlenderPlugin copied to clipboard

New features & bug fix

Open nkx111 opened this issue 6 months ago • 2 comments

material rework

  1. Now the plugin exports/maintains material-specific parameter list. Selecting different materials(shaders) change the "W3D Properties" Panel. Filling the columns in the panel will take effect in the editor. No need to edit nodes of Principled BSDF.
  2. FX preview. Supports preview of DefaultW3D、ObjectsAlliedTread、FXLightning、MuzzleFlash、TreeSway. Supports preview of faction color and damage holes.
  3. Output material group definition. Since different C&C has slightly different shader parameters, we can now set a target game for material output. Materials from other games will be converted to the most proximal material. Now only support RA3 material

other changes

  1. Texture file path: the plugin now has a list of paths to find texture file. It can be set in the preferences panel.
  2. Always return to the object mode before exporting
  3. Mesh/obbox export now supports object-level transform (previously it only reads scale, no translation and rotation)
  4. Updated w3x-file-export options. Removed option "use existing skeleton" (because you can always select not to export hierarchy). Optimized individual file output and texture xml generation.

bug fixes

  1. When exporting meshes, after splitting vertices, the normals of the new vertices are not correct. https://github.com/OpenSAGE/OpenSAGE.BlenderPlugin/commit/1c76edfc5a7b4ed40edf1bd69360044922c0b08d#diff-30129995f52992a0fea8895084e5bd9368e05d1455769b44f2a26739b0f839acL381
  2. Vertex colors are not correctly exported https://github.com/OpenSAGE/OpenSAGE.BlenderPlugin/commit/4c48aaf704f455706843efb3a57a76042e1b5e1e
  3. Typo error in the addon updater https://github.com/nkx111/OpenSAGE.BlenderPlugin/commit/5c80bde0f4c1bedfecf58c6427523bc440c252bf#diff-7eb1223bf2ff61614e06957ac695372c7e811277e8eeee1663fb1ab695f0a14cR466

nkx111 avatar Jun 07 '25 19:06 nkx111

Hi @nkx111 this already looks amazing thank you! Unfortunately since even with your changes the tests to not run at the moment i want to invest more time to get this fixed before merging. Did you also test with other game files other than RA3? Since the scope of this plugin is to support as many sage games as possible.

Tarcontar avatar Jul 19 '25 08:07 Tarcontar

Hi @Tarcontar, thank you for the help with CI. For other sage games, I tested importing and it works fine. But currently it cannot export to the format of these games. e.g. ObjectsGDI --import--> ObjectsAllied --export--> ObjectsAllied(only for RA3)

In principle for each game we can just create a material list like this: https://github.com/nkx111/OpenSAGE.BlenderPlugin/blob/master/io_mesh_w3d/common/materials/RA3/parameter_map.py and create a set of noding logic like this: https://github.com/nkx111/OpenSAGE.BlenderPlugin/blob/master/io_mesh_w3d/common/materials/RA3/properties.py

I have no modding experience on other sage games and cannot create such material list by myself. But I guess, since most of the shader parameters are common, and shaders like DefaultW3D works similar, with few efforts (or maybe the help of modding experts from these games) we can set these up.

nkx111 avatar Aug 10 '25 09:08 nkx111