Working with Data
Last updated
Last updated
In larger projects with thousands of objects added in a single scene the traditional approach of adding a PlayCanvas entity for each object can't easily scale.
After a few thousands of entities are added to your project the update time required by the PlayCanvas engine to process these entities on each frame can be significant and can result in a large frame rate drop.
Uranus GPU Instancer provides an alternative way of adding objects to your project using an advanced data parser.
The uranus-instancer-data.js
script can receive raw input with the minimum information required to spawn these objects directly in the instancing vertex buffers, without adding separate entities to your scene.
That way you can add thousands of objects to your scene while keep both the scene size small and the update time short. It's a great system for adding static objects to your scene like vegetation, cliffs, rocks, buildings etc.
The data consumed by this script can be provided by:
A JSON file that includes a single flat array with the required data (instance id, position, rotation etc.). The Uranus Editor Painter generates a file like that but it can also be generated manually.
A terrain distributor can feed its data directly to this script and easily add its objects to the instancer.