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
@@ -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