Skip to content

Render material segmentation maps #527

Answered by themasterlink
chenzhekl asked this question in Q&A
Discussion options

You must be logged in to vote

Hey,

out of the box we do not support this, yet. However, you can just simply split an object by its materials into different parts.

objs = bproc.loader.load_obj("test.obj")
for obj in objs:
    obj.edit_mode()
    bpy.ops.mesh.separate(type='MATERIAL')
    obj.object_mode()
objs = bproc.python.utility.BlenderUtility.get_all_mesh_objects()

I have not tested this code, but this should get you started.

Best,
Max

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@chenzhekl
Comment options

@themasterlink
Comment options

Answer selected by chenzhekl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants