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

There are no objects in the rendered image #40

Open
Mike001-wq opened this issue Sep 1, 2024 · 0 comments
Open

There are no objects in the rendered image #40

Mike001-wq opened this issue Sep 1, 2024 · 0 comments

Comments

@Mike001-wq
Copy link

Mike001-wq commented Sep 1, 2024

I use the following code to render the ShapeNetCore dataset:

import os
import subprocess

base_folder = r"03001627"
output_base_folder = r"03001627_render"
max_count = 10
count = 0

for entry in os.listdir(base_folder):
        id_folder = os.path.join(base_folder, entry)
      
        id = entry
        output_folder = os.path.join(output_base_folder, id)
        model_file = os.path.join(id_folder, "models", "model_normalized.obj")
        
        print(f"Processing folder: {id_folder}")
        print(f"Output folder: {output_folder}")
        print(f"Model file: {model_file}")
        
        if os.path.exists(output_folder):
            continue
        # 确保输出文件夹存在
        os.makedirs(output_folder, exist_ok=True)
        
        command = [
            "blender", "--background", "--python", "render_blender.py",
            "--", "--output_folder", output_folder,
            "--engine", "BLENDER_EEVEE", model_file,
            "--views", "100"
        ]
        
        with open(os.devnull, 'wb') as devnull:
            subprocess.run(command, stdout=devnull, stderr=devnull, check=True)

But I found that only part of it can be rendered successfully, and there was nothing in most of the images. The blender version I use is 2.9.0. I would be very grateful if you can provide any suggestions.

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

1 participant