Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jan 31 2019 16:26
    kmuehlbauer commented #1568
  • Jan 31 2019 16:15
    kmuehlbauer commented #1568
  • Jan 31 2019 15:53
    djhoese commented #1568
  • Jan 31 2019 15:46
    kmuehlbauer edited #1568
  • Jan 31 2019 15:44
    kmuehlbauer opened #1568
  • Jan 31 2019 15:32
    djhoese commented #1566
  • Jan 31 2019 15:30
    djhoese commented #1567
  • Jan 31 2019 14:18
    GuillaumeFavelier commented #1561
  • Jan 31 2019 14:15
    GuillaumeFavelier commented #1561
  • Jan 31 2019 12:46
    opekar synchronize #1130
  • Jan 31 2019 09:54
    kmuehlbauer commented #1567
  • Jan 31 2019 09:53
    kmuehlbauer synchronize #1567
  • Jan 31 2019 09:37
    kmuehlbauer labeled #1567
  • Jan 31 2019 09:37
    kmuehlbauer labeled #1567
  • Jan 31 2019 09:37
    kmuehlbauer labeled #1563
  • Jan 31 2019 09:36
    kmuehlbauer labeled #1563
  • Jan 31 2019 09:28
    kmuehlbauer commented #1567
  • Jan 31 2019 09:27
    kmuehlbauer synchronize #1567
  • Jan 31 2019 09:19
    kmuehlbauer assigned #1563
  • Jan 31 2019 09:17
    kmuehlbauer opened #1567
David Hoese
@djhoese
@p-i- Thanks for the suggestions. There is an issue on github already about updating the gallery for the vispy website with more of the example scripts (something on the todo list for the scipy sprint). The problem or confusion that notebooks cause is that vispy's jupyter widget is experimental and does not currently function very well. I would not want people to think that they should expect everything in vispy to work in a jupyter widget. If the widget backend wasn't used then a separate window is popped up which can just be awkward. Lastly, some of the cool stuff in vispy is done by embedding it into a larger Qt (or other GUI framework) application
Pi
@p-i-
How to plot a large array of rectangles (several thousand), each of a custom color?
And how to plot a large array of points, so that if multiple points land on the same pixel the intensities add?
Pi
@p-i-
vispy/examples/demo/gloo/quiver.py ... mouse coords are off by a factor of 2 on my MacBookPro. Might be a retina-screen thing.
Also two_qt_widgets.py segfaults: RuntimeError: OpenGL got errors (Check before draw): GL_INVALID_VALUE
Pi
@p-i-
vispy/examples/demo/scene/oscilloscope.py gives ModuleNotFoundError: No module named 'OpenGL'
So does scrolling_plots.py
Pi
@p-i-
vispy/examples/demo/gloo/offscreen.py gives RuntimeError: Could not import backend "Glfw":
Everything else seems to work from /examples
Kai Mühlbauer
@kmuehlbauer
@p-i- Thanks for doing these tests. For the last gloo example, you would need to install glwf backend. But sure we should give a more nformative error message.
For the oscilloscope you might need pyopengl installed.
Kai Mühlbauer
@kmuehlbauer
Regarding the rectangles, do you have any constraints? Are they all same size? You might look into collections for that. Not sure, if different colors can be achieved with Markers Visual, so that might be another option.
Pi
@p-i-
@kmuehlbauer Different sizes, different colors. But they will all be horizontally or vertically aligned.
I'm thinking it's maybe not too much work to write shaders.
Each rect is 2 triangles, and it's not too far off from a 'hello world'.
Can I pass vertex-array as a np.array?
Pi
@p-i-
hm maybe SegmentCollection is good for the rectangles.
Kai Mühlbauer
@kmuehlbauer
Yes, it should be no separate Visuals but a collection. Each visual is treated as separate GL program and this affects performance if there are hundreds or thousands of them. A collection circumvent this by using only one program to draw all items. You might skim through the vispy issues. There have been discussions recently (this and last year I think).
Pi
@p-i-
How come most of the examples work but a couple errror with 'ModuleNotFoundError: No module named 'OpenGL''?
David Hoese
@djhoese
@p-i- You probably need pyopengl which I think is listed as an optional dependency of vispy
Pi
@p-i-
Yes, but all the examples are using GL, right?
Why do a small number of them require OpenGL? What are the others using?
David Hoese
@djhoese
pyopengl != OpenGL (the technology)
pyopengl is a library and some parts of vispy use it. Other parts, most parts, use a custom linking to your systems GL libraries
@p-i- ^
Pi
@p-i-
Is there any documentation for plotting?
Other than looking at the examples / drilling into the source code...
David Hoese
@djhoese
@p-i- No. Sorry. Examples are vispy's main way of describing things at the moment
the plotting interface as a whole is very limited and unfinished. It was put together by the original vispy developers as a proof of concept but needs a lot of work
BaiSource
@BaiSource
image.png
BaiSource
@BaiSource
I want use python program switch to graphics card?How to switch ?
image.png
BaiSource
@BaiSource
I do not use this way,Because I package my PyQt program to exe, GL version is not NVIDIA .
Pi
@p-i-
I reverted to doing it with matplotlib for the time being (as I have a deadline):
https://stackoverflow.com/questions/68404385/dynamically-redraw-second-axis-subfigure-upon-click-event-in-first-in-matplotlib
I would be interested to know how much work it involves to achieve this with vispy.
If anyone's interested to take it on as a contract, do message me.
@djhoese I like the pattern of 'doc-thru-code'.
I kinda wish all doc was centered around this.
It cuts out using English as an intermediate language.
David Hoese
@djhoese
@BaiSource Keep reading the documentation below that section. There is a Windows section and Linux section that describe switchable graphics for those platforms. The easiest solution is to configure your sysyem to use the nvidia gpu for everything. This isn't a vispy thing, it is up to your system to tell vispy what it should use.
David Hoese
@djhoese
@p-i- I'm not really sure what you expected, but coming to a volunteer open source project on a deadline is rarely going to go well. And I'm not sure if you're criticizing our documentation or saying you like the examples. I've already said we have limited time and that we're working on the documentation so repeating that our docs aren't up to your standards isn't accomplishing anything except making me feel bad. If you have improvements in mind and they aren't already in github issues please make some. Even better, submit a pull request to improve what you can.
Glad you got something working though.
Bakkiaraj Murugesan
@bakkiaraj

is there a way to use Qt QML backend? Qt QML uses QML Item , Its also possible to get the QML to create framebuffer, I am very new to OpenGL , used Pyvista , Pyqtgraphs with Qt widgets, I am looking for options to move to QML (preferably with Qt6). Looks like pyvista with QML is complicated as the way VTK works, Vispy seems much promising with both 2d charts (line charts) and 3d charts (surface mesh).

Some more details are https://stackoverflow.com/questions/68517058/can-not-get-pyvista-render-to-work-with-qt-qml-qquickframebufferobject , I am willing to contribute but could not get where to start.

David Hoese
@djhoese
@bakkiaraj I've commented on your issue here: vispy/vispy#2157
Bakkiaraj Murugesan
@bakkiaraj
Thanks @djhoese, I will continue conversation in the vispy/vispy#2157 .
Eric Younkin
@ericgyounkin
Is there an ambient_light_color attribute for a MarkersVisual, similar to what is discussed here? https://stackoverflow.com/questions/39112197/add-ambient-light-to-vispy-scene
My MarkersVisual appears to be lighted from a direction I can't figure out how to control, I'm just trying to figure out ambient lighting for my Visual.
image.png
David Hoese
@djhoese

@ericgyounkin If you are using VisPy 0.7+ then you should look at adding the ShadingFilter to your MeshVisual: https://vispy.org/api/vispy.visuals.filters.mesh.html#vispy.visuals.filters.mesh.ShadingFilter

You can access the default instance of this through the MeshVisual.shading property or you can create your own filter and attach it after you create the MeshVisual.

You can see examples of this in this example: https://vispy.org/gallery/scene/mesh_shading.html

Eric Younkin
@ericgyounkin
@djhoese thanks for the suggestion, I am using a MarkersVisual similar to https://vispy.org/gallery/scene/point_cloud.html
I do see an attach() method, which can be used to attach a filter? So maybe that is the approach?
David Hoese
@djhoese
Oh! Sorry @ericgyounkin I didn't realize you were using a MarkersVisual. That is going to be more difficult. I don't know too much about the Markers implementation, but I think knowing what symbol you are using would be a good start. Maybe we can come up with some kind of hack for you. That said, I'm not super optimistic as the MarkersVisual seems rather limited as far as customizing the actual look of the individual marker points
Eric Younkin
@ericgyounkin
I use the following lines
scatter = scene.visuals.Markers(parent=self.view.scene)
scatter.set_data(self.displayed_points, edge_color=clrs, face_color=clrs, symbol='o', size=3)
I see that the ShadingFilter appears to let you align the light source with the camera direction. Maybe that is the right approach? And then attach() the Filter to the Visual?
If I rotate the camera to the sweet spot, the lighting is perfect.
image.png
David Hoese
@djhoese
@ericgyounkin Is the above screenshot with or without the filter? If not, I'm not sure the filter will work for any non-mesh visuals (like the Markers). The reason I asked about the symbol you're using is that doing what you want may require editing the OpenGL shader on the markers. I'm actually surprised there is any idea of lighting in the markers though. I wonder if this is just a side effect of depth testing or the edge color of the markers.
another thing you could try after making your Markers is to do scatter.antialias = False and see if that fixes what you're seeing
Eric Younkin
@ericgyounkin
@djhoese the above screenshot is without the filter, I just moved the camera around until it lit up.
image.png