Burst2ManagedCall: How to call managed functions (like Thread.Sleep) from Burst
https://github.com/Jura-Z/Burst2ManagedCall
#burst
https://github.com/Jura-Z/Burst2ManagedCall
#burst
GitHub
GitHub - Jura-Z/Burst2ManagedCall: How to call managed functions (like Thread.Sleep) from Burst
How to call managed functions (like Thread.Sleep) from Burst - Jura-Z/Burst2ManagedCall
👍5
Unity-2D-Sprite-Animator: Simple and easy animator for 2D games in Unity Engine
Unity's Animator was made for 3D games, it has a lot of interpolation settings and it's a hell to manage.
Unity's Animator is not fast to setup, you need to create animations, save it in a folder, setup transitions/parameters, try to organize the Animator window, etc
Performance
Unity's Animator is pretty expensive for simple 2D games.
Benchmarking
For the benchmark there is a simple test on an empty URP project with 2D Rendering/Lighting and 10.000 2D characters playing a 5-frames-long idle animation.
The results:
Unity Default Animator
Animator disabled: 130 FPS.
Animator enabled: 15 FPS.
Sprite Animator
Animator disabled: 130 FPS.
Animator enabled: 85 FPS.
https://github.com/GabrielBigardi/Unity-2D-Sprite-Animator
#animation
Unity's Animator was made for 3D games, it has a lot of interpolation settings and it's a hell to manage.
Unity's Animator is not fast to setup, you need to create animations, save it in a folder, setup transitions/parameters, try to organize the Animator window, etc
Performance
Unity's Animator is pretty expensive for simple 2D games.
Benchmarking
For the benchmark there is a simple test on an empty URP project with 2D Rendering/Lighting and 10.000 2D characters playing a 5-frames-long idle animation.
The results:
Unity Default Animator
Animator disabled: 130 FPS.
Animator enabled: 15 FPS.
Sprite Animator
Animator disabled: 130 FPS.
Animator enabled: 85 FPS.
https://github.com/GabrielBigardi/Unity-2D-Sprite-Animator
#animation
GitHub
GitHub - GabrielBigardi/Unity-2D-Sprite-Animator: Performatic, simple and easy animator for 2D games in Unity Engine
Performatic, simple and easy animator for 2D games in Unity Engine - GabrielBigardi/Unity-2D-Sprite-Animator
👍3
HDRP Water Sample Scenes: This HDRP project is a collection of scenes showcasing the use of the new water system in various scenarios.
https://github.com/Unity-Technologies/WaterScenes
#water #hdrp
https://github.com/Unity-Technologies/WaterScenes
#water #hdrp
👍1
Voronoi-based Lava in Unity Shader Graph
https://danielilett.com/2023-06-20-tut7-2-voronoi-lava/
Repo: https://github.com/daniel-ilett/shaders-stylised-lava
Video: https://www.youtube.com/watch?v=pFQ2-HFG_hY
#shadergraph #lava #voronoi
https://danielilett.com/2023-06-20-tut7-2-voronoi-lava/
Repo: https://github.com/daniel-ilett/shaders-stylised-lava
Video: https://www.youtube.com/watch?v=pFQ2-HFG_hY
#shadergraph #lava #voronoi
Daniel Ilett: Games | Shaders | Tutorials
Voronoi-based Lava in Unity Shader Graph
Hot Stuff
👍1
The Complete Asynchronous Programming Primer for Unity Development
A good overview of asynchronous techniques in Unity. async/await is described way too in details compared to others, but it is still written in pretty simple terms which is great. And info about new Awaitable type in Unity 2023.1 is def worth reading.
https://hackernoon.com/the-complete-asynchronous-programming-primer-for-unity-development
#async #awaitable
A good overview of asynchronous techniques in Unity. async/await is described way too in details compared to others, but it is still written in pretty simple terms which is great. And info about new Awaitable type in Unity 2023.1 is def worth reading.
https://hackernoon.com/the-complete-asynchronous-programming-primer-for-unity-development
#async #awaitable
Hackernoon
The Complete Asynchronous Programming Primer for Unity Development
We consider the main ways of asynchronous programming in Unity: discuss pros and cons, illustrate code examples, and show practical examples.
👍5
Improved Unity DOTS vs Multithreaded Assembly
The video contains examples how you can improve performance when using DOTS and compares it to a direct asm implementation
https://youtu.be/82XkA2r8HNQ
#dots
The video contains examples how you can improve performance when using DOTS and compares it to a direct asm implementation
https://youtu.be/82XkA2r8HNQ
#dots
👍4
A shader for Unity providing cel-shading. (Forward rendering)
https://github.com/s-ilent/scss
#shader #celshading
https://github.com/s-ilent/scss
#shader #celshading
👍2
What AI for Unity DOTS
Gives an overview of AI implementation approaches. Shares existing open source DOTS solutions for FSM and BT.
In the end the author shows his own PoC implementation of Utility AI using DOTS (mainly Entities)
https://pixelmatic.github.io/articles/2020/05/13/ecs-and-ai.html
Repo with DOTS utility AI: https://github.com/kaminaritukane/ECS_UtilityAI.git
#ai #dots
Gives an overview of AI implementation approaches. Shares existing open source DOTS solutions for FSM and BT.
In the end the author shows his own PoC implementation of Utility AI using DOTS (mainly Entities)
https://pixelmatic.github.io/articles/2020/05/13/ecs-and-ai.html
Repo with DOTS utility AI: https://github.com/kaminaritukane/ECS_UtilityAI.git
#ai #dots
PxDev
What AI for Unity DOTS
If you are considering using Unity DOTS, but were wondering about how to work with your familiar AI techniques with it, we did the research already and share our results here with you.
👍2🔥1
How to Use SYSTEMS in Unity ECS 1.0 - Unity DOTS Tutorial
A simple example how to read input and apply it to an object. Also goes over the difference between ISystem and SystemBase.
https://www.youtube.com/watch?v=t2S9-pC05hs
#dots #ecs
A simple example how to read input and apply it to an object. Also goes over the difference between ISystem and SystemBase.
https://www.youtube.com/watch?v=t2S9-pC05hs
#dots #ecs
YouTube
How to Use SYSTEMS in Unity ECS 1.0 - Unity DOTS Tutorial
👨💻 Code/Scripts from this video: https://www.tmg.dev/1-0-Systems-Code 👨💻
💬 Come chat with other DOTS/ECS devs: https://tmg.dev/Discord 💬
📌 Watch my intro to DOTS 1.0 step-by-step tutorial video: https://youtu.be/IO6_6Y_YUdE 📌
🚧 Resources Mentioned 🚧
-…
💬 Come chat with other DOTS/ECS devs: https://tmg.dev/Discord 💬
📌 Watch my intro to DOTS 1.0 step-by-step tutorial video: https://youtu.be/IO6_6Y_YUdE 📌
🚧 Resources Mentioned 🚧
-…
👍2
animation.gif
45.5 MB
Drecon implementation: This is a reimplementation of the Drecon paper for user controlled physically-simulated characters using Unity-ML Agents
The difference between this and most other physically simulated controllers is that here the program actually controls every muscle in order to match the target pose. It's not using IK to determine where a limb should be and moving it there, the neural net backing this has to learn how to "flex" all of its muscles to achieve the target pose.
https://github.com/AliBharwani/Drecon/
Video with details: https://youtu.be/dqIwWVMw7HM
#motionmatching #animation #ml
The difference between this and most other physically simulated controllers is that here the program actually controls every muscle in order to match the target pose. It's not using IK to determine where a limb should be and moving it there, the neural net backing this has to learn how to "flex" all of its muscles to achieve the target pose.
https://github.com/AliBharwani/Drecon/
Video with details: https://youtu.be/dqIwWVMw7HM
#motionmatching #animation #ml
👍4
URP-WaterShaders: Procedural Water Surface and Underwater Caustics with distortion for Unity URP
This project demonstrates three procedural shadergraphs, for creating immersive underwater caustics and water surface with distortion. All shadergraphs are meant to be used as templates for your own shaders.
https://github.com/aniruddhahar/URP-WaterShaders
Demo video: https://youtu.be/1XAbvmTKjJI
#shadergraph #water #caustics #urp
This project demonstrates three procedural shadergraphs, for creating immersive underwater caustics and water surface with distortion. All shadergraphs are meant to be used as templates for your own shaders.
https://github.com/aniruddhahar/URP-WaterShaders
Demo video: https://youtu.be/1XAbvmTKjJI
#shadergraph #water #caustics #urp
GitHub
GitHub - aniruddhahar/URP-WaterShaders: Procedural Water surface and underwater caustics for Unity URP
Procedural Water surface and underwater caustics for Unity URP - aniruddhahar/URP-WaterShaders
👍2🔥1
This media is not supported in your browser
VIEW IN TELEGRAM
ShaderGraph examples and demos: Collection of ShaderGraph examples for Unity.
Dissolve
Fire
Flag
Hologram
Pixelate
Toon
https://github.com/andydbc/unity-shadergraph-sandbox
#shadergraph
Dissolve
Fire
Flag
Hologram
Pixelate
Toon
https://github.com/andydbc/unity-shadergraph-sandbox
#shadergraph
👍4
12 recipes for popular visual effects using the Universal Render Pipeline
Here is a list of the effects described in the book:
- Stencil for a see through effect
- Instancing
- Toon and outline shading
- SSAO
- Decals
- Water
- LUT for color grading
- Lighting
- Shadows
- Light probes
- Screen Space Refraction
- Volumetrics
https://blog.unity.com/engine-platform/12-recipes-for-popular-visual-effects-using-universal-render-pipeline
#urp #grass #water #lut #ssao #stencil #toon #outline #renderfeature #book
Here is a list of the effects described in the book:
- Stencil for a see through effect
- Instancing
- Toon and outline shading
- SSAO
- Decals
- Water
- LUT for color grading
- Lighting
- Shadows
- Light probes
- Screen Space Refraction
- Volumetrics
https://blog.unity.com/engine-platform/12-recipes-for-popular-visual-effects-using-universal-render-pipeline
#urp #grass #water #lut #ssao #stencil #toon #outline #renderfeature #book
Unity
Now available: 12 recipes for popular visual effects using the Universal Render Pipeline
The all-new URP cookbook provides 12 recipes for popular visual effects that can be applied to a wide range of games, art styles, and platforms. If you work with stencils, instancing, real-time ambient occlusion, decals, and more, then this is the resource…
👍4
This media is not supported in your browser
VIEW IN TELEGRAM
Wave Function Collapse Algorithm for Level Generation
Gives a high-level idea how to generate non-square grids
http://blog.seedganggames.com/quick-wfc-demo/
#wfc #pcg
Gives a high-level idea how to generate non-square grids
http://blog.seedganggames.com/quick-wfc-demo/
#wfc #pcg
👍3🔥3
Building Roads Procedurally Using Unity's Spline Package
Shows how to create intersections, add UV and decals with additional details.
https://youtu.be/ZiHH_BvjoGk
#spline #road #decals
Shows how to create intersections, add UV and decals with additional details.
https://youtu.be/ZiHH_BvjoGk
#spline #road #decals
YouTube
How To Build Roads Procedurally In Unity with the Splines Package
Roads are more common in videogames than you might think so in this episode we'll look at how we can use Unity's new spline package to build out a tool that procedurally creates a road mesh along a spline, and ALSO handles intersections at the same time.…
👍2
This media is not supported in your browser
VIEW IN TELEGRAM
Open Source Kinematic Character Controller for Unity
There are also links in the denoscription with videos about kinematic controllers, which might be useful to check before implementing your own solution.
Code is also pretty well organized.
https://github.com/nicholas-maltbie/OpenKCC
#kinematic #character
There are also links in the denoscription with videos about kinematic controllers, which might be useful to check before implementing your own solution.
Code is also pretty well organized.
https://github.com/nicholas-maltbie/OpenKCC
#kinematic #character
👍2👎1
Chunk Iteration in Entities 1.0
The author doesn't mention clearly when to use chunk iteration so here's a little note on this:
Iterating with IJobChunk requires more code setup than using IJobEntity (which generates an IJobChunk under the hood). To automatically benefit from any future source-generation improvements, most jobs that perform a single iteration over a chunk's entities should prefer IJobEntity (optionally implementing the IJobEntityChunkBeginEnd interface as well, for any custom chunk-level operations before and after the core entity iteration loop).
Some examples of use cases which require IJobChunk:
- jobs which do not iterate over each chunk's entities at all (e.g. gathering per-chunk statistics)
- jobs which perform multiple iterations over a chunk's entities, or which iterate in a unusual order
https://coffeebraingames.wordpress.com/2023/06/25/chunk-iteration-in-entities-1-0/
#dots #chunk #ecs
The author doesn't mention clearly when to use chunk iteration so here's a little note on this:
Iterating with IJobChunk requires more code setup than using IJobEntity (which generates an IJobChunk under the hood). To automatically benefit from any future source-generation improvements, most jobs that perform a single iteration over a chunk's entities should prefer IJobEntity (optionally implementing the IJobEntityChunkBeginEnd interface as well, for any custom chunk-level operations before and after the core entity iteration loop).
Some examples of use cases which require IJobChunk:
- jobs which do not iterate over each chunk's entities at all (e.g. gathering per-chunk statistics)
- jobs which perform multiple iterations over a chunk's entities, or which iterate in a unusual order
https://coffeebraingames.wordpress.com/2023/06/25/chunk-iteration-in-entities-1-0/
#dots #chunk #ecs
COFFEE BRAIN GAMES
Chunk Iteration in Entities 1.0
I have this article from 2018 which describes how to code the most fundamental thing to do in Unity’s ECS: chunk iteration. I think it needs an update now that Entities 1.0 has been released.…
👍2
Weighted Random Sample
The implementation of this technique allows for the random selection of items with varying probabilities based on their assigned weights, e.g. loot boxes, or skill selection system similar to Vampire Survivors, where you have more chances to receive upgrade for an already obtained skill rather than a new random one.
https://gist.github.com/Nox7atra/3611b5dc0ccd45906010987b694bd43a
#weighted #random
The implementation of this technique allows for the random selection of items with varying probabilities based on their assigned weights, e.g. loot boxes, or skill selection system similar to Vampire Survivors, where you have more chances to receive upgrade for an already obtained skill rather than a new random one.
https://gist.github.com/Nox7atra/3611b5dc0ccd45906010987b694bd43a
#weighted #random
Gist
Взвешенная вероятность - пример
Взвешенная вероятность - пример. GitHub Gist: instantly share code, notes, and snippets.
👍1
Happy Harvest demo: See the latest 2D techniques | Unity Blog
It incorporates best practices any 2D creator can use, including not baking shadows into a sprite, keeping sprites flat, moving shadow and volume information to secondary textures, advanced Tilemap features, a day-to-night cycle, 2D animation and IK, VFX graph for 2D effects.
https://blog.unity.com/games/happy-harvest-demo-latest-2d-techniques
Sample: https://assetstore.unity.com/packages/essentials/tutorial-projects/happy-harvest-2d-sample-project-259218
#urp #2d #sample
It incorporates best practices any 2D creator can use, including not baking shadows into a sprite, keeping sprites flat, moving shadow and volume information to secondary textures, advanced Tilemap features, a day-to-night cycle, 2D animation and IK, VFX graph for 2D effects.
https://blog.unity.com/games/happy-harvest-demo-latest-2d-techniques
Sample: https://assetstore.unity.com/packages/essentials/tutorial-projects/happy-harvest-2d-sample-project-259218
#urp #2d #sample
Unity
Happy Harvest demo: See the latest 2D techniques
Our new sample, Happy Harvest, shows new techniques for creating 2D lights, shadows, animation, and VFX with the Universal Render Pipeline in Unity 2022 LTS.
👍2
Unity Serialization System
The author has been digging into Unity's serialization system for a few years and created kind of a cheat sheet with everything related to the Unity serialization system: how to serialize private fields and properties in Unity, plus techniques with ScriptableObjects serialization and other common problems related to the Unity Serialization System
https://blog.gladiogames.com/all-posts/unity-serialization-system
#serialization
The author has been digging into Unity's serialization system for a few years and created kind of a cheat sheet with everything related to the Unity serialization system: how to serialize private fields and properties in Unity, plus techniques with ScriptableObjects serialization and other common problems related to the Unity Serialization System
https://blog.gladiogames.com/all-posts/unity-serialization-system
#serialization
👍3