Rendering Updates - July 2017

This is a thread with rendering updates for July! Technically it’s just 28th but we aren’t going to ship anything else over the weekend so might as well post this early. Thanks to @maxvee, @programeow, @Qiblox and @zeuxcg for working on these! Also @ConvexRumbler is with us again - welcome back!

We were working on three big projects (in addition to the lighting prototype that I’m sure all of you have seen?) but all of them didn’t quite ship this month :frowning: Nevertheless a lot of exciting things have happened:

Blur is now available on all quality levels

We have implemented some changes to Blur to make it run better on low-end hardware; between this and the fact that Blur is rarely on all the time, we now enable Blur on all quality levels on all platforms (except for some old mobile versions). It looks worse on lower quality levels to conserve performance.

Fixes for particles and trails

Trail effects are fully live on all platforms including FaceCamera property. In addition to that:

  • ParticleEmitter::Emit can now be called immediately after the particle emitter is created
  • Trail.FaceCamera had an artifact with the last trail segment which has been fixed
  • Creating a Trail effect no longer spams output with errors
  • Fire effect now looks better in motion (or more specifically, the dark smoke part of the Fire effect)

Art updates

Grass texture has been updated to make tiling less noticeable (following http://devforum.roblox.com/t/new-grass-textures-incoming/42572). This is live on desktop and is making its way to console.

We are not currently using the same rendering technique on mobile so all tiling updates we’ve done aren’t improving mobile textures yet; this will happen later this year though.

Also we have updated the default SpawnLocation texture: https://pbs.twimg.com/media/DEbGFT9W0AAslyx.jpg

Significant mesh performance and memory optimizations

We have discovered some glaring inefficiencies in our mesh import process, that unfortunately have affected all meshes that have been uploaded to Roblox, including our own character packages (but not hats! :tophat:) . We are now automatically fixing these inefficiencies when loading meshes so that the gains apply retroactively to existing content. As a result:

  • Meshes now take 2-4x less memory
  • Meshes now render up to 3x faster
  • Cluster updateGeometry performance spikes on mesh-heavy levels are up to 2x smaller.

Once again, you don’t have to reimport your meshes to get these benefits (however, we are working on followup updates that will thoroughly optimize meshes during mesh import in Studio to render them even faster, which will only apply to newly imported content - more on that next month).

Performance and memory improvements

We continue to eliminate small and large inefficiencies and obsessively optimize all areas of rendering code. Some results from this month:

  • Text rendering is up to 10% faster in some cases
  • Cluster geometry update is ~10% faster in many cases (and up to 2x faster in some contrived cases)
  • All part rendering geometry takes ~20% less memory now (including meshes and CSGs)
  • Fixed a bug that caused character join/leave event (and similar cases for models with humanoids entering or leaving the world) to rebuild all world geometry causing frame spikes.

Various fixes

… and a few more bug fixes this month.

  • Material diffuse textures are now exported during .obj export
  • MeshParts with textures with alpha no longer glow when neon parts are in view (that has been a long time coming)
  • Decomposition geometry no longer glows when neon parts are in view
121 Likes

Awesome work! Thanks guys. :octopus:

2 Likes

Really excited about the improved mesh/csg rendering

and Im just gonna wait to import all my meshes until the update comes out

2 Likes

Very nice update! A bit curious, any estimate as to how much of an improvement the optimized mesh importing will be?

Y E S ! ! !
I have been hoping for this update to come as I use it for a lot of the GUIs in Ultimate Boxing.

Maybe Christmas actually is in July after all!

5 Likes

The optimized mesh importing will not affect memory too much, but will have gains for rendering performance, download speed and CPU load during game join. If your question is “should I reimport all my meshes after that update goes live”, the answer is probably “only if you are struggling with performance”.

2 Likes

The main thought I had as a thought was more “Should I wait to upload my meshes, and just use placeholders?” Glad to hear that’s not the case, even with a nice boost of mesh performance.

1 Like

inb4 top 10 most liked DevForum post.

4 Likes

Out of curiosity, how did that even happen?

3 Likes

:heart_eyes:

I just went through all of my code and deleted like 5 spawn()'s

6 Likes

We need a bigger like/heart button for posts like these

7 Likes

Amazing work, Thank you! :heart:

2 Likes

So neon implementation in Roblox is somewhat peculiar - it’s not really unique but it’s sort of interesting. Since this is a material that glows by itself, and we don’t have HDR yet so we can’t just output a very bright color for neon parts and rely on bloom for making it glow, we have to render a texture with all neon objects in it.

Now, we could have done it as a separate pass - just render all neon objects again, there’s usually not that many - however, Roblox games tend to have lots of transparent parts – to have glow be diminished when viewed through transparent parts, we’d have to also render all transparent non-neon parts into that buffer, which is not ideal performance-wise.

So what we settled up with is storing the glow intensity in the alpha channel and rendering it out as we render anything else. This means rendering information for neon is basically free, although we do have to pay a cost to actually convert this information into the glow effect (basically compute bloom from glowing bits). Since alpha channel is generally used for transparency, we have to play some games with blending math to make sure that it all works out.

What happened with anything that was not transparent though is that outputting alpha that’s not 1 made it glow - it literally would do the same thing as a non-transparent part with Neon material. Fixing this required splitting the shaders between ones that render opaque geometry and ones that render transparent geometry.

Also this is why if you use neon in models, your model thumbnails have 100% transparency wherever neon pixels are. That one is much harder to fix so we aren’t fixing it yet.

edit oh and decomposition geometry for whatever reason was opaque but had alpha set to 100/255. I blame @Khanovich for that one :wink:

11 Likes

So should this issue be fixed by now? I haven’t had a chance to check for a week since I’ve been away.

1 Like

:heart:

1 Like

We have shipped extra metrics and some performance optimizations for that one, but based on the limited info from that post the bigger problem there is a driver issue. If you still have it please post updated microprofile dumps to that thread. The new system that addresses the problems in that thread completely is one of the three big things that didn’t quite ship.

1 Like

Oh actually we also fixed the performance bug where characters or other humanoid models would trigger a complete rebuild of rendering geometry, I forgot to note that in the list of changes; I’ll update it.

9 Likes

:raised_hands: The day has come.

2 Likes

This is great! Even more reason to use meshes.

1 Like