Image-Py / myvi

myvi is a simple and light mayavi, m(a)y(a)vi.
BSD 3-Clause "New" or "Revised" License
42 stars 10 forks source link

blending problem #1

Closed szabolcsdombi closed 2 months ago

szabolcsdombi commented 7 years ago

In some computer not looks well when set the blend.

I found this line in the README. I think I could solve this by adding a new feature to ModernGL. The default blending is (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA)

What blending settings you may need?

yxdragon commented 7 years ago

@cprogrammer1994 Thanks, See here, there is a tooth demo in ImagePy's page. It is draw by mayavi, I can't draw like this use moderngl, I think I should set some color mix mode, I have try some, but failed. And In some computer, I even cannot see the inner object through the blend surface.

and on mac, I got a shader error, not support 330 version.

szabolcsdombi commented 7 years ago

And In some computer, I even cannot see the inner object through the blend surface

Sounds like the absence of Transparency Sorting

szabolcsdombi commented 7 years ago

If transparency sorting does not help you, then help me understand what kind of blending do you need.

yxdragon commented 7 years ago

if I put a ball in a transparent cube.

  1. in any computer and system, It looks bad in some specific view. (that should be the transparency sorting)

  2. on win10, 64bit, wx4.0, I cannot see the ball. (even set transparent to 0, the cube hide, and cannot see the ball)

  3. on mac, I got a shader error, not support version 330.

and the sorting work seems must be done on cpu, need I have wrote the sorting algrithsm? and give to the GPU as the right order? If it is hard, it is not nessesary. (vtk and mayavi has the same question)

some question may be wx's bug or system's support, I learn opengl just several days, So I cannot solve them, even donot known why it happends.

szabolcsdombi commented 7 years ago
  1. Can you paste the code here?
  2. Checkout this list is your Mac supporting OpenGL 3.3?
ramcdougal commented 6 years ago

Could the mac issue be as simple as needing to explicitly request the OpenGL Core Profile? This is sometimes necessary; see e.g. https://stackoverflow.com/questions/22926779/cannot-use-glsl-330-on-mac-mavericks and https://stackoverflow.com/questions/19865463/opengl-4-1-under-mavericks?lq=1

I'm not sure how to get ModernGL to do this.

szabolcsdombi commented 6 years ago

ModernGL detects the context created by the window. If a standalone context is requested then a core profile will be created.

QGB commented 3 years ago

mayavi 中文介绍

image