In this video from Unite, Joachim described optimizations to the transform and support for multi-threading. Just wondering if this is in current beta as some of the slides in the video show 5.6 as target.
edit: when I pasted this I tried to include timestamp, but it got scrubbed. To see what I’m talking about, jump to timestamp 8:05.
If not in current beta, is there a timeline for this release? I’m eagerly awaiting this optimization/feature!
According to this blog-post, the multi-threaded job system is targeted for Unity 2017, which is going to have its first beta release available in April 2017.
No, the transform optimizations are on for everybody.
EDIT: Or did you mean a setting for turning on the fish? We didn’t think building that into Unity would be a good idea, but you could try placing a fishtank in front of your computer screen and Unity should still work just fine.
So… is there any chance all this transform work will fix the random x,y,z coords when creating a new GameObject in the Hierarchy? I doubt that’s high on anyone’s priority list but it’s always struck me as a weird sort of bug that seems like it ought to be a quick fix.
I actually thought that was unity attempting to intelligently create an object in front of the camera, but truth is, it’s quite a rubbish thing that comes off buggy.
OK I’ll see if I can throw together a test/benchmark for it just to see how much of a difference it makes, but it appears to have little impact in my simple cube mark benchmark.
I presume it needs instanced shaders for maximum effect?
Definitely a minor improvement in performance between 5.5 and 5.6 but not the leap that was shown in the fish demo?
My test code (source below) just generates a lot of cubes stores them in a list and moves them twice per update.
Only tested in the editor as wasn’t this how the fish demo was shown all in editor.
How do we get the same FPS boost as seen in the demo?
Could Unity release the demo?
How much of an impact does different hardware have on the Transform optimisations e.g. CPU
Code
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class TransTest : MonoBehaviour {
public GameObject prefab;
public int cubeCount;
private List<Transform> cubes;
public float radius;
public float speedScale = 10f;
void Start () {
cubes = new List<Transform>(cubeCount);
for (int i = 0; i < cubeCount; i++)
{
cubes.Add((Instantiate(prefab, Random.insideUnitSphere * radius, Quaternion.identity) as GameObject).transform);
}
}
void Update () {
float dt = Time.deltaTime;
foreach(Transform c in cubes)
{
c.Translate(Random.insideUnitSphere * dt * speedScale);
c.Translate(Random.insideUnitSphere * dt * speedScale);
}
}
}
Note used the inbuilt FPS counter as was hoping for more of a boost;
As Superpig already told you, it’s a separate thing. The multi-threaded job system (the C# API fish demo was using) is not coming in 5.6. Transform optimizations are already in.
If I’m reading this graph right then any transform heavy (e.g. 10k mesh renderer) games should see an improvement in performance of around 12ms (8ms in 5.6 vs 20 ms in 5.4).
Now is this relevant to the optimisations in 5.6, or only when the multi-threading is applied in 2017.x?
And what impact should we expect from the transform optimisations in 5.6?
If I understand it correctly, one of the performance optimizations on the transforms has to do with delaying the push of update down the hierarchy of child transforms when doing transform sets. This is going to mostly help with larger stacks of transforms, like animated models. Single transform objects won’t really benefit from this part. Based on that slider, however, it does appear that simple single-transform objects with no children should also see a boost.
Anyway I’m glad to hear these optimizations are in. I’m going to attempt to do some benchmarking myself. I will post my results.