Publish the authored native environment
This commit is contained in:
parent
56b28d25f4
commit
4dc0c0faf7
7 changed files with 98 additions and 5 deletions
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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<GameObject>(assetPath), assetPath);
|
||||
var skybox = LoadAuthoredAsset<Material>(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<Cubemap>(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<T>(AssetBundle bundle, IEnumerable<string> 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<T>(nativePath);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,6 +25,8 @@ namespace GameCult.Aetheria.State.Verse
|
|||
string baseUri = "cultmesh://aetheria.local/assets")
|
||||
{
|
||||
var entries = new Dictionary<string, AetheriaRuntimeAssetManifestEntry>(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<string, string>(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<string, string>(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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue