Browse Source

fix: update color assignment logic in export_halfpatch_obj for improved variability

test-three-planes-intersection
mckay 4 weeks ago
parent
commit
90d6e57f5d
  1. 4
      network_process/src/process.cpp

4
network_process/src/process.cpp

@ -21,8 +21,8 @@ void export_halfpatch_obj(
mtl << "newmtl patch_" << patch_idx << (is_forward ? "_in" : "_out") << "\n";
// 随机或规律分配颜色
float r = float(patch_idx % 7) / 7.0f;
float g = is_forward ? 0.8f : 0.2f;
float b = 1.0f - r;
float g = float(patch_idx % 3) / 3.0f;
float b = float(patch_idx % 5) / 5.0f;
mtl << "Kd " << r << " " << g << " " << b << "\n";
}
mtl.close();

Loading…
Cancel
Save