tylermorganwall / rayrender

A pathtracer for R. Build and render complex scenes and 3D data visualizations directly from R
http://www.rayrender.net
622 stars 42 forks source link

Regression in rendering textured meshes imported from Wavefront OBJ files #51

Closed trevorld closed 1 month ago

trevorld commented 1 month ago

I'm observing a regression in rendering textured meshes imported from Wavefront OBJ files in recent versions of {rayrender} including the recent CRAN release and the development version. Here is a minimal, reproducible example:

# create Wavefront OBJ file with texture
library("piecepackr")
envir <- game_systems("sans3d")
cfg <- game_systems("sans3d")$piecepack
f <- save_piece_obj(piece_side = "tile_back", x = 0, y = 0, suit = 3, rank = 3, cfg = cfg)

# import/render Wavefront OBJ file in {rayrender}
library("rayrender")
tile <- obj_model(filename = f$obj, load_material = TRUE, load_textures = TRUE)
render_scene(tile)
Error: Loading of '/tmp/rtmpwxldz4/filece36e26388664.png' failed due to error: can't fopen-- nx/ny/channels :0/0/0
trevorld commented 1 month ago

git bisect suggests that https://github.com/tylermorganwall/rayrender/commit/55fa9b8d7951f5827af77064cb7a6021905dce05 was the first commit our example stopped working (although I can't get that commit to compile on my laptop---more recent commits though do compile on my laptop and provide the above Error: Loading of '/tmp/rtmpwxldz4/filece36e26388664.png' failed due to error: can't fopen-- nx/ny/channels :0/0/0).

tylermorganwall commented 1 month ago

I've confirmed this is fixed in 44ecc436dba538f00b2730b121b1828b3922f30e, which has been submitted to CRAN.

trevorld commented 1 month ago

Thanks! Awesome that you were able to submit a fix to CRAN before they went on vacation.

tylermorganwall commented 1 month ago

The submission successfully went through, so you should be able to respond to BDR that the issue is upstream and has been addressed.