# Roblox Experience Optimization and Memory Conservation **Memory Conservation and Reduction for your Roblox Experience's** Please read the following information to better educate yourself on proper memory reduction and conservation ettiqute. This document is more forwarded to the [State of Mayflower](https://www.roblox.com/groups/13952368/State-f-ayfl-wer#!/about) and their game, [New Haven County v2](https://www.roblox.com/games/8740588110/New-Haven-County-V2). ###### By Rambunne, April 29, 2022 **** ### Terrain Storage & Physics > While painting, creating, and designing your map you may forget about By doing some of the following, you will be able to easy catalog and reduce your terrain sizes; > * **Catalog large terrain masses that you design throughout your development session** By taking note of large masses or pockets of terrain, you will be able to go back there at a later date and properly fix the terrain to best maximize storage usage. * **Refrain from over-complicating your terrain** Do not make very complex or intricate shapes with your terrain, as the more complicated the shape, the more complicated the voxel work can be. [Image depicting thin, smooth voxel terrain.](https://doy2mn9upadnk.cloudfront.net/uploads/default/original/4X/a/2/0/a208893ae6bf1c24a750557fdb12c01e6739f1fb.jpeg) * **Smooth and flatten your terrain** Having rocky, exaggerated, or too-steep of terrain can lead to undesired results. Using the integrated smooth tool that comes with your Terrain Editor, you can fix these issues. [Image depicting steep versus sloped terrain.](https://i.imgur.com/rrsFDSy.png) * **Use as many materials as you want** The voxel algorithm will not have any performance increases by using differing materials and colors for your terrain, so use as many as you'd like! [Image depicting upcoming and current terrain materials.](https://doy2mn9upadnk.cloudfront.net/uploads/default/original/4X/8/f/a/8fa06be8e325c2c1f9b15c24ae2d8e420fa37df6.jpeg) ![](https://i.imgur.com/PHFAspW.jpg) > ##### For more information, read the corresponding article relating to the usage, design, and code background to Roblox's Voxel & Procedural Terrain, authored by Roblox Technical Director, zeuxcg. [Voxel Terrain: Physics, January 22, 2018 by zeuxcg](https://blog.roblox.com/2018/01/voxel-terrain-physics/) [Voxel Terrain: Storage, April 13, 2017 by zeuxcg](https://blog.roblox.com/2017/04/voxel-terrain-storage/) [New Terrain, and Parts, and Built-In Materials, Oh my, December 18, 2020 by RblxImagineer](https://blog.roblox.com/2017/04/voxel-terrain-storage/) **** ### Unions & Meshes > Unions can be a quick and resolve to an issue, but not all issues can be fully-solved so easily. When you use unions, they can decrease performance compared to a MeshPart. Read the following for more resolve on proper usage of Unions, and MeshParts; **CSG Objects** * **Cons of CSG objects;** * Performance decreases in Union's *When using a Union in your game, there is a high chance that the algorithm has added invisible polygons, or may ineffeciently conjoin the parts you've selected.* * Union's are not designed for low-end devices *As covered in the Roblox Developer Conference 2018, it was stated that CSG parts such as UnionOperation's are designed for mid-based devices, and BasePart's are designed for low-based devices. For example, a BasePart (Normal part, no CSG rendering) will be easier to render compared to a CSG or MeshPart object.* * "Vanishing" CSG objects *At times CSG objects (UnionOperations) can become corrupted, and appear invisible in the client, and studio. There is currently no way to combat this apart from adopting the CSG object as a MeshPart.* * Problems with shading *More often than not, you will find shading artifacts after you create a CSG object.* * **Pros of CSG objects;** * Quick and easy creation *Easy auditing and creation. CSG operations are designed to be quick, and easy when designing a new creation.* * No previous experience needed *Due to it being so easy to pick-up and learn, you can begin creating CSG objects within minutes of learning of the feature. Comparative to third-party applications and software such as Blender, or AutoCAD.* **MeshParts** * **Cons of MeshParts;** * Experience needed *To work with a 3D modeling software, you need some sort of experience in order to create your desired object.* * **Pros of MeshParts;** * Good effeciency per unit of detail *MeshPart's will be better for performance, because you can more accurately and effeciently manage the individual units of detail inside of the object.* * Easily create intricate and advanced shapes *Since 3D software is very manipulatable, you are able to quickly and effeciently create advanced shapes with no hassle.* * No shading artifacts *When you are creating an object in a 3D modeling software or application, you will almost never find shading artifacts - if the object is made correctly.* [Image depicting a shading artifact](https://i.imgur.com/nP3B6UC.png) ![](https://i.imgur.com/CRqZIx1.png) > ##### If you would like to learn more on CSG object performance, along with MeshPart storage usage, view the following article(s) [Roblox Developer Conference 2018 - Designing for Performance, July 24, 2018 by Roblox](https://youtu.be/rBrILsiVdtQ?t=1646) [Why Meshes Are Superior To Unions And How To Easily Convert Them, June 14, 2020 by DanTDM_Rocks999](https://devforum.roblox.com/t/why-meshes-are-superior-to-unions-and-how-to-easily-convert-them/625585/1) **** ### Textures & Images > When using things like, Textures, SurfaceAppearance, or Decal's, you may be concered with performance in-game and how to resolve it. One thing developers consider the most is an option to remove the view of textures in an effort to reduce the strain on the system. According to the DevForum, this has zero affect on the overall gameplay, as when you are loaded into the game, the textures are also already loaded - making textures invisible will not help with performance because they already exist. The only setting that will directly affect the rendering of textures in a positive manner would be the built-in graphics settings that come with the Roblox Client. > You can ready the following for tips to optimize your images and textures; * **Image compression** If your image exceeds 1024-by-1024, then it will automatically be scaled down to 1024-by-1024. *E.g. You have an image that is 3024x3024, the size will be decreased down to 1024x1024.* To combat Roblox's compression system, you could compress the image yourself. Pros & Cons to personal compression compared to automated compression; **Pros;** * Better compression results * Taking full-advantage of parts * Fully-supported increased optimization with less performance cost **Cons;** * Time intensive * Increasing storage usage on your device * A possibility to be cost-intensive, using third-party websites ![](https://i.imgur.com/TGzism6.png) > ##### For more information on image and texture information, refer to the following articles, titles included. [[TUTORIAL] Optimizing Textures and Images, October 3, 2018 by BuildIntoGames](https://devforum.roblox.com/t/tutorial-optimizing-textures-and-images/185497) **** ### StreamingEnabled > StreamingEnabled is a workspace variable that allows the client to dynamically and procedurally load assets in regions within your Experience. While having StreamingEnabled, the gameplay isn't affected, while the performance is increased. Here lists several attributes of StreamingEnabled; * **Faster load times** You will notice that players will load quicker into your Experience, with less strain on the device. * **Wider device support** There will be less strain on the memory for the device, allowing more devices to play your game with better overall performance. * **Less terrain-related device strain** Terrain will be loaded in through chunks more effeciently, allowing you to place more terrain with less memory cost. * **Set values for memory conservation** You will be allowed to set specific values for how accurate or in-accurate you want the level-of-detail to be for StreamingEnabled. * **StreamingPauseMode** With this mode enabled, the physical and simulation *(Particles, etcetera)* aspect of the client's game will be temporarily paused to allow objects and simulations to process without straining device, or crashing the client. ![](https://i.imgur.com/cFEXJD3.png) > ##### For more information on StreamingEnabled, refer to the following articles, titles included. [Big Changes to StreamingEnabled, September 18, 2019 by coefficients](https://devforum.roblox.com/t/big-changes-to-streamingenabled/351704) **** ### CollisionFidelity > CollisionFidelity refers to the composition of a part that processes the physical simulation of surrounding and internal objects. Having high-fidelity collisions in your game will ellicit a better physical experience for the player, in turn of more memory usage for collisions. The following points will demonstrate the benefits of using CollisionFidelity on your assets; * **Performance increases** When proplery using CollisionFidelity, you can have slight performance increases while anything is interacting with the object using CollisionFidelity. [Image depicting the decomposition geometry of a Jackalope](https://i.imgur.com/z9u3U4E.png) * **Collision patches** If you create a CSG or MeshPart object, at times you may find invisible collisions on your object. Using *CollisionFidelity > PreciseConvexDecomposition* you will solve this issue, at the cost of performance usage. ![](https://i.imgur.com/IvBI0kt.png) > ##### For more information on CollisionFidelity, refer to the following articles, titles included. [New Studio Feature - CollisionFidelity.PreciseConvexDecomposition, April 17, 2020 by Khanovich](https://devforum.roblox.com/t/new-studio-feature-collisionfidelitypreciseconvexdecomposition-enabled-globally/529077) [Hierarchical Approximate Convex Decomposition, July 8, 2015 by cmaughan, kmamou](http://khaledmammou.com/hacd.html) **** ### Lighting & Shadows > Depending on what lighting setting you use for your game, you will see that you have an increased, or decreased performance usage. The following points depict all of the possible lighting settings that you can use for your game; * **Compatibility - Low Performance** This lighting setting uses the least amount of performance possible, best for games that are large and memory-heavy. * Does not simulate local shadows * Does not simulate sun shadows * Does not simulate local lights * Does not simulate lighting attributes *(Sunrays, etcetera)* * **Future - Ultra Performance** * Simulates local shadows * Simulates sun shadows * Simulates local lights * Simulates lighting attributes *(Sunrays, etcetera)* * **ShadowMap - High Performance** * Simulates local shadows * Simulates sun shadows * Does not simulate local lights * Simulates lighting attributes *(Sunrays, etcetera)* * **Voxel - Mid Performance** * Simulates local shadows * Simulates sun shadows * Simulates local lights * Does not simulate lighting attributes *(Sunrays, etcetera)* ![](https://i.imgur.com/OUBiS3H.png) > ##### For more information on Lighting, refer to the following articles, titles included. [Future Is Bright: Phase 1 - Studio beta, October 3, 2018 by zeuxcg](https://devforum.roblox.com/t/future-is-bright-phase-1-studio-beta/182687) **** ### GraphicalUserInterface > The GUI (GraphicalUserInterface) performance for any game generally depends on what type of UI you use, how you use it, and where you use it. For instance, ViewportFrames are very performance intensive, and can drastically decrease performance when used. Unlike images, the Client will *not* render UI if it is *disabled*, or if the *Visible* attribute is *disabled*.; ![](https://i.imgur.com/ehU1hoD.png) > ##### For more information on GraphicalUserInterface, refer to the following articles, titles included. [Performance considerations, improvements, and optimizations when making a game, October 12, 2020 by Mystifine](https://devforum.roblox.com/t/performance-considerations-improvements-and-optimizations-when-making-a-game/817499) **** ## Conclusion The overall memory conservation and storage usage decreases for your virtual Experience is best for all players, and developers for your experience. Alongside ensuring that your game is playable, making sure that it is effective is just as important. **** *This article was authored by Rambunne - a virtual user of the Roblox platform, made in conjunction with Roblox's subsidiaries, and virtual client, Roblox Corporation©, Roblox Studio©, Roblox Player. With resources from Roblox DevForum, third-party, en.help.Roblox, primary-party, and any aforementioned attachments. Hierarchical Approximate Convex Decomposition, project HACAD, source code (https://sourceforge.net/projects/hacd) sourceforge©* *Any concerns with this document should be directed to **xMax#7777** *(Author)* on Discord.com* ###### tags: `Tutorials` , `Roblox` ###### Memory Conservation and Reduction for your Roblox Experience's by Rambunne, April 29, 2022