Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jan 31 2019 12:12
    eyildiz-ugoe edited #197
  • Jan 31 2019 12:09
    eyildiz-ugoe opened #197
  • Jan 30 2019 13:54
    trdavidson starred glumpy/glumpy
  • Jan 29 2019 15:23
    wellkao starred glumpy/glumpy
  • Jan 29 2019 12:22
    ezerchen starred glumpy/glumpy
  • Jan 29 2019 06:11
    fancyoung starred glumpy/glumpy
  • Jan 29 2019 06:08
    maty974 starred glumpy/glumpy
  • Jan 29 2019 05:30
    crackevil starred glumpy/glumpy
  • Jan 29 2019 04:30
    fjdu starred glumpy/glumpy
  • Jan 29 2019 04:22
    Rady starred glumpy/glumpy
  • Jan 29 2019 03:29
    cderong starred glumpy/glumpy
  • Jan 28 2019 12:37
    Felipeasg starred glumpy/glumpy
  • Jan 28 2019 08:16

    rougier on master

    "Open GL" -> "OpenGL" in docs. Merge pull request #196 from se… (compare)

  • Jan 28 2019 08:16
    rougier closed #196
  • Jan 27 2019 18:17
    sebftw opened #196
  • Jan 27 2019 15:22
    King-Of-Knights starred glumpy/glumpy
  • Jan 27 2019 14:43
    inoryy starred glumpy/glumpy
  • Jan 26 2019 08:50
    kashif starred glumpy/glumpy
  • Jan 26 2019 03:11
    mlviz commented #177
  • Jan 26 2019 03:02
    mlviz commented #177
iPsych
@iPsych
However, cannot sure it's applicable to get vertices or faces from Vispy Mesh. Actually my goal is simple, picking vertex by click and get vertex number of vispy 3D mesh, but I understand, that it's not an easy question in programmatic way.
Nicolas P. Rougier
@rougier
The gloo picking example should help. It works by assigning different colors to different objects sucha that when you click on it, we can identify the object by the color under the pointer. For 3d mesh, this requires to assign different colors to each vertices using GL_POINT adn draw the mesh in this mode (if you're interested in vertices and not modes). Best would be to start with a simple triangle and check this techniques works.
iPsych
@iPsych
@rougier Thanks. Actually, I already successfully draw 3D mesh and put colors on it. The problem I facing is when I implement 3d picking example, the 'invisible' vertices located in the opposite site of the mesh are selected randomly, since sometimes, they are more close x,y position after transportation.
prithvidiamond1
@prithvidiamond1
Hello there, can anyone help with this problem of Freetype library not found?
iPsych
@iPsych
@prithvidiamond1 If you are MacOS and already installed it with brew, try below.
export DYLD_FALLBACK_LIBRARY_PATH="/usr/lib"
export DYLD_FALLBACK_LIBRARY_PATH="/usr/local/lib:DYLD_FALLBACK_LIBRARY_PATH"
export PATH="/usr/local/lib:$PATH"
Nicolas P. Rougier
@rougier
@iPsych I see the problem and it might be a bit harder to implement. Do you have depth buffer on ? If they are occluded, they shoudl not be selectable tbut this means you have to draw triangles and not only vertices.
iPsych
@iPsych
@rougier No, sadly, the depth buffer was not helpful. I found glBeginTransformFeedback but not implemented in gloo or glumpy.
iPsych
@iPsych
Like the very first brain figure in your ebook (https://www.labri.fr/perso/nrougier/python-opengl/#preface), I am trying to pick a vertex from relatively complex mesh by clicking rendered vispy scene, and applying transformation to mesh selects the invisible vertex in backside very frequently.
iPsych
@iPsych
@rougier I am digging the https://github.com/julienr/vertex_visibility example. However, is it possible to get the K (intrinsics), (R, C) (extrinsics) matrix from vispy cameras?
Screen Shot 2020-06-02 at 8.00.38 PM.png
jcyc
@jcyc

Hi ,I try to learn glumy and exec each example, find out PolygonCollection with these file tiger.py, lasso.py ,topojson.py, topojson-picking.py will be fail with

Traceback (most recent call last):
File "tiger.py", line 59, in <module>
polygons.append(vertices, color=path.style.fill.rgba)
File "/home/user/anaconda3/lib/python3.7/site-packages/glumpy/graphics/collections/raw_polygon_collection.py", line 83, in append
vertices, indices = triangulate(points)
File "/home/user/anaconda3/lib/python3.7/site-packages/glumpy/graphics/collections/raw_polygoncollection.py", line 21, in triangulate
'segments': segments}, "p")
File "/home/user/anaconda3/lib/python3.7/site-packages/triangle/tri.py", line 73, in triangulate
tri,
= triang(tri, opts)
File "core.pyx", line 247, in triangle.core.triang
File "core.pyx", line 219, in triangle.core.fin
File "core.pyx", line 74, in triangle.core.ii._set
File "core.pyx", line 115, in triangle.core._wrap.check
AssertionError

is anyone have same issue? pls give some help ,thanks :)
Nicolas P. Rougier
@rougier
@jcyc I think you may need to update boith glumpy (from GitHub) and the triangle library
jcyc
@jcyc
@rougier Thanks for your help :)
solve: build new conda env ,each package that glumpy need use conda install, final git glumpy and triangle then install,its work :)
iPsych
@iPsych
@rougier , Hi, do you have any idea how to get intrinsics in below link? https://groups.google.com/forum/#!topic/vispy/ICPiHN4QXUg
Nicolas P. Rougier
@rougier
Not sure what you're referring to (link points to an old thread)
iPsych
@iPsych
@rougier, I am trying to imply this https://github.com/julienr/vertex_visibility/blob/master/main.py to VisPy scenegrapy turntable camera. To do so, I need to get parameters in line 55-75 from camera object.
Following the explanation in the file, it's something like below.
slide_9.jpg
However, what I could get is matrices with different shapes.
view.camera.transform.matrix
[[ 1. 0. 0. 0. ] [ 0. 1. 0. 0. ] [ 0. -0. 1. 0. ] [-474.40224 -308.97636 923.01759 1. ]]
view.camera._projection.matrix
[[ 0.00011 0. 0. 0. ] [ 0. 0.0001 0. 0. ] [ 0. 0. -0. 0. ] [-0. -0. -0. 1. ]]
Nicolas P. Rougier
@rougier
Ok, now I see. I guess you'll to dive into vispy code to find how the camera transform is computed. Generally, I use a MVP (Model , View, Projection) matrix but I'm not sure how Luke implemented it in the end. Maybe you n open an issue on vispy to ask fro some help.
Andrew Chalmers
@chalmersgit
Is this expected behaviour?
print(self.program['u_Texture']) # print out values
self.program['u_Texture'].delete()
print(self.program['u_Texture']) # still prints out values, i would expect something else (e.g., zeros, None type, or better yet that the handle doesn't exist anymore)
Nicolas P. Rougier
@rougier
@chalmersgit The deletion occurs on the GPU, no need to delete the CPU copy.
Andrew Chalmers
@chalmersgit
I guess the issue is that if later on in the application, if I want to load a new texture with different dimensions, it's remembered the old dimensions and won't let me do it.
(new texture with same variable name)
@rougier
Nicolas P. Rougier
@rougier
Ok, can you open an issue on Gtihub with a short example showign the problem?
David Pineda
@pineiden_gitlab
Hi! i found this module, but i think i need understand more how to create vertex and fragment shaders code, whre can i find more books or tutorials about?
Nicolas P. Rougier
@rougier
David Pineda
@pineiden_gitlab
Thanks Nicolás!
Si a beautifull book!
HukamiEstia
@HukamiEstia
Hi, I want to draw multiple 3D boxes with different translation and rotation, to do that I started from the outlined cube example and I am trying to use transforms to specify the translation and rotation, I was able to use the Rotate transform but not the Translate. Also is it possible to combine multiple transform (rotate the box then translate it) ?
here is the main from my vertex shader :
gl_Position = u_projection * u_view * u_model * vec4(<transform(position)>, 1.0);
and here is how I define the transform:
cube["transform"] = Translate(translate=(0,0,0))
which doesn't work, but if I use :
cube["transform"] = Rotate(angle=30)
it works... I must be missing something but I'm still a beginner concerning OpenGL stuffs
HukamiEstia
@HukamiEstia
Ok so it was because of a syntax error in translate.glsl which was corrected 25days ago in commit 580a1e8 but isn't in the pip install yet. Now it's working.
Also, I managed to combine multiple transforms:
vertex = """
attribute vec3 position;
vec4 rotation;
vec4 translation;
void main()
{
rotation = vec4( <rotate(position)>, 1.0);
translation = <translate>;
gl_Position = <transform>;
}
"""
cube["rotate"] = Rotate(angle=30)
cube["translate"] = Translate("rotation", translate=(0.5,0,0))
cube["transform"] = PVMProjection("translation")
HukamiEstia
@HukamiEstia
If there is a better way please let me know
jcyc
@jcyc
Hi,I use ten data csv file(each 3 col*2,000,000 row) with glumpy path or polygons function to drawing ,but I find out path or polygons function append one data array need more 10 secs ,I had trans csv to numpy array before append data, is possible any way to speed up 'append ' process ?ex: make file before then load ? or other ways, pls give me some direction, many thanks.
Lucas Menicucci
@lsmenicucci
Hey guys, could you give me a little help? I'm leaning the basics of OpenGL for making animated quiver plots and I can't understand very well the vertex and fragment shaders of this example https://www.labri.fr/perso/nrougier/python-opengl/#id37. In that example only 4 vertexes can create a bunch of arrows, I can't understand how that's possible. Furthermore, wouldn't be necessary at least 4N floats for drawing N 2D arrows?