Code Monkey home page Code Monkey logo

Comments (3)

FedeClaudi avatar FedeClaudi commented on July 17, 2024 1

Hi Marco,

That fixed it!

Just an unrelated question (don't want to open an issue for this): are there ways to improve performance?
I've had some users who expressed the desire to rendered large number of objects (10k - 1M spheres ), but when I tried it my computer started complaining at about 10k objects. Any idea?

Thank you very much,
Federico

from vedo.

marcomusy avatar marcomusy commented on July 17, 2024

Hi Federico
cool project! I think this is a general vtk-related problem, as vtkplotter has no control over it.
Probably it's fixable by setting:

from vtkplotter import settings
settings.useDepthPeeling = True
# settings.useFXAA = True

(perhaps with some combination of the two flags).
See also related example here where actually one can reproduce the issue by setting useDepthPeeling=False.
Hope this helps!
Marco

from vedo.

marcomusy avatar marcomusy commented on July 17, 2024

Cool!

..if you create many actors independently at some point you will lose performance.. things you can do are:

  • reduce the number of vertices/resolution in meshes (e.g. with shapes.Sphere(res=10)
  • decimate large meshes (actor.decimate(fraction))
  • substitute Sphere with Points (or Spheres), and/or use settings.renderPointsAsSpheres=False
  • use glyphs for repeated objects, see examples:
    manyspheres.py, manypoints.py and glyphs.py or glyphs_arrows.py

Let me know if this improves speed/memory
Cheers, Marco

from vedo.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.