-
Notifications
You must be signed in to change notification settings - Fork 214
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
render_highquality will randomly produce colorless results, despite the rgl window 3d object being colored. #308
Comments
I am experiencing the same issue. I run the sample code from this github page And I got the right output and rendered image (just like the tutorial). But when I tried my own data, I get this in the rgl device: but this is my rendered image: I am not sure why. I have only tweaked the code in ways that allow me to improve speed. but my final rendering code is: rayshader::render_highquality( Even when removing the environment_light and using the default, my whole map is green. |
Do you have an example that does not require a special dataset that reproduces this issue? |
Hello Tyler, I have just done a test to try to replicate the issue. Funnily enough, the first render came out good. But I did it with the lowest parameters. I run it s second time, and 3 more times, even with the same lowest settings, and it never came up again. Examples here. and code and files to reproduce below. Fourth run of same initial lower settings
I have tried commenting what I changed or moved to change the settings. Edit: I restarted my computer (today, next day of previous images in this comments) thinking it may be some residual memory issue, but it did not solve it. So, I tried again a 1st rendering with good quality settings, and it came out all "grayish" when the rgl window is coloured correctly (as shown initially). But either way... it does look like some sort of bug. I rendered a second time, without "closing" the rgl window (still showing the good colour pattern) and reduced the rendering parameters (samples to 16 , from 64, and h and w divided by 5) and still came out gray-ish with pixels. next day image second render, lower settings: I have linked the files here, as I didn't know how to attach them. This would be the only two you need to reproduce my output or issue. Elevation raster img (png file to overlay) https://drive.google.com/file/d/1Ivb0uyZYgZZ3Z2e162WsEutSqgYDz2kL/view?usp=drivesdk |
@francisvolh The second file is the TIF again: can you provide the PNG overlay? |
Apologies for that. I just updated the link. Please let me know if it works now! Thanks a lot again! |
most commonly the very first render (ususally low quality) will come out colored, any following attempts to render at high or low quality will be either:
|
Can you output the result of: str(convert_rgl_to_raymesh()) when you have a render that isn't being colored in? And can you see if the file(s) at the location specified in the |
Hello @tylermorganwall Done. The rgl file, was fine, then the rendered file was all dark grey (no colors). I looked for the files in the folder specified by I tried it in 2 different laptops, just in case it was a laptop specific issue. And same result. Also, I updated both laptops with the latest github versions of the pacakges today. Attached is a screenshot of the files in the folder from Surely there is something going on, not sure why this is happening in my system (or the OP's system as well). Thanks Francis |
grey render; result of the requested command:
The file in the abovementioned filepath exists, yes, here it is: Here is the grey render: |
any news:( |
Any updates on this? Edit: see below for possible workaround. |
Edit: After further investigation, this was not the only variable causing this issue, therefore the fix may not 100% work.@TearsRfuel @francisvolh I might have found a temporary fix. I believe this issue may have to do with the sample_method. Try forcing the sample_method to sobol.
@tylermorganwall I have run into this issue on Windows as well (tested on mac, no issues) but I have noticed that regardless of sample size, if you specify the sample_method to sobol, it will correctly render colors. Specifying method as sobol-blue or not specifying will cause colorless renderings. Colors Rendered - sample_method = sobol
No Color Rendered - sample_method = sobol-blue
No Color Rendered - sample_method not specified
sessionInfo()
|
Unfortunately this didn't work, although I have tried changing the sample method and sample size before I made my original post, and it would randomly and rarely produce colored results, but nothing fixed it definitively. |
Can you update to the latest version of rayrender, rayvertex, and rayshader on github and see if this issue is still occurring? |
Hello @tylermorganwall I just did, and I got my same old colorless friend. I have reinstalled all packages because I updated to the new R 4.4 anyway. So all brand new install for rayshader and friends. Image on the left is the current open RGL device. Mid is newly produced png after rendering. Leftmost image is an older version (just to compare, it looks slightly different but at this point I can not confirm there might be a couple of tweaks in the parameters). I went ahead and check the I think this is the file I want now and with good resolution, but no being saved in the working directory! So I guess this is progress!
|
I resolved this issue just deleting all the files inside C:\Users\Username\AppData\Local\Temp\ It's not necessary delete all files but you won't waste your time looking for the exact file(s). This also resolve the majority of the package errors for R windows users. |
Hello ArturLourenco, I have done that before, and nothing changed. Not sure why that keeping the Temp files would cause the issue anyway. Any thoughts?
|
The only solution that I've found (in RStudio) is to "clear objects from the workspace" and "Free unused R memory" and then re-run the code between each run of render_highquality. Obviously this doesn't help if you're calling render_highquality multiple times but at least it's something. |
neither clearing the temp folder nor clearing objects/unused memory fixed the issue for me. |
Any advances on this issue? |
Describe the bug
When rendering with render_highquality, the render result will be black and white (colorless), despite being colored in the rgl window. Very randomly and rarely it will be colored.
The RGL window looks like this:

the render result looks like this:

Session Info
here is what my code looks like:
The text was updated successfully, but these errors were encountered: