fastparts2

Fast Parts: Rendering Moving Parts 4-5x Faster in ROBLOX

With our recent release of featherweight parts we drastically lightened the load, so to speak, of objects in the ROBLOX graphics pipeline. In an effort to continue down this path, we’re developing a system that can switch between featherweight and non-featherweight parts on the fly, in real time. We like to keep things simple around here, so we’ve elected to call them fast parts. 

Why would you want to be able to switch? What are the benefits? What type of hardware will be able to handle these new parts? These and many other questions will be answered in this article. Let’s brush over the basics first.

The Basics

Let’s say you construct a building in ROBLOX. The building itself is composed of static (non-moving), featherweight parts. All of the parts are anchored. It’s not meant to move–by virtue a building doesn’t go mobile (we don’t remember the last time a building stood up and walked around the corner, and if we did remember something like that, you better believe we would’ve blogged about it already). The building is grounded and stationary.

Here’s where it gets a little more trickier. Say you launch a rocket at the building, destroying the joints. The building collapses into the thousands of blocks that made it. This simply can’t be done with featherweight parts, because featherweight parts can’t move. There needs to be a transitional period where the parts individually falling to the floor are given more computational wiggle room. When a building collapses virtually, all the parts that made it begin to move, change position and fall. That takes a lot more computing power. And that’s where our fast parts come in.

The Process

With fast parts, we can batch up to 80 moving objects, which is the hard limit amount that we can pass per batch using vertex shading (more on this later). Each batch is grouped by its objects’ proximity to the player, and their textures. When you fire a rocket at a building, every featherweight item that constructed the building will change instantaneously to fast parts in order to fall and crumble realistically. As soon as the building is reduced to a pile of rubble, and no more movement is involved, the parts in the rubble will return to being featherweight parts.

This is all in an effort to make every part on ROBLOX a featherweight part, or share performance characteristics at the very least. Since we’ve made all static objects featherweight, now it’s time to focus on moving parts. So let’s look at our example of a collapsing building. When a building begins to crumble and fall, a lot of things are going on behind the scenes. A conversation is started with the graphics card in your computer. Each section of the crumbling building is spread into a different batch–each batch focusing on the movement of the collapsing blocks. The position of the blocks is going to change as they fall because of physics. Rendering many moving parts individually would not be efficient, as they’d be in a different physical space every frame.

Our solution allows us to group these parts together into batches–each of which can carry a maximum of 80 parts. And thanks to dynamic shaders, each of the individual parts within a batch can move independently from one another. This allows us to keep moving parts running at a consistent frame rate that doesn’t overload your system. The trick we’re implementing will be very subtle, which is precisely the point. We want featherweight parts to become fast parts (and vice versa) with no visual cues of any kind, ultimately creating an environment where both types of parts–featherweight for static objects and fast parts for moving objects–are seamlessly integrated.

The Vertex Shader Solution

Our fast parts will utilize vertex shaders on your computers’ graphics processing unit (GPU) to ensure that multiple parts in a single geometry buffer can be transformed independently. Vertex shading is a special GPU feature that allows you to customize the way triangles are transformed in games. This is particularly of use for us–everything in ROBLOX, including parts, are drawn using triangles. With our fast parts, they help us create realistic batch block movements (like falling blocks from a destroyed building). Let’s go back to our collapsing building example to explain this solution.

You’ve fired a rocket at the building. Chaos. Blocks everywhere. The blocks have now turned into fast parts, and each one is grouped in a batch. Without Vertex Shading, we would have to instruct each batch which way to fall in uniform (which would be totally unrealistic behavior). With vertex shading, we can take each block within any given batch and tell it to behave differently. That way, every crumbling block has its own behavior. We can tell each block within a batch to fall at a different angle, at a different speed, creating a much more realistic depiction of a collapsing building.

The Numbers 

We tested this feature to figure out how much it affects overall gameplay. We agreed that our test machine was relatively “middle-of-the-road”– our rig featured a dated Intel i3-2100 processor with an integrated Intel HD Graphics chip. Hardly state of the art.

In our test, we opted to blow up a structure made up of 9,000 parts. Before, doing so would slow ROBLOX down to about 4-5 frames per second. With our new fast parts, our frame rate jumped five times that amount, hovering between 20-25 frames per second while parts were in motion.

The Release

We’ve just turned on our fast parts in default mode, and we estimate that 80%-85% of our PC users (and about 90% of our Mac users) have the GPU capabilities to benefit from them. We’ll be releasing this to be accessible from all machines soon.

 

 

126 thoughts on “Fast Parts: Rendering Moving Parts 4-5x Faster in ROBLOX

  1. playmobil1898

    Good, because soon I’m going to make 100% destroyable place where there is a small brick for every grain of sand. It’s going to still be very slow and might crash but I don’t care. :)

  2. TTdude

    Here’s an idea; why not create a tool that allows builders to “merge” the textures of blocks together, making a building made of hundreds of blocks look like all 1 block. When it gets hit with an explosion, the merged textures would break, making it look like the wall cracked into several blocks. It wouldn’t be too graphics intensive, and it would add a lot more realism to Roblox destruction.

    1. evev3

      so, there’s a window that looks like 1 block, but when you shoot a rocket at it, it breaks apart into smaller pieces? cool!

      1. Tyro76

        Hey, Wingman8 did something similar with bricks on the buildings in his war places. And Daxter did the same with windows.

  3. ImaFirinMahLazer95

    I can’t wait for featherweight parts, My computer is really slow so it will help me out a lot while running Roblox.

  4. Bobby28256

    It would be great, but it messed up the grab/copy tool. ROBLOX is nothing without that! Trust me, if all we had to use is stamper, ROBLOX would probably loose most of its players.

  5. goocarter

    I really want to see this in action. This may be the best part of Roblox. Blowing things up and then the parts going really fast would be cool!

  6. Droideka1

    The ever-shrinking gap between frame rate and ultimate power has been nearly sealed on this day.

  7. a guywhowantstoreply

    Nice job, guys.
    Looks awesome. If only my mapmaking skills were a tad bit better. :3

  8. Dogwarrior24

    How about vehicles? They are stuck together, but they are still moving. Are they featherweight when you driving?

  9. Massivelegoboy

    Hmmmm….Good idea, Roblox! I’m gonna make a fantastic blow up the house game! With a fast rocket giver, teleporter giver, AND A BREAKABLE HOUSEEEEEE!!! :D (Also adding a car that breaks the house.)

  10. Yortsyam

    Ruined many roblox games. This caused the creator of “Apocolypse Rising” to shut down his game and try to “undo” the updates himself.

  11. Michaetheskull

    Seriously? This just sounds like something new to get us to use the terrain, no support at all.

    (This must be why whenever I move a brick with the old tools it freezes my cpu..)

    1. blanman

      Nah man, They’re just changing how bricks work on the technical side. Nothing to do with terrain

      Basically, they’re going to be eliminating a lot of lag in the physics engine.

  12. Afraidanna

    So will this fix the problem when it says vehicles are moving fast,but their moving about 1 stud per second or slower?

  13. masterbetatester

    Cool, is there any way I can test it, like a game? Plugins won’t work on my studio. :(

  14. Ivangode8

    well, i have a Nvidia Geforce gtx 640,
    so i don’t need thse tips, and i always have thextures at high quality :3

Comments are closed.