mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-03 02:17:14 +00:00
feat(ugc): opt-in metal and glow shader groups in made models
Player models are multishader (RenderComponent shader 100): the client wraps each NiLODNode and draws it with the mapShaders id in its name. With shader_metal, shader_brushed or shader_glow set, the opaque bricks are split by look into S<id>_Metal_Model, S<id>_Brushed_Model and S<id>_Glow_Model beside S01_Opaque_Model and S01_Alpha_Model, each with every LOD level. Metal is LU Toolbox's metallic colors plus Materials.xml types (shinySteel; brushedSteel and matteSteel for brushed), glow its glow colors. Glow shapes get an emissive material (glow_emissive) and their plain color, not the baked one. Transparent glow stays in S01_Alpha. All off by default, which writes the same bytes as before (tested). Not how live looked; models already made change only when made again. The icon renderer reads the groups back by tag and draws glow at its plain color and metal with a tinted reflection and highlight. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -40,12 +40,16 @@ namespace UgcFormats {
|
||||
std::string name; // S01_Opaque_Model: the NiLODNode and its shapes
|
||||
bool transparent{};
|
||||
std::vector<NifLod> lods;
|
||||
// NiMaterialProperty's emissive color (grey) of the group's shapes; 0 the shared white material with none.
|
||||
// The client's emissive shader (S46) lerps from the lit color to the vertex color by vertex alpha times its red.
|
||||
float emissive{};
|
||||
};
|
||||
|
||||
/**
|
||||
* The layout LU Toolbox exports (setup_lod_data) and the game's own brick models (res/BrickModels/ndmade) have:
|
||||
* the root node, an NiLODNode per group with NiRangeLODData holding each level's distances, a node per level and
|
||||
* the level's shapes under it, named like the group. Properties as WriteNif.
|
||||
* the level's shapes under it, named like the group. Properties as WriteNif; a group with
|
||||
* an emissive color gets a material of its own.
|
||||
*/
|
||||
std::string WriteLodNif(const std::string& rootName, const std::vector<NifLodGroup>& groups);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user