Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding other 3D model failed #25

Closed
shadowwkl opened this issue Dec 10, 2021 · 5 comments
Closed

Adding other 3D model failed #25

shadowwkl opened this issue Dec 10, 2021 · 5 comments

Comments

@shadowwkl
Copy link

shadowwkl commented Dec 10, 2021

Dear authors,

I try to add some other 3D model (in .obj format) as my objects, but the generated images doesn't contain such an object, even if there is no error when bpycv.load_obj loads it. Here is what I have done:

  1. download the .obj file from the internet, say this one: https://free3d.com/3d-model/carboard-box-with-holders-for-fruit-v2--710406.html
  2. use meshlab to load it and export it as .obj file (suggested by the authors)
  3. use the code to load it.

Could you please help me with it? Thanks!

@DIYer22
Copy link
Owner

DIYer22 commented Dec 10, 2021

Could you load the obj by blender's GUI?

@shadowwkl
Copy link
Author

Could you load the obj by blender's GUI?

Yes, I can "import" the .obj file in blender's GUI. Additionally, I also try to use the default cubic model (export as .obj) of Blender, the code still couldnt generate it in the end.

@shadowwkl
Copy link
Author

shadowwkl commented Dec 10, 2021

Could you load the obj by blender's GUI?

btw, other mesh files from ycb (http://ycb-benchmarks.s3-website-us-east-1.amazonaws.com/) work fine.

@shadowwkl
Copy link
Author

shadowwkl commented Dec 10, 2021

Could you load the obj by blender's GUI?

I find the problem, the size of the 3d model should be comparable with the model in ycb. Previously, those model is too large. I change the size in Blender, then the code works well.

=============================
Not really... the object can be easily put outside of the image...

=============================
I want to generate synthetic image where objects are in an open box/basket and the depth image contains depth information w.r.t. the box. Therefore, I want to load an open box model in it. Apparently, it doesn't work well. I was wondering, if there is a method that can firstly put a box model on the plane, then other objects falling into the box, so that the depth image contains the depth information w.r.t. both object and box?

@DIYer22
Copy link
Owner

DIYer22 commented Dec 11, 2021

bpycv.add_environment_box could create a transparency box with background depth, you may refer to the source code to write you own code.

@DIYer22 DIYer22 closed this as completed Dec 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants