This page details the process of setting up the VIVERSE Polygon Streaming plugin in Unity.
To start using the plugin, there are two Prefabs that can be found in the Plugin's folder which will be all you need to stream your models inside Unity Engine. The Stream Controller, and the Streaming Model.
You can drag and drop both prefabs inside your Unity Scene and be ready to start streaming your converted 3D model inside the engine.
The Stream Controller should only be added once, and it controls the streaming feeds inside your scene, you only need to set the Main Camera in the Camera field. The Streaming Model is a prefab to be used with all models that will be streaming from the cloud into your project, you only need to add the URL of your converted model into the URL field.
Once that's set, press play and your streaming models will already start streaming inside your project!
This page details how to control the global settings of VIVERSE Polygon Streaming within your Unity project.
The Stream Controller manages the streaming of models and streaming parameters inside your project. There must be only one Stream Controller per scene, since it will control all Streaming Models as one.
The Stream Controller needs to have a reference to a Camera object which will based the distance between viewer and object. It also contains several parameters and features to assist with the best streaming quality and control.
The Triangle Budget is a limit on the amount of triangles that will be drawn per frame. Increasing this will lead to better visual quality, but of course also higher processing and memory utilization. It's recommended to keep Triangle Budget to at least 30% of the full amount of polygons that you are going to stream. For example, if you are going to stream a 3D model of 10 million polygons, it's recommended to use a Triangle Budget of at least 3 million.
In case you use too low Triangle Budget, for example 500 thousand to stream 10 million polygons, you may reach the budget before it's possible to showcase the higher quality of the model. Resulting in only showing a lower quality version of the model in order to stay within the budget.
The Distance Factor is a factor between the distance of the camera to the object being streamed. The default value of 1.1 has a neutral preference. A higher value, such as 3 or 5, will have a preference for nearby objects over objects further away. These parameters can be changed at runtime to find the sweet spot for your scene.
The Close Up Distance is a change in the distance factor between camera and streaming object when the camera gets too close. For example, when the camera is at 3 units or less of distance from the object, it will use the value at Close Up Distance Factor, when the camera is further than 3 units from the object, it will use the value at Distance Factor. That way the system forces a strong streaming of data when the camera is very close to an object.
The Distance Type can be set to Bounding Box or Bounding Box Center. In case it's set to Bounding Box it will calculate the distance between the camera and object based on the edges of the bounding box of the object. In case it's set to Bounding Box Center, it will calculate the distance from the center of the object. It's recommended to use Bounding Box for single objects, and Bounding Box Center for full environments in which the user will be walking inside the object.
The other parameters should be left in default or you can check an explanation on the Supported Parameters section.
Viewer Camera
The viewer camera to be set, the system will calculate distances based on the selected camera.
None
Triangle Budget
The maximum amount of triangles that you want to allow in the scene at any single point.
150000000
Distance Factor
Preference for nearby objects over objects further away. Values above one mean a preference for nearby objects. Values below one mean a preference for objects further away. One is neutral.
1.1
Close Up Distance
The distance where it starts using Close-up Distance Factor instead of Distance Factor. Set it to 0 to not use close-up distance factor.
3
Close Up Distance Factor
The distance factor used when close-up to an object. Should be higher than the standard Distance Factor.
5
Distance To
Distance type from camera to the meshes bounding boxes.
Bounding Box
Max Download Size Mb
Pause downloading more data when the current active downloads exceed this threshold.
4
Maximum Quality
Stops improving geometry that exceeds the maximum quality. This can be used to stop far away objects from showing more detail which can be wasteful. Leaving this at 0 means there is no maximum quality.
0
Occlusion Culling
Enable Dynamic Occlusion Culling.
True
Raycast Mask
Set masks for the occlusion culling raycast.
Everything
Time Slicing
Determine how many frames should be accumulated to decide whether an object should be hidden.
120
Ray Per Frame
How many rays are generated per frame.
256
This page details how to control the settings of individual VIVERSE Polygon Streaming models within your Unity project.
The Streaming Model prefab represents the model to be streamed inside your project. A Streaming Model component always needs a reference to the Stream Controller component to function and a Source URL which is the URL of your converted model. Once those two are correctly set, your model will start streaming inside your project as soon as you press Play.
The Stream Controller is a reference to the Stream Controller inside your scene and needs to be set, and the Source URL is the URL of your converted model that needs to be pasted in the field.
In case your project is using Light Probes, you can tick the Light Probe Usage box. In case you would like to use a custom material in your streaming model, you can tick the Custom Material box, which will open a new panel that will allow you to change the material.
You can also set different Quality Priority options by clicking at Streaming Runtime Options Settings. This means that some models can have higher priority of streaming than others, it can use only integer numbers and it works in the following logic:
You can also turn on or off the Streaming Model Preview script to check a preview of your streaming model in the scene without the need to play it.
Stream Controller
Set the Stream Controller from the scene.
None
Source Url
Address of the Streamable Model to be streamed into the scene.
None
Normals
Calculation parameter for the normals of the model being streamed.
Original Vertex Normals
Light Probe Usage
Enable if using Light Probes in the scene.
False
Custom Material
Enable if wish to use custom materials.
False
Quality Priority
How much to prioritize the quality of this model relative to the quality of other models in the scene. This parameter does nothing if this is the only model in the scene.
1
This page details basic information about using VIVERSE Polygon Streaming with Unity.
Polygon Streaming models can be added to Unity Engine based projects with the use of our Unity Plugin, being able to stream multi-million polygon models streaming from the cloud into your projects and build for desktop, mobile and VR headsets.
Open Package Manager inside the Unity Engine - The Plugin should ONLY be installed via Package Manager and not copying inside the project’s folder, since it also need to automatically install dependencies:
Press the + button and choose Add Package from tarball… and select the downloaded .tgz file.
If everything went correct, the package should now be visible under the Packages list in the project panel
Download the latest extension version
Change Log
01/02/2025
2.7.1
Hotfix for model updating bug
Support for updated convertor and newly converted models (2.11.1) at player level
Small small performance optimizations
10/28/2024
2.5.0
Support Vertex Color
Support Multi UV Set
Support KHR_materials_emissive_strength in BRP
Occlusion culling improved performance
Distance Type set to only Bounding Box Center
Fix shader bug in Android devices
9/16/2024
2.4.2
Fix shader bug in Android devices
9/10/2024
2.4.1
Fix Preview bug
Fix KHR_texture_transform bug
Fix KHR_materials_specularGlossiness bug
7/30/2024
2.4.0
Support KHR_materials_pbrSpecularGlossiness
7/05/2024
2.3.8
Fix Texture Transform Issue
7/03/2024
2.3.7
Fix Double Sided Material Transparent Issue
Add Signature Check
6/12/2024
2.3.6
Support xrgc version 4 - read materials from info.json
Fix XrgcMaterial default value spec
5/22/2024
2.3.5
Fixed all found memory leaks.
Support Doubled Material in BRP and URP.
Handling Stream Controller destroying/disabling edge cases
Free up resources when hiding/disabling models
Hotfix light probe usage.
Quality Priority now works only with integer numbers and follow the following logic: 0 = Highest priority. 1 = Lowest priority. 2 or more = Higher priority than lower number, but still lower priority than 0.
4/26/2024
2.3.4
Hotfix light probe usage
4/15/2024
2.3.3
Handle destroy / disable more gracefully
Free up streamingcontroller resources when hiding / disabling models
3/23/2024
2.3.2
Add Light Probe Usage in Streaming Model
Small fixes for memory and performance
2/22/2024
2.3.1
Fix Triangle Budget Bug
Remove duplicated metallic roughness and occlusion texture
0
Highest Priority
1
Lowest Priority
2+
Higher Priority from the previous number, but still Lower Priority than 0 (zero).