0

Performance is slow while rotating/moving the model on mouse gesture

Niteen 10 years ago updated by WooAja 3 years ago 6
Hello,

we have added the 2000 and more object in view port and because of this our model is running slow. When we try to rotate the model , it will move very slowly..

can you suggest, how to improve the performance to running fast and easy?

Please suggest. it's very urgent

Thanks,
Niteen Patil

You can join more Visuals3D in one . It's fasted if you reduced the Visuals3D count.

Example:

MeshBuilder.Append ( yourMesh )

If you do not need to manipulate the separeted models , you can join them.

We have implemented functionality according to your post and the performance is now fast as compare to earlier.

Thanks for your reply...:)
Hi Lucas,

We have join more Visuals3D in MeshBuilder object. But is there any way to set color for individual MeshBuilder object.
Please suggest. Here is my code.

Dim meshCollection = new MeshBuilder()

Private sub CreateDice(ByVal point3D As Point3D, xLen As Double, yLen As Double, zlen As Double, ByVal color As Color)
Dim diceMesh = New MeshBuilder()
diceMesh.AddBox(point3D, xLen, yLen, zlen)
meshCollection .Append(diceMesh )

End Function

public Window_load()
For k = 0 To 10
CreateDice(center, XLen, YLen, ZLen, color)
Next

Dim GeometryModel3D = New GeometryModel3D()
GeometryModel3D.Geometry = meshCollection.ToMesh();
GeometryModel3D.Material = MaterialHelper.CreateMaterial(New SolidColorBrush(Colors.Green))

Dim ModelVisual3D = New ModelVisual3D()
ModelVisual3D.Content = GeometryModel3D

viewport.children.add(ModelVisual3D)

End



Thanks and regards,
Niteen Patil







Yes, this is a problem. You can use a material group to put differents materials in your model, but is not easy to work. You can join just similar models, and this models dont need to be together. If you have a yellow tube in one point and you have other yellow tube in other point, you can join them. In my project, I work in this mode to a fastest result.