Hi Mikko,
Thanks for providing the additional context regarding your scene geometry and background updating process. I’ll answer below all the topics you raised.
Slow load on scenes that have big backgrounds
Thanks a lot for reporting this issue. I have been able to reproduce your tests on my side, and this is definitely something we will focus our effort on and try to improve as much as possible.
A preliminary analysis confirms this is a consequence of a new background parsing process we need to apply to the background to enable the usage of the new AI Path tools introduced version 7. We did notice a small delay in our testing process, but your tests highlighted a scenario we did not try, which is using a background with a massive horizontal surface. The vertical dimension is ignored in the parsing, so it takes exactly the same time regardless of the vertical extension of the geometry.
By massive I mean that the delay starts to be annoying on areas above the 50.000 square meters, which definitely is on the upper range of the projects usually done by Anima users. The image below represents that same area surface (500m x 100m), and takes 4 seconds to import it into Anima:
However, going beyond that scope, the delay is increased exponentially:
- 500x100 → 4s
- 500x200 → 16s
- 500x500 → 120s
Moreover, even though it is not common to deal with projects of this size to simulate people, it is more common when simulating traffic. Therefore, we have reported this issue to the Anima developers (AN-1450), and they are already working on implementing different solutions that should help to deal with these scenarios more comfortably in the future.
Background Geometry Offsets
By default, we apply an offset to the geometry background imported that is based on where the centroid of all the mesh vertex is. The reason behind this is that CAD files sometimes have scene origins that are very far away from the actual position of the main geometry that you want to work with. Working at such a great distance from the origin may introduce stability issues in the animation engine we are using in Anima. This is a common limitation when working on high-performance environments like the one we use for the Anima viewport, and it happens due to precision errors in the position data that can be managed in realtime. You can’t have both, so CAD software (AutoCAD, Revit) prioritizes precision while visualization 3D software (3dsMax, Cinema4D, Unreal Engine) prioritizes performance.
To avoid this limitation, we reposition the mesh on every collision background import process so it ends up always close to the Anima scene origin. Then we store that origin offset, and we finally apply the inverse offset during the import of the Anima content back into the DCC application. This is not something new, it has always been this way in all Anima versions since the beginning, and should not have any impact on your workflow as long as you don’t remove that background node after the initial import.
The key idea to keep in mind is that the offset of your background geometry is stored in the node “Background Model” from your scene. You can find this node on the Anima node tree, in the scene you are working on. As long as that node is not removed, the offset will be kept the same, and any modified geometry you bring into your background will keep its relative position coherent.
At the same time, if that “Background Model” node is removed, whenever a new background is dropped into the scene, a new offset is calculated and adapted to that particular geometry. Then that offset is stored in a brand new “Background Model” node in your scene, along with the whole background geometry definition (all the vertex, polygons, and objects included in it).
Knowing that, you can use it to your advantage based on your needs. If you need to keep updating a geometry background over time, then you can export multiple versions of that geometry in different FBX, and all of them will match the coordinates perfectly as long as you don’t remove the “Background Model” node and just drop those backgrounds one over the other.
Please check the video below, it explains in more detail and with a few simple background samples how this offset concept works:
If you already removed the background node from your scene, a quick way to manually fix the problem would be by selecting the “Background Model” node and repositioning it manually inside the Anima viewport so it matches the position of your previous background. Then save the scene in Anima to sync with your 3D app, and from then on everything should work fine in further background updates (as long as you keep the same background node).
Can You Have More Than One Background Attached to a Scene?
No, each scene can only have 1 geometry background inside. The reason behind this is that the geometry backgrounds need to be parsed and pre-processed so Anima has an understanding of their geometry and properly adapt the animation of the assets accordingly.
That said, it is possible to have multiple objects inside each geometry background imported. Also, as Anima is a project based application, you can end up having multiple geometry backgrounds in your project and quickly switch from one to another depending on your needs.
On the other hand, notice that since Anima 7 it is possible to assign a “Non-walkable” definition to any of the objects included in your collision background. The documentation for this feature is still under development, but it basically means that you can keep some objects from your background in your Anima scene as a visual reference, but they will not affect the simulation in any way.
The process is the following:
- Click this icon to enable the selection of background objects directly in the viewport
- With 1 active, use the LMB to select the object you want to edit
- Once object is selected, use the RMB to open the contextual menu
- Click there to switch this object to “Non-walkable”. The icon will change in the node tree too
- To finish the process click on (1) again.
From then on, this object should be visible in the viewport but invisible to the simulation engine. Perhaps you can use this method to exclude sections from your background that you only want to keep as a visual reference but will actually never be used by the simulator.
This answer is getting very long, so I’ll leave it here for now. Whenever you have the time, please take a look at it and let me know what you think.