Makie 3D mesh plot is not as good as before

In the Makie v0.10.0, plotting 3D mesh is not as good as before. Here is minimal working example using Makie v0.10.0,

shell> wget

using Makie, FileIO

shape = load("bumpy-cube.obj")
im1 = mesh(shape,color=:red,shading=true)

However when I use Makie v0.9.6, the result is:

What parameter in Makie v0.10.0 I need to tweak to make nice 3d mesh plot?

That happens, because MeshIO doesn’t calculate normals by default anymore, if they’re missing in the obj, and in Makie, I haven’t calculated the normals explicitely when shading is on.
I pushed a fix to master… Note, that master is not super stable at the moment, but hopefully, we’ll get tests back in shape and can tag a stable version soon!
You’ll need:

]add GLMakie#master AbstractPlotting#master

Btw, if you don’t want to checkout master, you can also do this, with the newest tagged version of GeometryBasics:

mesh(normal_mesh(shape) ,color=:red,shading=true)

You can also tweak the lighting qualities in the latest AbstractPlotting and GLMakie. See the docs for more details.

using Makie, FileIO
meshfile ="")
shape = FileIO.load(FileIO.File{FileIO.format"OBJ"}(meshfile))

# we will manipulate shininess here
shiny_node = Observable(1f0)
im1 = mesh(shape; color = :red, shininess = shiny_node)

# we give the mesh scene a title to see what the shininess is
scene = title(im1, @lift "Shininess\n" * string(round($shiny_node; sigdigits = 4)))

# now record
record(scene, "shininess.mp4", exp.(LinRange(0, 11.5, 300)); framerate = 30) do i
    shiny_node[] = i

Thank you, the GeometryBasics way is better in my case