Jump to content

Problems on ObjectDynamic


photo

Recommended Posts

There is no exact sample available with renderInstancedSurface() usage, but for ObjectMeshDynamic usage you can check:

  • Samples -> C++ API -> Nodes -> Objects
  • Samples -> UnigineScript -> Objects -> dynamic_**
  • Samples -> UnigineScript -> Shaders -> lines_00

Thanks!

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to comment

Hi, silent:
According to the demos on ObjectDynamic, we invoke render() or  renderInstancedSurface() of MeshDynamic  in the update() or Render, but nothing displayed.

Should we set the MeshDynamic into Object so that it will display? But there is no interface we can do it.

So how to use MeshDynamic?

Link to comment

Hello liu.yan,

There's no need to call render explicitly. Once ObjectDynamic has proper mesh, settings and material, it will be rendered by engine like any other object. Inctancing also will be done automatically when ObjectDynamics point to the same mesh and have the same material.

I attached an example where several ObjectDynamics rendered instanced because there are cloned (so they have the same mesh) and have same material.

meshes.png

ObjectDynamicInstanced.zip

Link to comment
  • 2 weeks later...

Hi, Andrey:
  I had followed your way and it works. But the performance is dramatically dropping, comparing with ObjectMeshCluster.
 Is it normal or is there something we can do to improve performance.

 

test_cluster_9.png

test_9.png

test_100.png

Link to comment

Hello liu.yan,

Instancing is not the only optimization used by ObjectMeshCluster. It also hugely reduces CPU-side bottlenecks by using effective data structures.

And for ObjectDynamic 1,000,000 nodes are still 1,000,000 nodes even with instancing. The engine can't really deal with such a number of them on the screen.

I can see two options here. The first one is to stick with ObjectMeshCluster and try to utilize the standard vertex format. And the second one is to write custom Object efficiently working with large number of MeshDynamic's instances which maybe not a simple task.

Link to comment
×
×
  • Create New...