3DTopia / OpenLRM

An open-source impl. of Large Reconstruction Models
Apache License 2.0
976 stars 56 forks source link

Matrix multiplication: not supported between 'Matrix' and 'Vector' types #44

Closed lincior closed 6 months ago

lincior commented 6 months ago

Hi, I'm trying to render one objaverse object with the provided blender script (scripts/data/objaverse/blender_script.py), but I'm getting the following error:

python scripts/data/objaverse/blender_script.py -- --object_path=304253851afd493d958fc8e256c189df.glb --output_dir=renderings/ --num_images=32
=================== CYCLES ===================
Data are loaded, start creating Blender stuff
glTF import finished in 0.00s
Failed to render 304253851afd493d958fc8e256c189df.glb
Matrix multiplication: not supported between 'Matrix' and 'Vector' types

The code is breaking here: https://github.com/3DTopia/OpenLRM/blob/da65a2807ed06ff685a1877a0fc3a56996d74872/scripts/data/objaverse/blender_script.py#L188 and I tried printing the type and shape of the two operands, and they seem ok:

<class 'Matrix'> <Matrix 4x4 ( 0.6480, 0.7616, -0.0000, -8.2287)
            (-0.7616, 0.6480, -0.0000, -4.0429)
            (-0.0000, 0.0000,  1.0000, 26.8229)
            ( 0.0000, 0.0000,  0.0000,  1.0000)>
<class 'Vector'> Vector((-12.560022354125977, -2.44964861869812, -26.822948455810547))

My environment is:

The weird thing is that this operation should actually be supported, and in fact using a different script it is working (in the same environment), the script being this one: https://github.com/allenai/objaverse-rendering/blob/970731404ae2dd091bb36150e04c4bd6ff59f0a0/scripts/blender_script.py

lincior commented 6 months ago

Found that this was an environment problem. Run with blender CLI.