|
|
@ -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(); |
|
|
|