panmari / stanford-shapenet-renderer

Scripts for batch rendering models using Blender. Tested with models from stanfords shapenet library.
MIT License
495 stars 96 forks source link

Objects appear completely black in image #39

Open kgshai opened 6 months ago

kgshai commented 6 months ago

I have an issue where the albedo and image render as completely black.

I first suspected that this is due either to

  1. the directory of the texture images being incorrect relative to the OBJ files, or
  2. the directory of the texture images being incorrect relative to the rendering script.

I put the shapenet OBJ files in a directory called shapenet/models. I placed the rendering script in the shapenet directory, and ran blender from that directory. I have tried placing the textures directory in the models directory, placing it in theshapenet directory, and copying the JPG texture images directly into the models directory, to no avail.

Upon inspecting, the logs seem to indicate that the materials and images are loaded:

(  0.0000 sec |   0.0000 sec) Importing OBJ 'models/17c318cf53f978d22feb9fdea8e07927.obj'...
  (  0.0002 sec |   0.0002 sec) Parsing OBJ file...
    (  0.0525 sec |   0.0523 sec) Done, loading materials and images...
    (  0.0563 sec |   0.0560 sec) Done, building geometries (verts:13968 faces:4656 materials: 4 smoothgroups:0) ...
    (  0.0781 sec |   0.0778 sec) Done.
  (  0.0782 sec |   0.0781 sec) Finished importing: 'models/17c318cf53f978d22feb9fdea8e07927.obj'
Progress: 100.00%

So I now suspect that this has something to do with the lighting/scene settings instead. I'll place the settings here in case there's anything I'm obviously missing.

Settings Views: 30 (default) Obj: models/17c318cf53f978d22feb9fdea8e07927.obj Output Folder: tmp (note: local, not the OS /tmp) Scale: 0.005 (note: gave good results for the normals) Remove doubles: False Edge Split: True Depth Scale: 1.4 Color Depth: 8 (also tried 16) Format: PNG Resolution: 2000 Engine: BLENDER_EEVEE (also tried CYCLES, got even more degenerate results, entire image was black and normals/depth were empty)

Outputs Albedo: models_r_348_albedo0001 Depth: models_r_348_depth0001 Normal: models_r_348_normal0001 Image: models_r_348

Mike001-wq commented 3 months ago

I meet the problem, too.