feat(editor): island terrain generator with beach falloff

- Island Generator: creates raised center terrain dropping to edges
  with configurable center height and edge drop depth
- Flat interior plateau → gradual beach slope → steep underwater drop
- Preserves existing noise detail at 30% blend for natural variation
- Add water around the island for instant ocean environment
- Workflow: New Terrain → Island → Noise → Smooth → Auto-paint
This commit is contained in:
Kelsi 2026-05-05 07:35:18 -07:00
parent f15fbf508f
commit 7971fd7989
3 changed files with 58 additions and 0 deletions

View file

@ -603,6 +603,18 @@ void EditorUI::renderBrushPanel(EditorApp& app) {
ImGui::TextColored(ImVec4(0.6f, 0.6f, 0.6f, 1), "No stamp copied");
}
if (ImGui::CollapsingHeader("Island Generator")) {
static float islandHeight = 30.0f, islandDrop = 20.0f;
ImGui::SliderFloat("Center Height##island", &islandHeight, 5.0f, 100.0f);
ImGui::SliderFloat("Edge Drop##island", &islandDrop, 5.0f, 50.0f);
if (ImGui::Button("Create Island Shape", ImVec2(-1, 0))) {
app.getTerrainEditor().createIsland(islandHeight, islandDrop);
app.showToast("Island created");
}
ImGui::TextColored(ImVec4(0.6f, 0.6f, 0.6f, 1),
"Raised center dropping to edges. Add water around for ocean.");
}
if (ImGui::CollapsingHeader("Ridge / Mountain Range")) {
static glm::vec3 ridgeStart{0}, ridgeEnd{0};
static float ridgeWidth = 20.0f, ridgeHeight = 30.0f;