DLR-RM / BlenderProc

A procedural Blender pipeline for photorealistic training image generation
GNU General Public License v3.0
2.74k stars 443 forks source link

Import object with different scale across three axis #1145

Open NU-iz-da-fam opened 1 month ago

NU-iz-da-fam commented 1 month ago

Describe the issue

Hi team, Thanks in advance for very powerful tools and sorry if my question is so novice. Now I face a problem of 'set_scale' of different number across three axis. I have a CAD model, then import into scene with specific scale of each axis. And terminal pops up a WARNING obj.blender_obj.scale: <Vector (0.0016, 0.0017, 0.0018)> WARNING: the scale is not the same across all dimensions, writing bop_toolkit annotations with the bop writer will fail!

After a while of debugging, seem like problem is from pyrender. The procedure still works, but maybe the result is not correct, right? And is this phenomena normal? Any suggestion would be high appreciation, thank you much.

Minimal code example

obj = bproc.loader.load_obj()...

scale = [0.0016, 0.0017, 0.0018]
obj.set_scale(scale)

Files required to run the code

No response

Expected behavior

It would be nice if no WARNING anymore. It would be ok also if we can confirm nothing is wrong even WARNING.

BlenderProc version

v2.7.1

cornerfarmer commented 1 month ago

Hey @NU-iz-da-fam,

I think this warning is actually obsolete and stems from an older bop writer implementation. Could you check whether the results are correct even if you are using different scaling factors per axis?

NU-iz-da-fam commented 1 month ago

Hi @cornerfarmer,

When checking RGB images, it's okay. When checking mask and mask_visib, I saw that they reflected correct sizes of scaling factors even WARNING.

Is it enough to confirm the property of dataset?