Blenderproc: How to construct a customized plane

Created on 16 May 2021  路  5Comments  路  Source: DLR-RM/BlenderProc

Hi,
I am generating a dataset use bop_challenge, could you tell me, how to generate a custom plane (or background), such as a blue box.

thank you

question first answer provided

Most helpful comment

Hi @chrisxu1995,

Checkout the BasicMeshInitializer.py, and an example of its usage of creating a custom box

All 5 comments

Hi @chrisxu1995,

Checkout the BasicMeshInitializer.py, and an example of its usage of creating a custom box

I assume, this closes this issue. If you have a direct follow up you can reopen this issue. For a new question I would ask you to open a new issue :)

Hi @chrisxu1995,

Checkout the BasicMeshInitializer.py, and an example of its usage of creating a custom box

Thanks for the reply, but I still didn鈥檛 find it about the setting of defining the background color or texture. I'll appreciate it very much, If you can provide an example.

Hey,

no worries, we can go more into detail.

In this first part, we create the plane objects and place them around the center:

https://github.com/DLR-RM/BlenderProc/blob/ead97d373e82f80b70cac9f92fa4ff5ccc60295f/examples/bop_object_physics_positioning/config.yaml#L116-L161

We then load the CCMaterials via the CMaterialLoader, see this example, to understand how cctextures work.

https://github.com/DLR-RM/BlenderProc/blob/ead97d373e82f80b70cac9f92fa4ff5ccc60295f/examples/bop_object_physics_positioning/config.yaml#L199-L204

Now we can use those materials we just loaded:

https://github.com/DLR-RM/BlenderProc/blob/ead97d373e82f80b70cac9f92fa4ff5ccc60295f/examples/bop_object_physics_positioning/config.yaml#L205-L226

Here we first select all objects which start with ground_plane:

https://github.com/DLR-RM/BlenderProc/blob/ead97d373e82f80b70cac9f92fa4ff5ccc60295f/examples/bop_object_physics_positioning/config.yaml#L208-L213

And then we randomize the materials:
https://github.com/DLR-RM/BlenderProc/blob/ead97d373e82f80b70cac9f92fa4ff5ccc60295f/examples/bop_object_physics_positioning/config.yaml#L215-L224

If you want to know more about the specific config values, check out the documentation of the EntityManipulator.

I hope this helps.

PS: To better understand BlenderProc it helps to go through the existing examples, they show how to use a lot of the different modules, making it easier to see how certain things work.

Best,
Max

Hey,

no worries, we can go more into detail.

In this first part, we create the plane objects and place them around the center:

https://github.com/DLR-RM/BlenderProc/blob/ead97d373e82f80b70cac9f92fa4ff5ccc60295f/examples/bop_object_physics_positioning/config.yaml#L116-L161

We then load the CCMaterials via the CMaterialLoader, see this example, to understand how cctextures work.

https://github.com/DLR-RM/BlenderProc/blob/ead97d373e82f80b70cac9f92fa4ff5ccc60295f/examples/bop_object_physics_positioning/config.yaml#L199-L204

Now we can use those materials we just loaded:

https://github.com/DLR-RM/BlenderProc/blob/ead97d373e82f80b70cac9f92fa4ff5ccc60295f/examples/bop_object_physics_positioning/config.yaml#L205-L226

Here we first select all objects which start with ground_plane:

https://github.com/DLR-RM/BlenderProc/blob/ead97d373e82f80b70cac9f92fa4ff5ccc60295f/examples/bop_object_physics_positioning/config.yaml#L208-L213

And then we randomize the materials:
https://github.com/DLR-RM/BlenderProc/blob/ead97d373e82f80b70cac9f92fa4ff5ccc60295f/examples/bop_object_physics_positioning/config.yaml#L215-L224

If you want to know more about the specific config values, check out the documentation of the EntityManipulator.

I hope this helps.

PS: To better understand BlenderProc it helps to go through the existing examples, they show how to use a lot of the different modules, making it easier to see how certain things work.

Best,
Max

Thank you, you are so nice.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Xiaflowers picture Xiaflowers  路  3Comments

wangg12 picture wangg12  路  3Comments

soans1994 picture soans1994  路  5Comments

ggaziv picture ggaziv  路  3Comments

Lotfi-MERAD picture Lotfi-MERAD  路  3Comments