Rendering Updates - January 2018

This is a thread with rendering updates for January! Also welcome to 2018. We’re starting to pick up pace again after the code freeze. Thanks to @ConvexRumbler, @Homeomorph, @maxvee, @programeow, @Qiblox and zeuxcg for working on these updates! Also welcome @NeoBuilder101 - excited to have you onboard!

Vulkan on Android

We have successfully shipped Vulkan support on basically all Android devices we can ship it on - this includes phones, tablets, Chromebooks and what have you. The general rule of thumb is that you should have an Android 7.0+ OS and a reasonably modern phone to support it - there are some exceptions where it works on Android 6.0 (Samsung has support on 6.0 on some phones, and I heard that some Tegra devices support it as well).

Overall Vulkan devices account for ~15% of our Android userbase. Vulkan improves rendering performance, improves battery efficiency and reduces memory consumption. We automatically figure out whether to enable it based on whether your device supports it.

The common devices where you’d see it work are Samsung Galaxy S6/S7/S8 with Android 7+, Google Pixel 1/2, many newer LG phones, etc. There’s probably an app somewhere on Google Play that tells you if your phone supports it :slight_smile: We currently disable Vulkan on Meizu Pro, Acer Iconia and Huawei Mate devices; Huawei Mate will probably get re-enabled in February but I’m not optimistic about Meizu or Acer since the Vulkan drivers there aren’t great.

We have several further memory & performance tweaks that are coming down the line for Vulkan, and are thinking about enabling Vulkan on Windows - you can already test it in Studio if you have recent graphics drivers by changing GraphicsMode in Studio settings, so don’t hesitate to file bugs if you find any! (other than the “Unable to load Vulkan API” error, which is an indication that your drivers or GPU need updates)

Instancing

We continue to work on instancing. Since last update, we’ve enabled it on Vulkan-compatible Android devices and are looking into activating it on most non-Metal-compatible Macs and on some non-Vulkan compatible Android devices; next month we’ll find out how it went!

Additionally we shipped a number of instancing-related tweaks:

  • Fix rare race conditions that could cause updates to instanced parts to be applied incompletely and fixed on the following frame (e.g. changing Color & Size from a script could have rendered the part with just the color or size changed applied for one frame).
  • Instanced objects with Transparency=1 no longer render - this fixes some Glass artifacts and, more importantly, fixes a performance issue with having many hidden CSGs/MeshParts
  • Instancing now consumes up to 20% less VRAM for large meshes/CSG objects
  • Triangle counter on render stats panel was not taking instanced objects into account properly; this is now fixed.

We are now looking into making the instancing system work well with other part types. This will take time and we don’t know which parts we will end up supporting and which we won’t :frowning: for now the advice is to prefer using MeshParts to SpecialMeshes if at all possible (MeshParts are instanced, SpecialMeshes aren’t).

Various performance and memory improvements

As usual, there’s a number of unrelated changes in this category:

  • Lighting voxelization work has been largely moved out of Prepare and into Perform. We used to voxelize objects for lighting in Prepare which meant that all other work like Lua scripts couldn’t run concurrently with that. Now the lighting work we do in Prepare is as small as possible, and we’ve optimized some computations required for voxelization as well.
  • UI is now slightly faster to render on mobile devices with high resolution screens.
  • Some parts of the loading process are now more efficient for levels with many meshes; on ALONE this saves ~2 seconds of CPU time during loading which makes the process slightly faster and smoother.

Miscellaneous fixes and improvements

Pretty simple this time:

  • Fix some fonts not rendering on Windows systems with localized Windows usernames
  • Fix built-in screenshot recording functionality on Mac

Direct3D 9 quality changes

This is probably not terribly important to most of you, since Direct3D 9 is only used by ~3% of our Windows users, but just in case anybody is wondering:

We still support Direct3D 9 and will do so for the foreseeable future; however, to simplify maintenance, we treat it similarly to low-end mobile devices in that most high quality shading and some post-effects are disabled there as of this month. So don’t be surprised if you notice materials or water or other things not looking as good on systems that don’t support Direct3D 10/11.

48 Likes

Could you or someone elaborate on what instancing is exactly? I feel like there was a thread about it somewhere, but I couldn’t find it by searching.

1 Like

This thread has some more in depth explanation:

1 Like

The only way OBS can capture studio for me at the moment is to switch from Direct3D 11 to Direct3D 9 in studio settings. Any ideas on why this is happening @zeuxcg ?

3 Likes

Waiting for my fiance , shadow mapping to arrive to the wedding

5 Likes

Did you refer to yourself in third person?

2 Likes

Is “and myself” better? :smiley: Maybe I’ll use that next time since I couldn’t @-tag myself anyway due to a limit of 6 mentions per post.

9 Likes

This change bumped FPS from ~25 to ~50 on a high-end rig in scenes with dense parts + a lot of moving parts (also bumped the fps distribution of all players up significantly). Thanks! It’s still easily the most expensive CPU-bound operation, but it helps a lot.

Worth mentioning that the shadowmapping demo easily hits 60 FPS in such scenarios, though (at the cost of higher GPU utilization…).

4 Likes

I definitely recorded with OBS & D3D11 in the past, I think all my HackWeek videos were done with OBS. But yeah I just checked and it doesn’t work for me either. Vulkan does work though :stuck_out_tongue:

This might be related to the fact that Studio internally uses ANGLE (an OpenGL emulation layer) to render Qt UI, and that probably picks D3D11 by default and maybe conflicts somehow with 3D view rendering…

2 Likes

On the topic of the render stats panel, could all of the stats panels get updated to have the same text style as the network stats panel? The purple on gray text is a bit of an eye-sore to read

10 Likes

yes, much! lol

Is instancing out for windows? If not, is it planned to be released for windows? Estimated release date?

ARE THEY COMING?!

Roblox (player) works on Chromebooks: https://en.help.roblox.com/hc/en-us/articles/115005743383-Chromebook-Troubleshooting

1 Like

Ohh I see :slight_smile:

I’m uninformed: what’s instancing?

Instancing is a new rendering system for parts. It’s described in detail here https://devforum.roblox.com/t/rendering-updates-september-2017.

It is currently used for MeshPart and CSG objects (except for those that are in a Model that contains a Humanoid since instancing doesn’t work with character texture compositing yet).

It is live on all platforms: Windows (~97% users have it working), Mac (~55% users have it working), iOS (~90% users have it working), Android (~15% users have it working) and Xbox (100% users have it working). The variable percentage coverage is because it requires some GPU features that aren’t universally available; we’re working on getting more coverage on Mac & Android.

10 Likes

If you have Intel HD integrated graphics (obviously CPU driven), is instancing enabled? Or do you need a graphics card for instancing to take effect?

Intel integrated graphics is still a graphics chip - it’s not emulated on CPU. And yeah any Intel gfx chip that supports Direct3D 10 runs instancing. The initial instancing release last year didn’t support Intel due to performance issues but that has been fixed since.

2 Likes

Oh wow, I never knew that. Thank you for clarifying that! :slight_smile:

The more you know