Skip to content
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 error in Darwin Kernel #254

Closed
maniatisn opened this issue Jan 3, 2023 · 3 comments
Closed

render_highquality error in Darwin Kernel #254

maniatisn opened this issue Jan 3, 2023 · 3 comments

Comments

@maniatisn
Copy link

Hello there, I stumbled upon an unusual error that I can't seem to solve when trying to render_highquality().
This is on a Mac M1 (system info below).
I'd be grateful on any help here, thanks!!

Reproducible example

library(rayshader)

small <- resize_matrix(montereybay, .25)

# this shows the map
small %>%
  height_shade() %>%
  plot_3d(heightmap = small)

render_highquality(filename = "test.png")

This prints out:

Error in rayrender::obj_model(cache_filename, x = -bbox_center[1], y = -bbox_center[2], :
unused argument (texture = TRUE)

System info

> Sys.info()
                                                                                               sysname 
                                                                                              "Darwin" 
                                                                                               release 
                                                                                              "22.2.0" 
                                                                                               version 
"Darwin Kernel Version 22.2.0: Fri Nov 11 02:03:51 PST 2022; root:xnu-8792.61.2~4/RELEASE_ARM64_T6000" 
                                                                                              nodename 
                                                                                               machine 
                                                                                               "arm64" 
                                                                                                 login 
                                                                                                "root" 
                                                                                                  user 
                                                                                        effective_user 
@c-ryan7
Copy link

c-ryan7 commented Jan 5, 2023

Also having the same issue! Thank you for posting. I ran into this problem while following this tutorial from Spencer Schien.

I looked into the render_highquality() function itself and I believe the issue arises in the following code:

if (obj_material$type %in% c("diffuse", "oren-nayar")) {
scene = rayrender::obj_model(cache_filename, x = -bbox_center[1],
y = -bbox_center[2], z = -bbox_center[3], texture = TRUE,
material = obj_material)

the issue seems to be that rayrender::obj_model() has been updated so that it no longer takes the texture argument, but when it's called inside render_highquality() here it is given "texture = TRUE" which it doesn't know how to handle

not really sure how to get around this but thanks for posting, hopefully it can get fixed soon!

@canaytore
Copy link

this error no longer appears with the newest versions. you may like to install the latest version of rayshader (==0.32.7) via devtools using devtools::install_github("tylermorganwall/rayshader")

@c-ryan7
Copy link

c-ryan7 commented Jan 5, 2023

Ah thanks! I had to remove the packages before reinstalling from GitHub in order for the new package to work, hadn’t realized that at first. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants