Streamable Model Component
This page details how to control the settings of individual VIVERSE Polygon Streaming models within your PlayCanvas project when using the VIVERSE PlayCanvas extension.
Last updated
Was this helpful?
This page details how to control the settings of individual VIVERSE Polygon Streaming models within your PlayCanvas project when using the VIVERSE PlayCanvas extension.
Last updated
Was this helpful?
Polygon Streaming component settings are only available when using the VIVERSE of the PlayCanvas editor.
The Streamable Model Component or Polygon Streaming (VIVERSE SDK) component represents the model to be streamed inside your project. It will ask for a Polygon Streaming URL, which is the address of your newly converted model. Once you paste the address in that field, it's ready to be streamed inside your scene
Initial Triangle Percentage is the percentage of triangles to be first loaded in the scene. You should enter a number between 0 and 1. The lower the number the quicker the model will appear but at a lower quality though will start to update to a higher quality straight away.
Cast Shadows and Receive Shadows should be checked in order for the model to cast and receive shadows.
Force Double Sided Materials should be checked if parts of the model are not showing up. This usually resolves problems with incorrect normals on the model. If you are not encountering problems with the model you should leave this setting turned off or you will double the amount of triangles that need to be rendered.
Use Alpha should usually be turned on but can be turned off to increase performance but transparent materials will render opaque.
Play Animation Automatically determines whether to play the embedded animation when the scene is loaded.
Animation States map states in the animation state graph (see below) to the embedded animations. To the left of Array Size enter the number of state/animation mappings you want. State should be the state name in the state graph. Animation is the name or index of the embedded animation and layer is the layer in the state graph. If it's left blank it will use the base layer.
Scripting Polygon Streaming animations works in the same way as standard PlayCanvas animations but you shouldn't try to access the anim component in the initialize method of a script component as it's only added once the model has loaded.
Below is an example of triggering an animation using a state graph. The state graph has a running parameter and when it's set to true will transition to the Running state. You will need to setup the parameters, states and transitions in the state graph.
It is possible to change the animation without a state graph. The following switches to the idle state with a transition duration of 0.2 seconds. if no animation states are supplied it will use the embedded animation name as the state name.
Priority Level and Quality Priority affect the same setting but the first provides presets while the second allows you to enter a number. This setting affects how triangles are allocated to each model and is a ratio. For example if you have one model set to 1 and another set to 2 and both models are the same distance from the camera, the second model will receive twice as many triangles as the first.
Default
1
Higher
1.5
Highest
2
Custom
Enter a number in Quality Priority
Animation To Play is the embedded animation to play when the scene loads. This can either be the name of the animation or it's index i.e. 0 would be the first animation. If it's left blank it will play the first animation. You can view the names of the animations in a GLTF file in the . If you have supplied an animation state graph the initial animation will be the animation that is set in the default state. The default state is the one that is connected to START in the state graph editor.
Animation State Graph allows you to control the transition between different animations when triggered from code. .
Environment Asset allows to set a custom environment map to use for the streaming model. It expects a cubemap which . This is useful if you have not set an environment asset in the scene but still want reflections to show on the model.