Move the heightmap PNGs out of Content into RawContent/World
The editor offered to import them as textures on every start; source files for authoring scripts do not belong under Content. create_world.py and generate_heightmap.py read them from RawContent/World/Heightmaps. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5.1
parent
1945ef033b
commit
4025b04941
@@ -39,7 +39,7 @@ Claude Code at it. Reconnect with `/mcp` once the editor is up. Close the editor
|
||||
before a shell build.
|
||||
|
||||
Off the ladder: `Content/Maps/L_World`, a ~200 km² world-partitioned landscape built by
|
||||
`Scripts/Authoring/create_world.py` from PNGs in `Content/World/Heightmaps/` (seeded by `generate_heightmap.py`)
|
||||
`Scripts/Authoring/create_world.py` from PNGs in `RawContent/World/Heightmaps/` (seeded by `generate_heightmap.py`)
|
||||
through `ULandscapeAuthoringLibrary` in the `SaltyEditor` module. It uses Elite_RockyMeadows' landscape material.
|
||||
No gameplay code references it; the gym is still the test level.
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ the reasoning lives in the specs, this is the memory.
|
||||
|
||||
- 2026-09-16 — Off the ladder, at the user's request: `L_World`, a world-partitioned ~200 km² landscape from a
|
||||
seeded heightmap. `Scripts/Authoring/generate_heightmap.py` (numpy, in `Scripts/Authoring/.pylib` via
|
||||
`bootstrap-pylib.sh`) writes 16-bit height and 8-bit weight PNGs to `Content/World/Heightmaps/`;
|
||||
`bootstrap-pylib.sh`) writes 16-bit height and 8-bit weight PNGs to `RawContent/World/Heightmaps/`;
|
||||
`create_world.py` rebuilds the level from them through `ULandscapeAuthoringLibrary` in the new `SaltyEditor`
|
||||
module, because the engine exposes no landscape creation to Python. Elite_RockyMeadows' landscape material and
|
||||
three layer infos. Swap the terrain by replacing the PNGs and rerunning. Nothing in gameplay references it.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
"""Builds /Game/Maps/L_World: a world-partitioned level with a ~200 km2 landscape from the heightmap PNGs in
|
||||
Content/World/Heightmaps/, the Elite_RockyMeadows landscape material, daylight and a player start. Rebuilds
|
||||
RawContent/World/Heightmaps/, the Elite_RockyMeadows landscape material, daylight and a player start. Rebuilds
|
||||
from scratch every run; the level is a product of this script and the PNGs, never hand-edited.
|
||||
|
||||
UnrealEditor-Cmd.exe Salty.uproject -run=pythonscript -script=Scripts/Authoring/create_world.py
|
||||
@@ -21,7 +21,7 @@ sys.path.insert(0, HERE)
|
||||
sys.path.insert(0, os.path.join(HERE, ".pylib"))
|
||||
|
||||
LEVEL_PATH = "/Game/Maps/L_World"
|
||||
HEIGHTMAP_DIR = os.path.normpath(os.path.join(HERE, "..", "..", "Content", "World", "Heightmaps"))
|
||||
HEIGHTMAP_DIR = os.path.normpath(os.path.join(HERE, "..", "..", "RawContent", "World", "Heightmaps"))
|
||||
HEIGHTMAP = os.path.join(HEIGHTMAP_DIR, "L_World_Height.png")
|
||||
PACK = "/Game/Elite_RockyMeadows"
|
||||
LANDSCAPE_MATERIAL = f"{PACK}/Materials/M_Landscape_Main_Inst_RockyMeadows02"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"""Generates a seeded heightmap and three weightmaps for L_World, as 16-bit and 8-bit greyscale PNGs.
|
||||
|
||||
Pure numpy, no engine: run it with any Python that has numpy, or let create_world.py call it. The output is
|
||||
plain files under Content/World/Heightmaps/, so swapping the terrain later is dropping in a different PNG of
|
||||
plain files under RawContent/World/Heightmaps/, so swapping the terrain later is dropping in a different PNG of
|
||||
any resolution and rerunning create_world.py; nothing else in the project knows how the terrain was made.
|
||||
|
||||
UE_5.8/Engine/Binaries/ThirdParty/Python3/Win64/python.exe Scripts/Authoring/generate_heightmap.py [--seed N] [--size 4033]
|
||||
@@ -21,7 +21,7 @@ HERE = os.path.dirname(os.path.abspath(__file__))
|
||||
sys.path.insert(0, os.path.join(HERE, ".pylib"))
|
||||
import numpy as np # noqa: E402
|
||||
|
||||
OUT_DIR = os.path.normpath(os.path.join(HERE, "..", "..", "Content", "World", "Heightmaps"))
|
||||
OUT_DIR = os.path.normpath(os.path.join(HERE, "..", "..", "RawContent", "World", "Heightmaps"))
|
||||
SEA_LEVEL = 0.18 # fraction of the 16-bit range that is sea; create_world.py places the water plane here
|
||||
PAD_RADIUS_FRACTION = 0.01 # flat spawn pad, as a fraction of the map width
|
||||
|
||||
|
||||
Reference in New Issue
Block a user