Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.
First time visiting? Here are some places to start:- Looking for a certain topic? Check out the categories filter or use Search (upper right).
- Need support? Ask a question to our Community Support category.
- Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
- Be respectful, on topic and if you see a problem, Flag it.
If you would like to contact our Community Manager personally, feel free to send a private message or an email.
Design rules for greatly improved performance on large assemblies.
jason_29
OS Professional Posts: 11 ✭✭
This isn't a request for support, this is intended to be a discussion on performance improvement techniques for large assemblies. I worked with @lougallo substantially over the past few days to get to the bottom of some performance issues of an electric vehicle I am designing. There are two major takeaways, which will likely be irrelevant in a year as OS continues to improve its rendering engine, but I'll offer them to the community here, since they are essential for large assemblies today.
1) Imported fasteners that are fully threaded increase rendering effort by two orders of magnitude. Ex. An M3 12mm length socket cap head screw might be 400K triangles. A simplified version with a cylinder representing the threaded area will result in 4K triangles. This has profound impact on rendering performance.
Improvement: Build simplified models for all threaded fasteners and this will decrease the triangle count for fasteners by two orders of magnitude. In my model, it reduced the total triangle count by a factor of 2-3.
2) Completely occluded parts are still rendered. This seems unintuitive, and perhaps an inappropriate use of resources, but for whatever reason, this is the case today. OS might have a very good reason for this that I am not aware of. In an assembly, if one deliberately "hides" parts or sub-assemblies that are completed occluded, you will see a performance increase. In my model, I saw a 1.5x improvement in the render frame rates.
Improvement: Hide models which are completely occluded.
Overall, I was able to see 2-3x frame rate increase in my large assembly implementing these two tricks above.
I'll update this post as others offer insight, or if these suggestions are made irrelevant by continued OS improvement.
Warmest,
1) Imported fasteners that are fully threaded increase rendering effort by two orders of magnitude. Ex. An M3 12mm length socket cap head screw might be 400K triangles. A simplified version with a cylinder representing the threaded area will result in 4K triangles. This has profound impact on rendering performance.
Improvement: Build simplified models for all threaded fasteners and this will decrease the triangle count for fasteners by two orders of magnitude. In my model, it reduced the total triangle count by a factor of 2-3.
2) Completely occluded parts are still rendered. This seems unintuitive, and perhaps an inappropriate use of resources, but for whatever reason, this is the case today. OS might have a very good reason for this that I am not aware of. In an assembly, if one deliberately "hides" parts or sub-assemblies that are completed occluded, you will see a performance increase. In my model, I saw a 1.5x improvement in the render frame rates.
Improvement: Hide models which are completely occluded.
Overall, I was able to see 2-3x frame rate increase in my large assembly implementing these two tricks above.
I'll update this post as others offer insight, or if these suggestions are made irrelevant by continued OS improvement.
Warmest,
Jason
3
Comments
Thanks for posting @jason_29. I noticed some performance degradation on one of my documents. I wonder how far along wegl is with handling things more automatically for us? Is this a webgl thing, or am I off base. I have seen modelers implement efficiency tricks over the years as they got more advanced. My curiosity is peaked.
I think these types of methods are more an evolution of the application and not necessarily the underlying graphics language - although I am a complete hack in this realm... so don't trust me. Just trying to understand.
I’m one of the engineers that works on the Onshape’s WebGL functionality. Performance is and will continue to be a high priority for us. Up until now, most of work in this area has focused on packaging our display data so that the GPU can render it as efficiently as it can. However, as @jason_29 astutely observed, we are not dynamically changing the rendered content. This is something we are pursuing on two fronts:
1) Avoid rendering parts that will not be visible (i.e., are outside the frustum, too small, or are occluded)
2) Dynamically reducing detail to maintain a decent representation of the assembly while maintaining good interactivity.
Skipping occluded parts, or occlusion culling, is an interesting problem. WebGL 2 will be exposing functionality to make this possible, though one has to be careful about how the functionality is used - otherwise more time can be spent determining what is occluded than is saved with that information! If you’re curious, nvidia has a good overview here:
http://http.developer.nvidia.com/GPUGems2/gpugems2_chapter06.html