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

After using bproc.loader.load_obj to import the .ply or .obj file, the obj doesn't have the relative funciton #985

Closed
HMCCMH opened this issue Sep 27, 2023 · 2 comments
Labels
question Question, not yet a bug ;)

Comments

@HMCCMH
Copy link

HMCCMH commented Sep 27, 2023

Describe the issue

When I use bproc.loader.load_obj to import the .ply file, the obj doesn't have the function like set_location() or set_local2world_mat.
I try to use the obj.set_loaction([0,0,0.1]), but the object doesn't move along the z-axis.

Minimal code example

import blenderproc as bproc
import numpy as np

def build_pbr_data_BOP(run_time=1,output_dir='/home/cmh/data/BlenderProc/pbr_test/output'):
    bproc.init()

    bolt=bproc.loader.load_obj("model/bolt_z_m_ascii.ply")
    
    bolt.set_shading_mode('auto')
    bolt.hide(True)

    # it didn't work
    bolt.set_location([2,0,1])

    

    # 载入光源
    light=bproc.types.Light()
    light.set_type("SUN")
    light.set_location([0,0,2])
    light.set_energy(1000)


if __name__=='__main__':
    build_pbr_data_BOP(run_time=1)

Files required to run the code

No response

Expected behavior

f6b0c8caa7aec1b02c575109e37e4c60
18eaf8737144d0fc675ccacb8711f216

BlenderProc version

2.6.1

@HMCCMH HMCCMH added the question Question, not yet a bug ;) label Sep 27, 2023
@HMCCMH HMCCMH closed this as completed Sep 27, 2023
@HMCCMH
Copy link
Author

HMCCMH commented Sep 27, 2023

I know the problem that I made

@WHHHHY
Copy link

WHHHHY commented Mar 14, 2024

Hey,I also met this problem,could you tell me How to deal with it?

Best regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Question, not yet a bug ;)
Projects
None yet
Development

No branches or pull requests

2 participants