mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-06 09:03:52 +00:00
feat(editor): scatter texture patches for natural surface variety
- Scatter Patches: randomly places texture circles across the terrain for natural-looking surface variation (dirt patches, rock outcrops) - Configurable count, min/max radius, and seed - Preset buttons for dirt and rock patches - Uses the existing paint() method with random positions - Adds visual variety to otherwise uniform terrain texturing
This commit is contained in:
parent
16a096b25d
commit
b00143e8f7
3 changed files with 46 additions and 0 deletions
|
|
@ -904,6 +904,28 @@ void EditorUI::renderTexturePaintPanel(EditorApp& app) {
|
|||
selectedTexture_.c_str());
|
||||
|
||||
// Auto-paint by height
|
||||
if (ImGui::CollapsingHeader("Scatter Patches")) {
|
||||
static int patchCount = 15;
|
||||
static float patchMinR = 10.0f, patchMaxR = 30.0f;
|
||||
static int patchSeed = 55;
|
||||
ImGui::SliderInt("Count##patches", &patchCount, 5, 50);
|
||||
ImGui::DragFloatRange2("Radius##patches", &patchMinR, &patchMaxR, 1.0f, 5.0f, 80.0f);
|
||||
ImGui::InputInt("Seed##patches", &patchSeed);
|
||||
if (ImGui::Button("Scatter Dirt Patches", ImVec2(-1, 0))) {
|
||||
app.getTexturePainter().scatterPatches(
|
||||
"Tileset\\Elwynn\\ElwynnDirtBase.blp", patchCount, patchMinR, patchMaxR,
|
||||
static_cast<uint32_t>(patchSeed));
|
||||
app.showToast("Patches scattered");
|
||||
}
|
||||
if (ImGui::Button("Scatter Rock Patches", ImVec2(-1, 0))) {
|
||||
app.getTexturePainter().scatterPatches(
|
||||
"Tileset\\Barrens\\BarrensRock01.blp", patchCount, patchMinR, patchMaxR,
|
||||
static_cast<uint32_t>(patchSeed + 1));
|
||||
app.showToast("Patches scattered");
|
||||
}
|
||||
ImGui::TextColored(ImVec4(0.6f,0.6f,0.6f,1), "Random texture patches for variety");
|
||||
}
|
||||
|
||||
if (ImGui::CollapsingHeader("Gradient Blend")) {
|
||||
static int gradDir = 0;
|
||||
ImGui::RadioButton("Horizontal##grad", &gradDir, 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue