mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-05-06 09:03:52 +00:00
feat(editor): detail noise for adding small-scale terrain roughness
- Detail Noise: adds high-frequency roughness to existing terrain without destroying the overall shape (amplitude 0.5-10, freq 0.01-0.5) - Useful after smooth/generate to break up unnaturally smooth surfaces - Workflow: generate → smooth → detail noise for natural look - Separate seed from main noise generator for independent control
This commit is contained in:
parent
fab77952a6
commit
3504e57f75
3 changed files with 41 additions and 0 deletions
|
|
@ -651,6 +651,21 @@ void EditorUI::renderBrushPanel(EditorApp& app) {
|
|||
ImGui::TextColored(ImVec4(0.6f, 0.6f, 0.6f, 1), "No stamp copied");
|
||||
}
|
||||
|
||||
if (ImGui::CollapsingHeader("Detail Noise")) {
|
||||
static float detailAmp = 2.0f, detailFreq = 0.1f;
|
||||
static int detailSeed = 99;
|
||||
ImGui::SliderFloat("Amplitude##detail", &detailAmp, 0.5f, 10.0f);
|
||||
ImGui::SliderFloat("Frequency##detail", &detailFreq, 0.01f, 0.5f, "%.3f");
|
||||
ImGui::InputInt("Seed##detail", &detailSeed);
|
||||
if (ImGui::Button("Add Detail", ImVec2(-1, 0))) {
|
||||
app.getTerrainEditor().addDetailNoise(detailAmp, detailFreq,
|
||||
static_cast<uint32_t>(detailSeed));
|
||||
app.showToast("Detail noise added");
|
||||
}
|
||||
ImGui::TextColored(ImVec4(0.6f, 0.6f, 0.6f, 1),
|
||||
"Adds small-scale roughness to existing terrain");
|
||||
}
|
||||
|
||||
if (ImGui::CollapsingHeader("Edge Ramp (Multi-tile)")) {
|
||||
static float rampTarget = 100.0f, rampWidth = 20.0f;
|
||||
ImGui::SliderFloat("Target Height##ramp", &rampTarget, 0.0f, 500.0f);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue