Skip to content

Conversation

@nkx111
Copy link
Contributor

@nkx111 nkx111 commented Jun 7, 2025

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. 1c76edf#diff-30129995f52992a0fea8895084e5bd9368e05d1455769b44f2a26739b0f839acL381
  2. Vertex colors are not correctly exported 4c48aaf
  3. Typo error in the addon updater nkx111@5c80bde#diff-7eb1223bf2ff61614e06957ac695372c7e811277e8eeee1663fb1ab695f0a14cR466

@Tarcontar
Copy link
Collaborator

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.

@nkx111
Copy link
Contributor Author

nkx111 commented Aug 10, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants