瀏覽代碼

updating readme, address PR comments

Signed-off-by: Jonny Galloway <[email protected]>
Jonny Galloway 3 年之前
父節點
當前提交
2bd9653142

+ 0 - 3
Project/Assets/Materials/default.material

@@ -1,3 +0,0 @@
-{
-    "materialType": "./default.materialtype"
-}

+ 0 - 6
Project/Assets/Materials/default.materialcanvas.azasset.materialcanvas.azasset

@@ -1,6 +0,0 @@
-{
-    "Type": "JsonSerialization",
-    "Version": 1,
-    "ClassName": "Graph",
-    "ClassData": {}
-}

+ 0 - 17
Project/Assets/Materials/default.materialtype

@@ -1,17 +0,0 @@
-{
-    "description": "default Material Type Template.",
-    "version": 1,
-    "shaders": [
-        {
-            "file": "./default_ForwardPass.shader"
-        },
-        {
-            "file": "Shaders/Shadow/Shadowmap.shader"
-        },
-        {
-            "file": "Shaders/Depth/DepthPass.shader"
-        }
-    ],
-    "functors": [
-    ]
-}

+ 0 - 144
Project/Assets/Materials/default_ForwardPass.azsl

@@ -1,144 +0,0 @@
-/*
- * Copyright (c) Contributors to the Open 3D Engine Project.
- * For complete copyright and license terms please see the LICENSE at the root of this distribution.
- *
- * SPDX-License-Identifier: Apache-2.0 OR MIT
- *
- */
-
-#include <viewsrg.srgi>
-#include <Atom/Features/PBR/DefaultObjectSrg.azsli>
-#include <Atom/Features/PBR/ForwardPassSrg.azsli>
-#include <Atom/Features/PBR/ForwardPassOutput.azsli>
-#include <Atom/Features/PBR/AlphaUtils.azsli>
-#include <Atom/Features/SrgSemantics.azsli>
-#include <Atom/Features/ColorManagement/TransformColor.azsli>
-#include <Atom/Features/PBR/Lighting/StandardLighting.azsli>
-#include <Atom/Features/PBR/Decals.azsli>
-
-// Everything inside of the generated blocks will eventually be replaced in the generated files as the material graph is compiled. 
-
-// O3DE_GENERATED_INCLUDES_BEGIN
-// O3DE_GENERATED_INCLUDES_END
-
-struct VSInput
-{
-    float3 m_position : POSITION;
-    float3 m_normal : NORMAL;
-    float4 m_tangent : TANGENT; 
-    float3 m_bitangent : BITANGENT;
-
-    // O3DE_GENERATED_VSINPUT_BEGIN
-    // O3DE_GENERATED_VSINPUT_END
-};
-
-struct VSOutput
-{
-    precise linear centroid float4 m_position : SV_Position;
-    float3 m_normal: NORMAL;
-    float3 m_tangent : TANGENT; 
-    float3 m_bitangent : BITANGENT;
-    float3 m_worldPosition : UV0;
-};
-
-#include <Atom/Features/Vertex/VertexHelper.azsli>
-
-ShaderResourceGroup MaterialSrg : SRG_PerMaterial
-{
-    // O3DE_GENERATED_MATERIAL_SRG_BEGIN
-    // O3DE_GENERATED_MATERIAL_SRG_END
-}
- 
-// O3DE_GENERATED_CLASSES_BEGIN
-// O3DE_GENERATED_CLASSES_END
- 
-// O3DE_GENERATED_FUNCTIONS_BEGIN
-// O3DE_GENERATED_FUNCTIONS_END
-
-VSOutput default_MainPassVS(VSInput IN)
-{
-    VSOutput OUT;
- 
-    float3 worldPosition = mul(ObjectSrg::GetWorldMatrix(), float4(IN.m_position, 1.0)).xyz;
- 
-    // O3DE_GENERATED_INSTRUCTIONS_BEGIN: inPositionOffset
-    float4 inPositionOffset = float4(0.0, 0.0, 0.0, 0.0);
-    // O3DE_GENERATED_INSTRUCTIONS_END
-
-    VertexHelper(IN, OUT, worldPosition + inPositionOffset.xyz);
-
-    return OUT;
-}
-
-ForwardPassOutput default_MainPassPS(VSOutput IN)
-{
-    // O3DE_GENERATED_INSTRUCTIONS_BEGIN: inBaseColor, inEmissive, inMetallic, inRoughness, inSpecularF0Factor
-float node7_inValue = 0;
-float node7_outValue = node7_inValue;
-float node5_outTime = SceneSrg::m_time;
-float4 node6_inValue1 = node5_outTime;
-float4 node6_inValue2 = node7_outValue;
-float4 node6_outValue = node6_inValue1 + node6_inValue2;
-float4 node4_inValue = node6_outValue;
-float4 node4_outValue = sin(node4_inValue);
-float2 node3_inUV = float2(0, 0);
-float4 node3_outColor = 1.0;
-float4 node18_inValue1 = node4_outValue;
-float4 node18_inValue2 = node3_outColor;
-float4 node18_outValue = mul(node18_inValue1, node18_inValue2);
-float4 inBaseColor = node18_outValue;
-float inMetallic = 0;
-float inSpecularF0Factor = 0;
-float inRoughness = node3_outColor;
-float4 inEmissive = float4(0, 0, 0, 1);
-    // O3DE_GENERATED_INSTRUCTIONS_END
-
-    // ------- Surface -------
-
-    Surface surface;
-    surface.position = IN.m_worldPosition.xyz;
-    surface.normal = normalize(IN.m_normal);
-    surface.vertexNormal = normalize(IN.m_normal);
-    surface.roughnessLinear = inRoughness;
-    surface.CalculateRoughnessA();
-    surface.SetAlbedoAndSpecularF0(inBaseColor.rgb, inSpecularF0Factor, inMetallic);
-    surface.clearCoat.InitializeToZero();
-
-    // ------- LightingData -------
-
-    LightingData lightingData;
-    lightingData.tileIterator.Init(IN.m_position, PassSrg::m_lightListRemapped, PassSrg::m_tileLightData);
-    lightingData.Init(surface.position, surface.normal, surface.roughnessLinear);
-    lightingData.specularResponse = FresnelSchlickWithRoughness(lightingData.NdotV, surface.specularF0, surface.roughnessLinear);
-    lightingData.diffuseResponse = 1.0f - lightingData.specularResponse;
-    lightingData.emissiveLighting = inEmissive;
-
-    // ------- Lighting Calculation -------
-
-    // Apply Decals
-    ApplyDecals(lightingData.tileIterator, surface);
-
-    // Apply Direct Lighting
-    ApplyDirectLighting(surface, lightingData, IN.m_position);
-
-    // Apply Image Based Lighting (IBL)
-    ApplyIBL(surface, lightingData);
-
-    // Finalize Lighting
-    lightingData.FinalizeLighting();
-
-    PbrLightingOutput lightingOutput = GetPbrLightingOutput(surface, lightingData, inBaseColor.a);
-
-    // ------- Output -------
-
-    ForwardPassOutput OUT;
-
-    OUT.m_diffuseColor = lightingOutput.m_diffuseColor;
-    OUT.m_diffuseColor.w = -1; // Subsurface scattering is disabled
-    OUT.m_specularColor = lightingOutput.m_specularColor;
-    OUT.m_specularF0 = lightingOutput.m_specularF0;
-    OUT.m_albedo = lightingOutput.m_albedo;
-    OUT.m_normal = lightingOutput.m_normal;
-
-    return OUT;
-}

+ 0 - 42
Project/Assets/Materials/default_ForwardPass.shader

@@ -1,42 +0,0 @@
-{
-    "Source" : "./default_ForwardPass.azsl",
-
-    "DepthStencilState" :
-    {
-        "Depth" :
-        {
-            "Enable" : true,
-            "CompareFunc" : "GreaterEqual"
-        },
-        "Stencil" :
-        {
-            "Enable" : true,
-            "ReadMask" : "0x00",
-            "WriteMask" : "0xFF",
-            "FrontFace" :
-            {
-                "Func" : "Always",
-                "DepthFailOp" : "Keep",
-                "FailOp" : "Keep",
-                "PassOp" : "Replace"
-            }
-        }
-    },
-
-    "ProgramSettings":
-    {
-      "EntryPoints":
-      [
-        {
-          "name": "default_MainPassVS",
-          "type": "Vertex"
-        },
-        {
-          "name": "default_MainPassPS",
-          "type": "Fragment"
-        }
-      ]
-    },
-
-    "DrawList" : "forward"
-}

+ 0 - 6
Project/Config/default_aws_resource_mappings.json

@@ -1,6 +0,0 @@
-{
-    "AWSResourceMappings": {},
-    "AccountId": "EMPTY",
-    "Region": "us-east-1",
-    "Version": "1.0.0"
-}

+ 0 - 98
Project/Registry/physxsystemconfiguration.setreg

@@ -1,98 +0,0 @@
-{
-    "Amazon": {
-        "Gems": {
-            "PhysX": {
-                "PhysXSystemConfiguration": {
-                    "CollisionConfig": {
-                        "Layers": {
-                            "LayerNames": [
-                                "Default",
-                                {},
-                                {},
-                                {},
-                                {},
-                                {},
-                                {},
-                                {},
-                                {},
-                                {},
-                                {},
-                                {},
-                                {},
-                                {},
-                                {},
-                                {},
-                                {},
-                                {},
-                                {},
-                                {},
-                                {},
-                                {},
-                                {},
-                                {},
-                                {},
-                                {},
-                                {},
-                                {},
-                                {},
-                                {},
-                                {},
-                                {},
-                                {},
-                                {},
-                                {},
-                                {},
-                                {},
-                                {},
-                                {},
-                                {},
-                                {},
-                                {},
-                                {},
-                                {},
-                                {},
-                                {},
-                                {},
-                                {},
-                                {},
-                                {},
-                                {},
-                                {},
-                                {},
-                                {},
-                                {},
-                                {},
-                                {},
-                                {},
-                                {},
-                                {},
-                                {},
-                                {},
-                                {},
-                                {}
-                            ]
-                        },
-                        "Groups": {
-                            "GroupPresets": [
-                                {
-                                    "Name": "All",
-                                    "ReadOnly": true
-                                },
-                                {
-                                    "Id": {
-                                        "GroupId": "{98C73681-BDA7-4FC5-AED6-605732EB3590}"
-                                    },
-                                    "Name": "None",
-                                    "Group": {
-                                        "Mask": 0
-                                    },
-                                    "ReadOnly": true
-                                }
-                            ]
-                        }
-                    }
-                }
-            }
-        }
-    }
-}

+ 2 - 3
Project/project.json

@@ -1,12 +1,11 @@
 {
     "project_name": "MPS-Asset-Test",
     "project_id": "{C8D8E20A-03DD-4507-A8C2-D3949C2A3977}",
-    "license": "CC BY 4.0",
-    "license_url": "https://creativecommons.org/licenses/by/4.0/",
+    "license": "For terms please see the LICENSE*.TXT file at the root of this distribution.",
     "origin": "https://o3d.foundation/",
     "origin_url": "https://github.com/o3de/o3de-multiplayersample-assets/",
     "display_name": "MPS: Asset Test Project",
-    "summary": "This project is set up for contributors to test assets created in this repos asset gems.",
+	"summary": "This project is set up for contributors to test assets created in this repos asset gems.",
 	"documentation_url": "https://github.com/o3de/o3de-multiplayersample-assets/Project/readme.md",
     "canonical_tags": [
         "Project"

+ 80 - 0
readme.md

@@ -105,6 +105,86 @@ Now make sure that the source gems are registered
 
 Now these Gems will be available in the Project Manager and can be added to your Project.
 
+## (Optional) MPS: Asset Test Project
+
+This repository contains it's own O3DE Game project, which can be used by contributors to build, validate, and maintain new assets independently.
+
+```shell
+# the test project for mps assets, is in this project folder in repo
+> cd C:\path\to\o3de-multiplayersample-assets\Project
+```
+
+### Option 1. Add Project to O3DE Project Manager
+
+1. Launch your O3DE Project Manager (o3de.exe)
+
+2. Use the blue button in the upper right labeled "New Project ...", and with the pulldown select "Open Existing Project"
+
+3. Browse to and add the MPS Asset Test Project folder:  C:\path\to\repo\o3de-multiplayersample-assets\Project
+
+4. You may be prompted to rebuild the project (there are other options for building as a developer)
+
+5. Launch the Editor for the project
+
+### Option 2. Add via cli and build yourself
+
+You can use the o3de cli tools to register your project with your engine.
+
+```shell
+# change directory to the egine root folder
+> cd c:\path\to\your\o3de-engine
+# register the gems with the engine, you only need to do this once
+> scripts\o3de register --project-path C:\depot\o3de-multiplayersample-assets\Project
+```
+
+There are a number of ways to configure and build the engine and project ...
+
+[Configure and Build - Open 3D Engine](https://www.o3de.org/docs/user-guide/build/configure-and-build/)
+
+As a developer, I often find it useful to build in an engine-centric way
+
+```shell
+# change directory to the egine root folder
+> cd c:\path\to\your\o3de-engine
+# create a build folder
+> mkdir build
+> cd build
+# configure cmake and create sollutiuon
+> cmake .. -G "Visual Studio 16" -A x64 -DLY_3RDPARTY_PATH="%LY_3RDPARTY_PATH%" -DLY_UNITY_BUILD=OFF -DLY_PROJECTS="C:\path\to\repo\o3de-multiplayersample-assets\Project"
+```
+
+This should generate a build\O3DE.sln file, which can be opened in Visual Studio 2019 and compiled.
+
+Don't forget to build the project in Profile
+
+< image >
+
+Building the Editor project will build with all dependencies.
+
+< image >
+
+The built binary executables will be in:
+
+```shell
+# bin folder
+> cd C:\depot\o3de-dev\build\bin\profile\
+# executbales
+# C:\depot\o3de-dev\build\bin\profile\o3de.exe
+# C:\depot\o3de-dev\build\bin\profile\editor.exe
+# ...
+```
+
+If this is the project you are primarily working with, you can also set it as the "default project". 
+
+```shell
+# change directory to the egine root folder
+> cd c:\path\to\your\o3de-engine
+# register the gems with the engine, you only need to do this once
+> scripts\o3de set-global-project -pp <project-path>
+```
+
+This will make this the project that launches by default if you manually directly double-click on a o3de executable like editor.exe
+
 # Appendix
 
 After the gems are registered and added to a project, you can validate they are operational via the Asset Processor