-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue displaying 3D plots in rgl/lidR on MacOS #423
Comments
I normally install XQuartz from xquartz.org, and haven't had problems lately. I'm using a newer version of MacOS, Sonoma 14.5. If you're getting the error message you described on startup, then I think what it says is true: list.files(system.file("libs", package="rgl") ) Both directories should contain It's possible that the message shows up if |
Thanks for the input! I tried 2 things this morning. I reinstalled XQuartz from the website (didn't resolve the issue) and then also removed rgl and reinstalled. When I install the binary (1.2.8) I am able to get it to work! When I try installing from source (1.3.1), it cannot connect to OpenGL. It appears there is something about rgl 1.3.1 that my computer doesn't like. When I tried installing 1.3.1 from source, I there were a couple of warnings: subscene.cpp:994:7: warning: variable 'index' set but not used [-Wunused-but-set-variable] ld: warning: -single_module is obsolete |
Thanks. The warning about The warning about missing the lib is something that's harder to deal with. I haven't been building |
Update. I had to update my R to version 4.4.0 (and R studio 2024.04.2+764). Now that I've gone to this version, 1.3.1 seems to work just fine. Plotting pointclouds on the most recent version of lidR does as well. Looks like it's a combo of 1.3.1 and R version 4.1.1 that might have been the issue (unsure as to the why). |
I have been looking at building rgl from source on my Mac M3, and have discovered the following. These are more notes to myself, rather than final clear advice at this point:
|
@ColinPSweeney : If you do a local build with R 4.4.0, are things working now? If not, could you look at the |
@dmurdoch Is a local build different from downloading from source? After upgrading to R Studio (2024.04.2+764) and R (4.4.0: using [R-4.4.0-x86_64.pkg] for older macs), I was able to download rgl 1.3.1 from source and got it to work. I neglected to make note of what version of R studio I was using previously but I think my R was version 4.1.1 I tried to look for the fonfig.log file at this filepath: "/Library/Frameworks/R.framework/Versions/4.4-x86_64/Resources/library/rgl" but didn't see it. Happy to try and look for it in another directory/if there is a different method for doing a local build! |
I think you'll only get I think you probably installed a binary build from CRAN; those are fine. With the older R version there are no binaries available, so you probably would have downloaded the |
Gotcha! Yeah it appears as if I stumbled upon the right combination of software versions that were not compatible. As you said in your previous comments, it might be down to a filepath issue (which might have been fixed with the updated R Studio). Interesting that rgl 1.2.8 worked from binary though... |
I am having an issue displaying LiDAR pointclouds using lidR/rgl since updating my MacOS operating system to macOS Sonoma 14.3.1 and lidR package to version 4.1.1. I am currently using rgl version 1.3.1
Previously I was able to plot pointclouds in a previous version of lidR using XQuartz. When I try lidR::plot(las), I don't get any errors or plots.
lidR uses the rgl package to create it's 3D plots. When I tried library(rgl), I get the following error:
"This build of rgl does not include OpenGL functions. Use rglwidget() to display results, e.g. via options(rgl.printRglwidget = TRUE)."
I am able to get some 3D plots to work using:
options(rgl.printRglwidget = TRUE)
AND
with(iris, plot3d(Sepal.Length, Sepal.Width, Petal.Length, type="s", col=as.numeric(Species)))
However, this does not fix lidR::plot(las). When I try las plots, not pop up appears.
My guess is that somehow XQuartz is not talking to the rgl package properly. I tried reinstalling XQuartz with homebrew and am currently using version 2.8.5. Not sure if this is an rgl or XQuartz issue, but I thought I would try here first. Any thoughts are appreciated! (Cross posted on stackoverflow here: https://stackoverflow.com/questions/78614609/error-in-displaying-3d-plots-in-rgl-lidr-on-macos)
The text was updated successfully, but these errors were encountered: