Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
## [1.3.2] - 2024-09-06

### Changed
* Updated entities packages dependencies

### Fixed

* Fixed an issue with entities.graphics and Burst 1.8.12
  • Loading branch information
Unity Technologies committed Sep 6, 2024
1 parent 0a23225 commit be43339
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 17 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ uid: changelog

# Changelog


## [1.3.2] - 2024-09-06

### Changed
* Updated entities packages dependencies

### Fixed

* Fixed an issue with entities.graphics and Burst 1.8.12


## [1.3.0-pre.4] - 2024-07-17

### Fixed
Expand Down
16 changes: 13 additions & 3 deletions Documentation~/mesh_deformations.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ To use mesh deformations in your Unity Project:

Before you can use mesh deformations in your Unity project, you must set up your Unity Project to support this feature. To do this:

1. Make sure your Unity Project uses the Entities Graphics package. For information on how to install packages, see the [Package Manager manual](https://docs.unity3d.com/Manual/upm-ui.html).
1. Make sure your Unity Project uses the Entities Graphics package. For information on how to install Entities Graphics, refer to [Create a new project with Entities Graphics](creating-a-new-entities-graphics-project.html#create-a-new-project-with-entities-graphics).
2. If you intend to use per-vertex motion vectors, go to Project Settings (menu: **Edit** > **Project Settings**) and, in the Player section, add `ENABLE_DOTS_DEFORMATION_MOTION_VECTORS` to **Scripting Define Symbols**. Unity currently only supports this when using the High Definition Render Pipeline. **Note**: To apply changes to the define, you must re-save any Shader Graphs.
3. Create a Skinned Mesh Renderer with compatible materials using the [Mesh setup](#mesh-setup) and [Material setup](#material-setup) steps.

Expand All @@ -36,6 +36,7 @@ After you set up your project to support mesh deformations, you can create a mat
2. Add the [Compute Deformation](https://docs.unity3d.com/Packages/com.unity.shadergraph@latest?subfolder=/manual/Compute-Deformation-Node.html) node to the Shader Graph.
3. Connect the position, normal, and tangent outputs of the node to the vertex position, normal, and tangent slots in the master node respectively.
4. Save the Shader Graph.
5. Create a new material and assign the Shader Graph as its shader.

### Mesh setup

Expand All @@ -45,6 +46,15 @@ After you create a material that supports mesh deformations, you can set up a me
2. Make sure that the mesh has blendshapes and/or a valid bind pose and skin weights. If Unity doesn't detect the appropriate data, it displays an error in the Skinned Mesh Renderer component Inspector.
3. Assign the material you created in [Material setup](#material-setup) to all material slots on the Skinned Mesh Renderer.

Place the GameObject or Prefab in a subscene to deform the Entities using mesh deformations.

### Deform meshes using a script

After you've set up a scene that uses Mesh Deformations, you can use custom scripts to create movement in the deformed entities. To do this, you can use an ECS System.

For example, in a [SystemBase](https://docs.unity3d.com/Packages/com.unity.entities@latest?subfolder=/api/Unity.Entities.SystemBase.html), you can use a Query to find components that may exist in your scene, such as the [Skin Matrix](https://docs.unity3d.com/Packages/com.unity.entities@latest?subfolder=/api/Unity.Deformations.SkinMatrix.html) or [Blend Shape](https://docs.unity3d.com/Packages/com.unity.entities@latest?subfolder=/api/Unity.Deformations.BlendShapeWeight.html) ECS component. Then, your system can modify the values of these component's properties to result in movement over time.

For an example, refer to the scenes `SampleScenes/5. Deformation/MeshDeformations` and `SampleScenes/5. Deformation/SkinnedCharacter` in the `Assets` folder of [URPSamples](https://github.com/Unity-Technologies/EntityComponentSystemSamples/tree/master/GraphicsSamples/URPSamples) and [HDRPSamples](https://github.com/Unity-Technologies/EntityComponentSystemSamples/tree/master/GraphicsSamples/HDRPSamples).

### Vertex shader skinning

Expand Down Expand Up @@ -73,12 +83,12 @@ Vertex shader skinning skins the mesh on the GPU in the vertex shader. To enable
| | **Skinned Mesh Renderer** | **Entities Graphics** |
| ------------------------------------------------- | --------------------------| ----------------------|
| Linear Blend Skinning | Supported | Supported |
| Blend Shapes | Supported | Supported |
| Blend Shapes | Supported | Supported |
| Blend Shape Frames | Supported | --- |
| Per Vertex Motion Vectors | [Supported](xref:UnityEngine.SkinnedMeshRenderer.skinnedMotionVectors) | Only in HDRP (With define) |
| Optional normals & tangents | Supported | --- |
| Resizeable render bounds based on animated pose | [Supported](xref:UnityEngine.SkinnedMeshRenderer.updateWhenOffscreen) | --- |
| Bake Mesh | [Supported](xref:UnityEngine.SkinnedMeshRenderer.BakeMesh(UnityEngine.Mesh)) | --- |
| Cloth Simulation | Supported | --- |
| Quality setting for limiting skin influences | Supported | --- |
| CPU Deformations | [Supported](xref:UnityEditor.PlayerSettings.gpuSkinning) | --- |
| Blend Shape Frames | Supported | --- |
2 changes: 0 additions & 2 deletions Unity.Entities.Graphics/DrawCommandGeneration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,6 @@ internal struct ChunkDrawCommand : IComparable<ChunkDrawCommand>
}

[BurstCompile]
[NoAlias]
internal unsafe struct DrawStream<T> where T : unmanaged
{
public const int kArraySizeElements = 16;
Expand Down Expand Up @@ -374,7 +373,6 @@ internal unsafe struct Header
// UnsafeUtility.Free(header, allocator);
// }

[return: NoAlias]
public T* AppendElement(RewindableAllocator* allocator)
{
if (m_Count >= ElementsPerArray)
Expand Down
4 changes: 2 additions & 2 deletions Unity.Entities.Graphics/RenderMeshUtility.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if HDRP_10_0_0_OR_NEWER
#if HDRP_10_0_0_OR_NEWER || URP_16_0_0_OR_NEWER
#define USE_HYBRID_MOTION_PASS
#endif

Expand Down Expand Up @@ -205,7 +205,7 @@ internal static ComponentTypeSet ComputeComponentTypes(EntitiesGraphicsComponent
internal static void AppendMotionAndProbeFlags(this ref EntitiesGraphicsComponentFlags flags, RenderMeshDescription renderMeshDescription, bool isStatic)
{
// Entities with Static are never rendered with motion vectors
if (k_UseHybridMotionPass && renderMeshDescription.FilterSettings.IsInMotionPass && !isStatic)
if (k_UseHybridMotionPass && renderMeshDescription.FilterSettings.IsInMotionPass && renderMeshDescription.FilterSettings.MotionMode == MotionVectorGenerationMode.Object && !isStatic)
flags |= EntitiesGraphicsComponentFlags.InMotionPass;
flags |= LightProbeFlags(renderMeshDescription.LightProbeUsage);
}
Expand Down
10 changes: 5 additions & 5 deletions ValidationExceptions.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,29 @@
{
"ValidationTest": "API Updater Configuration Validation",
"ExceptionMessage": "stdout:\nAPIUpdater Configuration Validation\n-----------------------------------\n\nConfiguration Validation Tests (Failed: 0, Total: 1, Ignored 0):\n----------------------------------------------------------------\n\n\nAuto Generated Tests (Failed: 1, Total: 1, Ignored 0):\n------------------------------------------------------\n1) Expected updates not applied for configuration:\n[*] System.SByte [*] Unity.Rendering.MaterialMeshInfo::Submesh -> * Unity.Rendering.MaterialMeshInfo::SubMesh\n\nInput : unsafe class Test : object { System.SByte Method(System.SByte memberValue, Unity.Rendering.MaterialMeshInfo obj) { System.SByte local = obj.Submesh; return Method(obj.Submesh, obj); } }\nExpected: unsafe class Test : object { System.UInt16 Method(System.UInt16 memberValue, Unity.Rendering.MaterialMeshInfo obj) { System.UInt16 local = obj.SubMesh; return Method(obj.SubMesh, obj); } }\nActual : unsafe class Test : object { System.SByte Method(System.SByte memberValue, Unity.Rendering.MaterialMeshInfo obj) { System.SByte local = obj.SubMesh; return Method(obj.SubMesh, obj); } }\n\n\nBase type validation (Failed: 0, Total: 0, Ignored 0):\n------------------------------------------------------\nstderr:\n",
"PackageVersion": "1.3.0-pre.4"
"PackageVersion": "1.3.2"
},
{
"ValidationTest": "API Validation",
"ExceptionMessage": "Breaking changes require a new major version.",
"PackageVersion": "1.3.0-pre.4"
"PackageVersion": "1.3.2"
}
],
"WarningExceptions": [
{
"ValidationTest": "Manifest Validation",
"ExceptionMessage": "Package dependency [email protected] must be promoted to production before this package is promoted to production. (Except for core packages)",
"PackageVersion": "1.3.0-pre.4"
"PackageVersion": "1.3.2"
},
{
"ValidationTest": "Folder Structure Validation",
"ExceptionMessage": "The Resources Directory should not be used in packages. For more guidance, please visit https://docs.unity3d.com/Manual/BestPracticeUnderstandingPerformanceInUnity6.html",
"PackageVersion": "1.3.0-pre.4"
"PackageVersion": "1.3.2"
},
{
"ValidationTest": "Package Lifecycle Validation",
"ExceptionMessage": "com.unity.entities.graphics has never been promoted to production before. Please contact Release Management through slack in #devs-pkg-promotion to promote the first version of your package before trying to use this automated pipeline. Read more about this error and potential solutions at https://docs.unity3d.com/Packages/com.unity.package-validation-suite@latest/index.html?preview=1&subfolder=/manual/lifecycle_validation_error.html#the-very-first-version-of-a-package-must-be-promoted-by-release-management",
"PackageVersion": "1.3.0-pre.4"
"PackageVersion": "1.3.2"
}
]
}
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "com.unity.entities.graphics",
"displayName": "Entities Graphics",
"version": "1.3.0-pre.4",
"version": "1.3.2",
"unity": "2022.3",
"unityRelease": "11f1",
"description": "The Entities Graphics package provides systems and components for drawing meshes using DOTS, including support for instanced mesh rendering and LOD.",
"dependencies": {
"com.unity.entities": "1.3.0-pre.4",
"com.unity.entities": "1.3.2",
"com.unity.modules.particlesystem": "1.0.0",
"com.unity.render-pipelines.core": "14.0.9"
},
Expand All @@ -17,15 +17,15 @@
"unity"
],
"_upm": {
"changelog": "### Fixed\n\n* Pink materials when causing a domain reload while a subscene is open with lightmapped materials."
"changelog": "### Changed\n* Updated entities packages dependencies\n\n### Fixed\n\n* Fixed an issue with entities.graphics and Burst 1.8.12"
},
"upmCi": {
"footprint": "a5e32d10578d6b283b267f5fef1d7ef03714e0b1"
"footprint": "b30d75e71b7cb1e38d98d187e7095ae1ea33bbce"
},
"documentationUrl": "https://docs.unity3d.com/Packages/[email protected]/manual/index.html",
"repository": {
"url": "https://github.cds.internal.unity3d.com/unity/dots.git",
"type": "git",
"revision": "6b0c8d27a0224c9cf76032c48d1b981e9750f10d"
"revision": "921920e681054c59b440cc1e2aef10f781dc4124"
}
}

0 comments on commit be43339

Please sign in to comment.