Part Instancing - pre-release announcement

Want to update the thread to mention the progress:

  1. Part Instancing
    We’ve been going through the rollout, discovering a few small bugs and fixing them along the way. It’s really close as far as we know - it’s currently disabled, but we’ll try to enable it in the coming weeks on desktop. Didn’t quite make RDC US, but will definitely make RDC EU :wink:

  2. Inter-cluster instancing
    We’ve implemented a feature that allows merging objects from different clusters into a single draw call dynamically. This is live of desktop as of right now and currently means that any Mesh/CSG parts that are clones of each other and are in the view will be rendered with a single draw call regardless of where they are. This also opens up opportunities for significant optimization of transparent part rendering - with part instancing and this combined, we’re seeing less overhead for transparent parts which is awesome.

  3. macOS performance
    We’ve discovered a performance regression with instancing (also reported here that was affecting both part instancing (that was enabled for ~1 hour last week) and mesh/csg instancing, and was only impacting NVidia GPUs on Mac. This issue has since been fixed, so on macOS/NVidia mesh & csg parts should render faster now

  4. Part instancing and levels with really high part count
    The initial release of part instancing uses “dynamic” instance data submission - the data for each part that describes the visual appearance of the part is uploaded to GPU every frame. This works fine for levels with reasonable number of parts that are visible - e.g. 10-20k - but starts hitting performance issues for really aggressive scenes e.g. 100k visible parts. We’re working on a change that, on a per-cluster basis, caches the part instance data in GPU buffers and updates those. These updates should be much faster than the reclustering operations that could happen in the previous system, which hopefully should make the new system work well even on levels with millions of blocks.


Will the live time CSG on the roadmap work with instancing as well?



I tested this out with CloneTrooper’s mod manager and it’s amazing. Parts no longer vanish at quality 1. Can’t wait for its official release!


We’ve enabled part instancing again :slight_smile: on desktop (PC & Mac) and in Studio. We don’t have any known bugs and performance should be good in all cases - the issues I’ve mentioned with levels with millions of blocks have been addressed. Don’t hesitate to let us know if you find any rendering issues or performance problems with the new system.

We’re planning to roll this system out to consoles and mobile in the coming weeks, with the exception of Android where instancing isn’t currently active unless your phone has Vulkan support. We have a plan to ship mesh/CSG instancing on GLES3 Android devices, but it’s likely that part instancing will only be active on Vulkan devices on that platform for the remainder of this year.


I hate to potentially burst your bubble but could this bug be related? It popped up within the last hour.


We don’t have any known bugs

This sentence is now false :frowning: We’ll take a look at both issues. FWIW as a work around for special meshes disappearing, you should be able to increase the size of the part they’re attached to until the bug stops happening… edit oops I got it wrong, we don’t actually use part size for this… I think there might not be a good workaround for this, so we’ll probably need to disable this.


Awesome, thanks for all the hard work you guys put into this!

1 Like

Special meshes strike back. We’ve disabled part instancing to fix issues mentioned in the thread linked above, let’s try this again in a week or two…


Doing awesome so far :+1:

I’m looking forward to see how this will impact some of my part-intensive games.

If you have a link to one of these games we could take a look as well to see if we need to improve anything on our side - we’re going through final phases of polishing performance anyway.


Would it be possible to have another post explaining all of the new optimizations? :heart_eyes:


For anyone still relying on the legacy head scaling behavior, I ported it into Lua. It works with Instancing.


I’ve had to severely cut down on place that suffered from these issues, but I’ll try to setup a demo that reflects the issues we had been facing prior to the introduction of a custom LoD system.


Looks like part instancing has be re-enabled. I noticed that my blockmeshes stopped flickering :slight_smile:


I just noticed that each completely invisible part (Transparency = 1) increases the number of render entities by 1.

Is this supposed to happen?

EDIT: Hiding parts by parenting them to nil instead of setting their transparency to 1 improved my batching efficiency by a lot (a pitiful 4 to >20)


Inverted head meshes have been re-broken here :confused:

That’s likely intentional.


I’m not sure if this is somehow related as a bug to this update but it seems we’re having render issues on our side of things.

This is an internal inefficiency that we need to correct; we aren’t rendering objects with transparency=1 but we are inefficiently distributing them across entities right now. We’ll take a look at improving this.