I am updating the test suite in MeshViz.jl to use CairoMakie 0.10. I've noticed that all visualizations that set transparency alpha < 1 are now showing edges of faces incorrectly:

image

Any change that may have introduced a bug?

0

On a related question, is there a method to use GLMakie.jl in GitHub CI? If there is a way to avoid CairoMakie.jl, that is even better.

0

Not sure what changed, but you can use GLMakie in the ci: https://docs.makie.org/dev/documentation/headless/index.html#glmakie_in_ci

0

The transparency option is also broken in the latest version of GLMakie:

image

I am just updating the version of the package in the test suite and rerunning the visual tests. Can you double check the transparency handling in the Makie stack to see if some bug was introduced?

0

Not sure what changed, but you can use GLMakie in the ci: https://docs.makie.org/dev/documentation/headless/index.html#glmakie_in_ci

It points to a yaml file with some lines highlighted, but some of these lines seem specific to the Makie monorepo build:

https://github.com/MakieOrg/Makie.jl/blob/8504b27c28c45a522467c7c57f6953c3a680fa6a/.github/workflows/glmakie.yaml#L45-L57

Which lines should I copy to my yaml to get GLMakie up and running?

0

Replacing any instance where you call the julia executable with

DISPLAY=:0 xvfb-run -s '-screen 0 1024x768x24' julia

will run an instance of Julia in which GLMakie will work regardless of whether your system has a GPU or not.

For this, the following packages need to be installed (the solution only works on Linux):

- run: sudo apt-get update && sudo apt-get install -y xorg-dev mesa-utils xvfb libgl1 freeglut3-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev 
0

The GLMakie result is roughly what I'd expect after #1418, which is a year and a couple of months old. What was transparency = true before that should more or less be transparency = false after that for transparent objects. If it's a solid color you shouldn't get any artifacts. The only regression here is that the two transparency modes don't work with each other, I think.

0

Replacing any instance where you call the julia executable with

DISPLAY=:0 xvfb-run -s '-screen 0 1024x768x24' julia

will run an instance of Julia in which GLMakie will work regardless of whether your system has a GPU or not.

For this, the following packages need to be installed (the solution only works on Linux):

- run: sudo apt-get update && sudo apt-get install -y xorg-dev mesa-utils xvfb libgl1 freeglut3-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libxext-dev 

When I look into the default CI.yaml that I have I see that there are steps being executed to install Julia and a couple of deps:

https://github.com/JuliaGeometry/MeshViz.jl/blob/dcd7c63548577f50be48a517213ec8cc5750e069/.github/workflows/CI.yml#L27-L48

I understand that I should add the - run: step anywhere in this list of steps, but I don't see where exactly the call to Julia is happening. Should I erase some of the more high-level steps there and call the julia executable explicitly with the DISPLAY env variable?

0

The GLMakie result is roughly what I'd expect after #1418, which is a year and a couple of months old. What was transparency = true before that should more or less be transparency = false after that for transparent objects. If it's a solid color you shouldn't get any artifacts. The only regression here is that the two transparency modes don't work with each other, I think.

It means that I should now pass the option transparency = false to all built-in Makie commands to get the correct transparency behavior?

0

https://github.com/julia-actions/julia-runtest/blob/fa1e6fac940a2785c35dddb5fbb98ed945e3d2a2/action.yml#L25-L28

seems like you can pass the option prefix:"DISPLAY=:0 xvfb-run -s '-screen 0 1024x768x24'" to your julia-runtests action, so this

https://github.com/JuliaGeometry/MeshViz.jl/blob/dcd7c63548577f50be48a517213ec8cc5750e069/.github/workflows/CI.yml#L44

becomes something like:

      - uses: julia-actions/[email protected]
      with:
          - prefix: "DISPLAY=:0 xvfb-run -s '-screen 0 1024x768x24'"

or something (I don't 100% remember the syntax, but it'll be something like this).

1

Oh you're saying transparency = true is bad? Now that I look at it again it seems like one of the red squares is occluding one of spheres, which shouldn't be happening with transparency = true. Is that still the case after restarting Julia?

0

In the recipes I don't pass transparency explicitly, I just pass the vector of colors with the appropriate alpha channel. Is there something else that I am missing?

0
```yaml
      - uses: julia-actions/[email protected]
      with:
          - prefix: "DISPLAY=:0 xvfb-run -s '-screen 0 1024x768x24'"

or something (I don't 100% remember the syntax, but it'll be something like this).

Tried it but the action is returning an error:

image

Probably a syntax issue with the first word interpreted as the executable, but I don't know how to fix it.

0

And I just remembered that you have to set the environment variable separately. Near the top of the file you can add:

env:
  DISPLAY: ":0"

and then remove DISPLAY=:0 from the prefix. But at least we know that it works :D

0

I would rather pass it then not. In GLMakie transparency switches between order independent transparency and the old more naive thing. I.e. true should give you the left image (though the sphere shouldn't be occluded) and false the right one. Order independent transparency always has a degree of transparency too it, so if you draw fully opaque objects you want to turn it off.

0

I will test the transparency option locally now, but it seems that it is an internal implementation detail that could be hidden from the end user somehow? If colors are passed with an alpha channel < 1 then the option should be dispatched internally? I am asking as a naive end user of course. It feels strange to provide transparency only sometimes.

0

Yes, passing transparency=true always breaks the other solid visualizations.

0

And I just remembered that you have to set the environment variable separately. Near the top of the file you can add:

env:
  DISPLAY: ":0"

and then remove DISPLAY=:0 from the prefix. But at least we know that it works :D

That worked perfectly ;)

0
© 2022 pullanswer.com - All rights reserved.