tylermorganwall / raymolecule

Parse and Render 3D Molecular Structures in R
http://www.raymolecule.com/
40 stars 6 forks source link

error with new version for toon shading #4

Closed DrOliJones closed 1 year ago

DrOliJones commented 1 year ago

Dear Dr Morgan-Wall,

I am sorry to bother you. I am just having a bit of trouble with the latest version or raymolecule. With the latest version the example Raymolecule code at https://github.com/tylermorganwall/raymolecule for using using the cel-shading and the toon shading no longer seem to work. They used to but now if I run for example,

shiny_toon_material = material_list(type="toon_phong", toon_levels=, toon_outline_width=0.1) get_example_molecule("morphine") |> read_sdf() |> generate_full_scene(pathtrace=FALSE, material_vertex = shiny_toon_material) |> render_model(width=800,height=800,background="grey66")

It gives an error "-Error in apply(single_obj$vertices, 2, range) : dim(X) must have a positive length

Basically anything on https://github.com/tylermorganwall/raymolecule with a black background still works but the ones with a grey background don’t - unless I use the old version of Rayshader on my laptop.

I have tried to work it out but I’m stuck.

Many thanks

Oliver

tylermorganwall commented 1 year ago

Should work now, just needed to update the package to match developments in the rayvertex package.