bmild / nerf

Code release for NeRF (Neural Radiance Fields)
http://tancik.com/nerf
MIT License
9.57k stars 1.34k forks source link

The color of rendered Blender scenes not correct #169

Closed cwchenwang closed 1 year ago

cwchenwang commented 1 year ago

Hi, I used the provided scripts and .blend files to render my training data, however, the color of output pictures are all purple for all the scenes, like below:

r_0 Does any know what this problem comes from ?

cwchenwang commented 1 year ago

The reason is wrong exr path

Ideefixze commented 1 year ago

Hi @cwchenwang , could you provide more information about solving this issue? I am confused how to fix this

MilkFather commented 9 months ago

@Ideefixze If you are still there, I can elaborate it a bit. This is also for future users with the same problem.

The texture of the world scene references an external .exr file named courtyard.exr. This file is bundled with standard Blender installation but Blender cannot load it because of wrong file path.

Go to "Shading" tab, find a shader node named "courtyard.exr". Relocate and reopen the courtyard.exr file, the scene would now render normally.

image

Yang-Xijie commented 8 months ago

I confirm that some files are missing in the .blend files the authors provided (open using Blender 3.6 on macOS 13.6):

- chair.blend - Path '/Users/yxj/Downloads/Blender Playground/blend_files/1D_Cloth.png' not found - Path '/snap/blender/current/2.82/datafiles/studiolights/world/interior.exr' not found - Path '/projects/inverse_rendering/matt/blender/360_view.py' not found - Path '/projects/inverse_rendering/matt/blender/360_view_test.py' not found - drums.blend - Path '/projects/inverse_rendering/matt/blender/360_view.py' not found - ficus.blend - Path '/snap/blender/current/2.82/datafiles/studiolights/world/interior.exr' not found - Path '/projects/inverse_rendering/matt/blender/360_view.py' not found - Path '/projects/inverse_rendering/matt/blender/360_view_test.py' not found - hotdog.blend - Path '/projects/inverse_rendering/matt/blender/360_view.py' not found - lego.blend - Path '/projects/inverse_rendering/matt/blender/360_view.py' not found - Path '/projects/inverse_rendering/matt/blender/360_view_test.py' not found - materials.blend - Path '/snap/blender/current/2.82/datafiles/studiolights/world/forest.exr' not found - Path '/projects/inverse_rendering/matt/blender/360_view_test.py' not found - Path '/projects/inverse_rendering/matt/blender/360_view.py' not found - mic.blend - Path '/snap/blender/current/2.82/datafiles/studiolights/world/courtyard.exr' not found - Path '/projects/inverse_rendering/matt/blender/360_view.py' not found - Path '/projects/inverse_rendering/matt/blender/360_view_test.py' not found - ship.blend - Path '/Users/yxj/Downloads/Blender Playground/blend_files/cache_ocean' not found - Path '/Users/yxj/Downloads/Blender Playground/blend_files/textures/12_seamless.jpg' not found - Path '/Users/yxj/Downloads/Blender Playground/blend_files/textures/church_wood.png' not found - Path '/Users/yxj/Downloads/Blender Playground/blend_files/textures/dirtmap_RGB.png' not found - Path '/Users/yxj/Downloads/Blender Playground/blend_files/textures/Good Textures_005296.jpg' not found - Path '/Users/yxj/Downloads/Blender Playground/blend_files/textures/Good Textures_005843.jpg' not found - Path '/Users/yxj/Downloads/Blender Playground/blend_files/textures/Grungemaps0010_L.jpg' not found - Path '/Users/yxj/Downloads/Blender Playground/blend_files/textures/gss-paintstrokes_var.png' not found - Path '/Users/yxj/Downloads/Blender Playground/blend_files/textures/hull_AO.png' not found - Path '/Users/yxj/Downloads/Blender Playground/blend_files/textures/openfootagenethdr_ocean_pisa_small.hdr.hdr' not found - Path '/Users/yxj/Downloads/Blender Playground/blend_files/textures/rope_bump.png' not found - Path '/Users/yxj/Downloads/Blender Playground/blend_files/textures/rope_col.png' not found - Path '/snap/blender/current/2.82/datafiles/studiolights/world/sunrise.exr' not found - Path '/Users/yxj/Downloads/Blender Playground/blend_files/textures/tile-metal-rotten-col.png' not found - Path '/Users/yxj/Downloads/Blender Playground/blend_files/textures/wood-saturated-oak-texture_seamless.jpg' not found - Path '/Users/yxj/Downloads/Blender Playground/blend_files/textures/wood-texture.jpg' not found - Path '/Users/yxj/Downloads/Blender Playground/blend_files/textures/WoodRough0105_2_H_seamless.jpg' not found - Path '/projects/inverse_rendering/matt/blender/360_view.py' not found - Path '/projects/inverse_rendering/matt/blender/360_view_test.py' not found - Path '/d/Dropbox/Scripts/batch_dirtmap_13-01-01.py' not found - Path '/c/Users/Greg/Downloads/blender-2.65-r54428-win64/blender-2.65-r54428-win64/2.65/scripts/addons/cycles/ui.py' not found - Path '/Users/yxj/Downloads/Blender Playground/blend_files/fonts/AGaramondPro-BoldItalic.otf' not found
Yang-Xijie commented 8 months ago

Pointed by @MilkFather , some exr files could be found in the Blender installation path (eg. on macOS):

$ cd /Applications/Blender.app/Contents/Resources/3.6/datafiles/studiolights/world
$ tree .
.
├── city.exr
├── courtyard.exr
├── forest.exr
├── interior.exr
├── license.txt
├── night.exr
├── studio.exr
├── sunrise.exr
└── sunset.exr
Yang-Xijie commented 8 months ago

And, missing textures (.png files) could be retrieved from the original 3D models on the website https://www.blendswap.com. As the authors mentioned in NeRF_Data/nerf_synthetic/README.txt:

Attribution:
The renders are from modified blender models located on blendswap.com
chair by 1DInc (CC-0): https://www.blendswap.com/blend/8261
drums by bryanajones (CC-BY): https://www.blendswap.com/blend/13383
ficus by Herberhold (CC-0): https://www.blendswap.com/blend/23125
hotdog by erickfree (CC-0): https://www.blendswap.com/blend/23962
lego by Heinzelnisse (CC-BY-NC): https://www.blendswap.com/blend/11490
materials by elbrujodelatribu (CC-0): https://www.blendswap.com/blend/10120
mic by up3d.de (CC-0): https://www.blendswap.com/blend/23295
ship by gregzaal (CC-BY-SA): https://www.blendswap.com/blend/8167
Ideefixze commented 8 months ago

@MilkFather Thanks a lot!

chenkang455 commented 7 months ago

I have fixed all files except for the ship file, which appears to be missing the texture file.

j-cyoung commented 4 months ago

I collect all the texture files or hdr files. The whole blender files can be downloaded from here: https://drive.google.com/file/d/1NQu8ULQJzcilaiAR8WrNXmvg-lReABjI/view?usp=sharing