In theory, there's no limit to the complexity of models that can be displayed. However, WebGL is hardware-accelerated, so the viewer's performance depends greatly on the machine displaying it. This is even more important to consider for mobile users. Many different factors can affect how long a model takes to load and how well it performs after it's loaded.
Download Time
Before a model or scene can be rendered, the viewer needs to download and prepare all the required assets. This is what happens during the Loading 3D Model screen as well as the first moments of rendering when higher-resolution textures are loaded (the blue loading bar across the top of the viewer - if you want to avoid this step and only display the model when the full resolution textures are ready, try the preload embed parameter).
Textures
All the texture images need to be downloaded, so using many high-resolution textures can greatly affect download time. We optimize texture file size after you upload a model or make changes to materials, and we will never use a texture larger than 8192×8192 pixels. However, you should minimize the number of textures and the size of textures as much as possible.
Visit the Materials & Textures article and texture performance in this article for more details.
Mesh Size
The higher the vertex count / polygon count of your model, the longer it will take to download.
Background
HDRi environments are large images, and if you are using one for the background and/or lighting, it needs to be downloaded. A fixed image background also needs to be downloaded. A solid color background is the best, as it requires no download.
Scene Optimization
While not technically part of the "download", several scene optimization processes take place before the scene is rendered. This can greatly improve viewer performance. It usually does not take much time, but the more complex the scene, the longer this will take. The following things happen during scene optimization:
- Merge identical materials
- Merge meshes (geometries) that share the same material
- Simplify the scene graph
- Remove unused UVs
- Remove unused vertex colors
- Remove unused normals & tangents (this can also happen during processing in some cases)
- Channel pack textures (e.g. Diffuse and Metalness)
Scene optimization is disabled by default in the 3D Settings editor and when using the Viewer API. Geometries are not merged for animated objects or transparent objects, up to a maximum of 100 geometries per material.
If you don't need to keep the meshes and materials separated in a Viewer API application, you can enable these optimizations in your URL options:
'merge_materials': 1,
'graph_optimizer': 1,
'material_packing': 1,
Rendering Performance
If you're having trouble with slow model viewing, bad frame rates, or browser crashes, the scene is probably too complex for your device or browser. There are many complexity factors that affect performance.
- Materials
- Textures
- Meshes
- Polygons / Vertices
- Bones
- Nodes
- Transparency
- Shadows / Lighting
- Shading
- Post-Processing Filters
- Conclusion
Materials
A large number of materials is a significant bottleneck in rendering performance. Instead, you can use a single texture instead of many material colors. Sketchfab supports a maximum of 100 materials in a scene.
Textures
Textures require a lot of VRAM to render, so the fewer textures you can use, the better. A 4096×4096 (4k) texture, for instance, can require ~50MB (50 MiB, actually) of memory. It adds up quickly with lots of meshes and big textures.
Keep in mind the size of a texture versus the final screen size of the object in question. It's unnecessary to use a large texture on an object that will appear very small on the screen. Rather than use many separate textures, you can use a texture atlas to pack the textures for different objects together. This also allows you to have fewer materials. Check out the Polycount Wiki on the subject.
Textures above 8k will never be rendered in the viewer. If you need higher resolution, use multiple textures instead. Non "power of two" textures will never be rendered in the viewer. See Materials and Textures.
While there's no strict rule here, we've found that 4k resolution is a good limit for performance and compatibility. It's better to use a 4k texture than several 2k textures, but it could be better to use a few 4k textures rather than an 8k texture.
Meshes
The more separate meshes/objects/geometries in your scene, the worse the model will perform. Ideally, there would be only one mesh for each material. This is a common issue with SketchUp models and CAD models. During processing, we also split large meshes into 65,536-vertex chunks, in order to support all graphics cards.
Polygons / Vertices
Decimating your models to reduce polygon count can be a good way to improve performance. In most cases, it's unnecessary to have a polycount in the millions. It's also possible to 'fake' a higher polycount with normal mapping. Here are some related tutorials:
The lower you can make your polygon count the better, and there is no exact "maximum" because it depends on lots of different variables about the model and the device. However, as a rule of thumb, aim for less than 2 million polygons for desktop and less than 500,000 polygons for mobile.
Bones
The more bones you use in an animated skeleton, the more expensive it is to render the animation.
Nodes
The total number of nodes in the scene graph roughly represents the overall complexity of the model, and includes common objects like nodes, transforms, meshes, and bones.
Transparency
Rendering transparency is very expensive, depending on the type of transparency you use. From fastest to slowest: Mask, Dithered, Additive, Blending, Refraction. The more objects with transparency and the more polygons a transparent object has, the slower rendering becomes.
See Transparency.
Shadows / Lighting
Rendering real time shadows from dynamic lights is expensive. Lights Attached to camera are problematic because they must be rendered every single frame as the camera moves. It's best to avoid Directional and Hemi lights casting shadows and attached to camera whenever possible.
Shading
Using Shadeless mode is faster than Lit mode because there are no light calculations needed.
Post-Processing Filters
Using a lot of post-processing filters can hurt performance. SSR, SSAO, Bloom, and DoF are particularly expensive.
Conclusion
All of these different complexity factors interact to influence the complexity of the scene and affect the viewer's performance. It's not an exact science, but here are some recommendations for model performance:
- As few materials as possible
- 50 geometries/meshes or less
- 10 textures or less, especially when they are 4k+
- 2 million polygons or less for desktop; 500,000 polygons or less for mobile
- Fewer than 35 bones per geometry
- Low scene complexity
- Avoid expensive transparency methods
- Avoid lights casting shadows when attached to the camera
- Consider using Shadeless mode when appropriate
Obviously, different models will have different requirements, but it's important to keep these points in mind, especially for large and complex scenes. Check out Unity's Performance Tips for more details.
Other common problems
Shaky model with cracks and seams
This shaking problem is caused by having very large (or very small) numbers as vertex coordinates. A solution is to reduce (or increase) the scale of the model before uploading. It can also be caused by overly precise vertex coordinates (floating point error), which can be fixed by rounding off coordinate values to a lower degree of accuracy. This can be particularly problematic for georeferenced models. It's best to change from a global coordinate system (like WGS84) to a local coordinate system, or otherwise remove any kind of georeference flags.
A good solution is to recenter the model in its bounding box, which can be done in software like MeshLab.
- Open the model in MeshLab
- Go to Filters → Normals, Curvatures and Orientation → Transform: Translate, Center, set Origin
- Check Freeze Matrix and set the Transformation to Center on BBox
- Click Apply. You may see the model disappear - this is OK.
- Export the model as OBJ, make sure you have TexCoord enabled if you have textures.
- ZIP the OBJ + MTL + Texture and Re-Upload to Sketchfab
Flickering surfaces (Z-Fighting)
This problem is caused by overlapping faces. You should remove any overlapping surfaces from your model.
Comments
56 comments
My model (https://skfb.ly/EwuI) looks distorted in the viewer. Please see the annotation.
I always colouring the models BEFORE upload to sketchfab --> https://skfb.ly/ExoN
STL-files can´t be coloured,- You must use a file format which is able to include color information. I.e DAE / Obj or blend.
In this case I just loaded the file into "Blender", coloured the part and used the already integrated sketchfab uploader
Thank you, it's a good workaround to know. Makes it less convenient for someone to download and print the model.
Is there a way to upload two files for the same model: one for rendering and another for downloading?
I.e obj-files contain 2 files. You can zip this 2 files and upload to sketchfab after.
If somebody downloads from Sketchfab, he´ll get the zip file with the 2 files again.
Downloadable example: https://skfb.ly/ExIs
if it is important to convert to stl , You can use the easy to use freeware "netfabb basic" to convert from obj to stl.
Looks like there might be some weird stuff going on with normals, too, which causes unexpected shading: http://puu.sh/hUIs0/1dc02420cb.png
Not much you can do about that, especially for STL, which contains no normal data and we smooth with default settings. Every software has different features (and worst of all, uses different words to describe them). But I can, for example, use "completely unwelded vertices" in Rhino, and export as OBJ: https://skfb.ly/ExKE
Note the difference in vertex normals: http://puu.sh/hUJ8R/7ab936f2bd.png
In that model, you avoid the weird shading, but don't get the nice smoothing on the curved parts (you can see every polygon). Ideally, I could go through and unweld only the edges that are causing problems.
Over-aggressive smoothing is a promising hypothesis. If someone is going to be fine tuning "the default settings", I can supply more examples. In fact, every model that I uploaded last night came across grotesquely distorted. A few weeks ago I uploaded a very similar model and don't remember there being a problem with rendering. And Blender doesn't have a problem with the model.
At some point we may allow users to recalculate normals in 3D Settings with a choice of crease angles. But no ETA on that yet. We've tweaked the smoothing quite a bit already, but it will never meet every possible need. The best option right now is to explicitly set your own normals/smoothing. That said, please do send me samples, we'd love to take a look.
Here're a few distorted models: https://skfb.ly/ExqP, https://skfb.ly/ExpM, https://skfb.ly/ExnC, https://skfb.ly/ExoR. Thanks!
James
I have been utilizing Sketchup #8 for three years and now I utilize sketchup 2015. I have had no problem with the pgn files whatsoever in the past and now the company I sent my pgn.files to requires that I utilize sketchfab!? Why do I all of a sudden have to become familiar with manipulating the number of polygons, meshes, and textures! This only happens when a CEO has no experience with rendering so of course he would recommend a website that is not user friendly. Most of us do not have the opportunity to learn all the facets of this platform you're not dealing with a demographic that is only 35 years old! Not all of the users have the ability to become literate with an abstract method of achieving an accurate portrayal of our renderings! Since I was not given the option not to use this website Why are certain types of rendering software not compatible with this platform! My intention is to achieve a cohesive and coherent rendering without the well's and but's hassle that are associated with this website!.
@images--j_l_b.
I'm not really sure what you're asking here. 3D assets should be shared in 3D, not 2D. We do our best to support all kinds of 3D software, including SketchUp. Thousands of users have SketchUp models successfully rendered on Sketchfab, and I'm happy to help you do the same. I will follow up via email.
В каком формате нужно сохранить модель что бы к вам загрузить с текстурами ?
@stroporez79 Lots of formats support textures: FBX, OBJ, DAE...
Details here: https://help.sketchfab.com/hc/en-us/sections/200485707-Uploading-3D-Models
I have a problem that is not addressed. I uploaded my model and it completely uploaded and it switched to processing. It has been more than an hour now, the model only has 700 tris, and it says "pending" on my uploads page. I have tried a few other models as well, with the same result. Are the servers down or something? :(
@zulubo Very sorry about that. We had some issues with our processing servers over the weekend. Things should be back to normal now.
Hi! Really strange behavior i have with sketchfab. I've uploaded model with diffuse map. Share it via share button. Use link.
If i watch my model with Xperia Z tablet in Chrome or Firefox browser it doesn't shows diffuse map, black colored model instead in HD mode. In LD is fine. Diffuse texture size is 4096 square.
If i do the same things on my personal computer under Windows 7 everything works fine.
Could it be some RAM limits problem on tablet or else?
@exeshe4ki - If you're seeing a black model instead of the diffuse texture, yes, it usually indicates a lack of memory. Sometimes simply refreshing the page, switching HD → SD → HD, and/or reducing memory usage from other tabs/apps does the trick. This tablet probably does have the memory to render that texture, it may just have hiccuped.
My holographic model doesn't look like the same between 3D settings and the finished one!
@BeakBlack - They look the same to me, can you elaborate and/or share some screenshots of the issue?
What does it mean?
How can I fix this?
Ark_9 - that's an error in the 3ds Max exporter plugin, and has nothing to do with this help article about viewer performance.
I recommend contacting Klaas here, he maintains the plugin: https://forum.sketchfab.com/u/klaasnienhuis/summary
Guys. " Unity's Performance Tips". This page was last modified on 12 April 2013, at 22:19.
I don't think that the time is that relevant. It was 7 years ago.
Hello, I am from Russia, it is difficult to navigate the English options. Please tell me how to create and customize numbers with a description?
My uploaded model doesn't get published with the textures, materials and Colour...Please what is wrong?
Hi Jamiuahmed809 - There should be a material library file "2 Bedroom assignment 2021.mtl" which is usually required when using OBJ files.
Also, have you tried our SketchUp plugin? https://sketchfab.com/exporters/sketchup
I think there is a small typo in the Conclusion section.
Where it says "2 million polygons of less for desktop; 500,000 polygons or less for mobile";
shouldn't it say "2 million polygons or less for desktop; 500,000 polygons or less for mobile"?
Maybe not a huge deal but maybe thought pointing it out would be helpful.
Hi @dylandhood - nice catch thanks for that! It's fixed.
Please sign in to leave a comment.