From 4dc0c0faf78072ea5d82241d107512187dbdaf13 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Wed, 15 Jul 2026 06:39:54 +0100 Subject: [PATCH] Publish the authored native environment --- Aetheria.State.Daemon.Smoke/Program.cs | 19 +++++++++ Aetheria.Unity/Packages/manifest.json | 2 +- Aetheria.Unity/Packages/packages-lock.json | 4 +- Assets/Editor/EveAssetBundleBuilder.cs | 17 +++++++- .../Runtime/AetheriaRuntimeAssets.cs | 42 +++++++++++++++++++ ...AetheriaRuntimeDaemonGameSurfaceBuilder.cs | 5 ++- docs/original-game-rendering-spec.md | 14 +++++++ 7 files changed, 98 insertions(+), 5 deletions(-) diff --git a/Aetheria.State.Daemon.Smoke/Program.cs b/Aetheria.State.Daemon.Smoke/Program.cs index 1c90d76c4..a1ebb51c7 100644 --- a/Aetheria.State.Daemon.Smoke/Program.cs +++ b/Aetheria.State.Daemon.Smoke/Program.cs @@ -511,6 +511,11 @@ internal sealed class AetheriaDaemonYmirSmokeChecks world.Props["lookModel"] == "planar-yaw.v1" && world.Props["lookSensitivityRadians"] == "-0.001", "playable world must advertise the daemon-owned continuous look command and fossil pointer response"); + Require(world.Props["skyboxAssetRef"] == "material.environment.skybox" && + world.Props["reflectionAssetRef"] == "texture.environment.reflection" && + world.Props["reflectionIntensity"] == "1" && + world.Props["ambientLightIntensity"] == "1.46", + "playable world must advertise the provider-owned fossil skybox and ambient response"); Require(aim.Props["controlledEntityIndex"] == "0" && aim.Props["convergenceTargetEntityId"] == run.EntityRecordKey(0, 1) && aim.Props["minimumConvergenceDistance"] == "50", @@ -681,6 +686,20 @@ internal sealed class AetheriaDaemonYmirSmokeChecks RequireNear(30, behavior.Fields.Single(field => field.Key == 27).Value.NumberValue, 0.000001, "catalog mine must retain thirty-second lifetime"); var manifest = AetheriaRuntimeAssets.ProjectManifest(catalog); + var skybox = manifest.Assets.Single(value => value.Ref.AssetKey == "material.environment.skybox"); + RequireEqual(AetheriaRuntimeAssetKinds.Material, skybox.Ref.Kind, + "provider must type the fossil skybox as a native material asset"); + RequireEqual("environment.skybox", skybox.Ref.Metadata["presentationRole"], + "provider must advertise the generic skybox presentation role"); + RequireEqual("Assets/Materials/Skybox.mat", skybox.Ref.Metadata["unityAssetPath"], + "provider bundle must own the fossil skybox material"); + var reflection = manifest.Assets.Single(value => value.Ref.AssetKey == "texture.environment.reflection"); + RequireEqual(AetheriaRuntimeAssetKinds.Texture, reflection.Ref.Kind, + "provider must type the pre-generated environment map as a texture asset"); + RequireEqual("environment.reflection", reflection.Ref.Metadata["presentationRole"], + "provider must advertise the generic reflection presentation role"); + RequireEqual("Assets/Textures/studio2.hdr", reflection.Ref.Metadata["unityAssetPath"], + "provider bundle must own the pre-generated reflection map without an importer plugin"); var asset = manifest.Assets.Single(value => value.Ref.AssetKey == "prefab.entity.mine"); RequireEqual("physical-payload.mine", asset.Ref.Metadata["presentationRole"], "provider must advertise the script-free mine presentation role"); diff --git a/Aetheria.Unity/Packages/manifest.json b/Aetheria.Unity/Packages/manifest.json index b3b715291..62c2d6a47 100644 --- a/Aetheria.Unity/Packages/manifest.json +++ b/Aetheria.Unity/Packages/manifest.json @@ -9,6 +9,6 @@ "org.gamecult.cultlib": "https://github.com/GameCult/CultLib.git?path=/unity/org.gamecult.cultlib#cultlib-unity-v1.0.13", "org.gamecult.eve.plugin-fields": "https://github.com/GameCult/EvePlugins.git?path=/plugins/eve-plugin-fields/unity/org.gamecult.eve.plugin-fields#eve-plugin-fields-unity-v0.1.1", "org.gamecult.eve.surface": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.surface#eveunity-surface-v0.2.1", - "org.gamecult.eve.unity-scene": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.unity-scene#eveunity-scene-v0.3.25" + "org.gamecult.eve.unity-scene": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.unity-scene#eveunity-scene-v0.3.26" } } diff --git a/Aetheria.Unity/Packages/packages-lock.json b/Aetheria.Unity/Packages/packages-lock.json index 96f144c49..a38a99ca3 100644 --- a/Aetheria.Unity/Packages/packages-lock.json +++ b/Aetheria.Unity/Packages/packages-lock.json @@ -142,7 +142,7 @@ "hash": "d0aa50d31f3b6da96bffc194fdc3aa358f37e332" }, "org.gamecult.eve.unity-scene": { - "version": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.unity-scene#eveunity-scene-v0.3.25", + "version": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.unity-scene#eveunity-scene-v0.3.26", "depth": 0, "source": "git", "dependencies": { @@ -151,7 +151,7 @@ "org.gamecult.eve.surface": "0.2.1", "com.unity.mathematics": "1.3.2" }, - "hash": "58d87c628a261751439584263c18e93a7d8d8708" + "hash": "7e2c2fa720ca3437aa1b569ffba3a57e6b6f05c5" }, "com.unity.modules.assetbundle": { "version": "1.0.0", diff --git a/Assets/Editor/EveAssetBundleBuilder.cs b/Assets/Editor/EveAssetBundleBuilder.cs index e93a9308a..dc1de926c 100644 --- a/Assets/Editor/EveAssetBundleBuilder.cs +++ b/Assets/Editor/EveAssetBundleBuilder.cs @@ -499,13 +499,28 @@ namespace Aetheria.Editor throw new InvalidOperationException($"Aetheria Eve bundle could not be loaded: {bundlePath}"); try { - foreach (var assetPath in bundle.GetAllAssetNames().Where(path => path.EndsWith(".prefab", StringComparison.OrdinalIgnoreCase))) + var assetNames = bundle.GetAllAssetNames(); + foreach (var assetPath in assetNames.Where(path => path.EndsWith(".prefab", StringComparison.OrdinalIgnoreCase))) VerifyPrefab(bundle.LoadAsset(assetPath), assetPath); + var skybox = LoadAuthoredAsset(bundle, assetNames, "Assets/Materials/Skybox.mat"); + if (skybox == null || skybox.shader == null || !skybox.shader.isSupported) + throw new InvalidOperationException("Aetheria Eve bundle has no supported provider skybox material."); + var reflection = LoadAuthoredAsset(bundle, assetNames, "Assets/Textures/studio2.hdr"); + if (reflection == null) + throw new InvalidOperationException("Aetheria Eve bundle has no provider reflection cubemap."); } finally { bundle.Unload(true); } } + + private static T LoadAuthoredAsset(AssetBundle bundle, IEnumerable assetNames, string authoredPath) + where T : UnityEngine.Object + { + var nativePath = assetNames.FirstOrDefault(path => + string.Equals(path, authoredPath, StringComparison.OrdinalIgnoreCase)); + return string.IsNullOrWhiteSpace(nativePath) ? null : bundle.LoadAsset(nativePath); + } } } diff --git a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeAssets.cs b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeAssets.cs index 2a7c08d0f..be6e5df7f 100644 --- a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeAssets.cs +++ b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeAssets.cs @@ -25,6 +25,8 @@ namespace GameCult.Aetheria.State.Verse string baseUri = "cultmesh://aetheria.local/assets") { var entries = new Dictionary(StringComparer.Ordinal); + Add(entries, EnvironmentSkyboxMaterial()); + Add(entries, EnvironmentReflectionCubemap()); Add(entries, MapIcon("entity.player", "Player", "Sprites/Icons/Stroked/Ship")); Add(entries, MapIcon("entity.ship", "Ship", "Sprites/Icons/Stroked/Ship")); Add(entries, MapIcon("entity.orbital", "Orbital", "Sprites/Icons/Stroked/orbital")); @@ -164,6 +166,46 @@ namespace GameCult.Aetheria.State.Verse }; } + public static AetheriaRuntimeAssetManifestEntry EnvironmentSkyboxMaterial() + { + return new AetheriaRuntimeAssetManifestEntry + { + Ref = new AetheriaRuntimeAssetRef + { + AssetKey = "material.environment.skybox", + Kind = AetheriaRuntimeAssetKinds.Material, + Uri = CultMeshAssetUri("material.environment.skybox"), + MimeType = "application/vnd.unity.material", + Metadata = new Dictionary(StringComparer.Ordinal) + { + ["unityAssetPath"] = "Assets/Materials/Skybox.mat", + ["presentationRole"] = "environment.skybox" + } + }, + Tags = new[] { "presentation", "environment", "skybox" } + }; + } + + public static AetheriaRuntimeAssetManifestEntry EnvironmentReflectionCubemap() + { + return new AetheriaRuntimeAssetManifestEntry + { + Ref = new AetheriaRuntimeAssetRef + { + AssetKey = "texture.environment.reflection", + Kind = AetheriaRuntimeAssetKinds.Texture, + Uri = CultMeshAssetUri("texture.environment.reflection"), + MimeType = "image/vnd.radiance", + Metadata = new Dictionary(StringComparer.Ordinal) + { + ["unityAssetPath"] = "Assets/Textures/studio2.hdr", + ["presentationRole"] = "environment.reflection" + } + }, + Tags = new[] { "presentation", "environment", "reflection", "pre-generated" } + }; + } + private static AetheriaRuntimeAssetManifestEntry MapIcon( string key, string label, diff --git a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeDaemonGameSurfaceBuilder.cs b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeDaemonGameSurfaceBuilder.cs index 18ddfef12..c8da51594 100644 --- a/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeDaemonGameSurfaceBuilder.cs +++ b/Packages/org.gamecult.aetheria.state/Runtime/AetheriaRuntimeDaemonGameSurfaceBuilder.cs @@ -599,7 +599,10 @@ namespace GameCult.Aetheria.State.Verse ["cameraNearClipPlane"] = "0.3", ["cameraFarClipPlane"] = "4096", ["ambientLightColor"] = "0.2,0.2,0.2", - ["ambientLightIntensity"] = "1", + ["ambientLightIntensity"] = "1.46", + ["skyboxAssetRef"] = "material.environment.skybox", + ["reflectionAssetRef"] = "texture.environment.reflection", + ["reflectionIntensity"] = "1", ["viewId"] = "pilot", ["excludedRenderChannels"] = "map", ["playerEntityId"] = playerEntityId, diff --git a/docs/original-game-rendering-spec.md b/docs/original-game-rendering-spec.md index aececf151..2d7820faa 100644 --- a/docs/original-game-rendering-spec.md +++ b/docs/original-game-rendering-spec.md @@ -92,6 +92,20 @@ Material profiles describe intent such as opaque PBR, transparent, additive, field, shield, and celestial. They expose typed parameters and texture slots; they do not publish Unity shader names as portable authority. +The current native environment seed packages the authored procedural skybox +material at `Assets/Materials/Skybox.mat` and the pre-generated Radiance image +at `Assets/Textures/studio2.hdr`. The HDR source is 4096 by 2048 pixels with +SHA-256 `A2886F1024F67DCB082DA3C97741B4B0824A2E784A697807DBE5DCEB597F85E0`; +it entered the reference project in commit `b53e4aec` on 2021-02-26. The +repository contains no external license attribution for that file, so its +redistribution clearance remains unverified. Treat it as migration material, +not a provenance claim. + +Texture generation is an offline authoring concern. Aetheria consumes packaged, +pre-generated textures today; the intended authoring path moves baking into +Blender. Neither the daemon nor generic Eve runtimes depend on Substance +archives or a Substance importer. + ## Effects Effects are semantic burst, loop, beam, trail, impact, shield-hit, destruction,