peteanderson80 / Matterport3DSimulator

AI Research Platform for Reinforcement Learning from Real Panoramic Images.
Other
504 stars 130 forks source link

Rendered image all red #21

Closed chihyaoma closed 6 years ago

chihyaoma commented 6 years ago

Hi,

I am running your python demo as instructed.

python src/driver/driver.py

But the rendered image is pretty weird. It's all red as below (no error reported). I have tested on Ubuntu 14.04 and MacOS 10.13. Both have the same result. Can you please provide some hints in solving this issue? Did I miss something?

image

peteanderson80 commented 6 years ago

@chihyaoma, did you find a solution? The blue numbers are just illustrating neighboring viewpoint locations. I don't have any specific advice about why it isn't rendering. If you solved the problem, might be worth posting here for the benefit of others. thanks!

chihyaoma commented 6 years ago

The problem is solved, but I don't yet know the actual reason.

The whole story is that I wanted to make the compile works for both Linux and MacOS. Apparently, using PVM in include and src/lib causes compile error for macOS:

../Matterport3DSimulator/include/MatterSim.hpp:224:15: error: 
      expected member name or ';' after declaration specifiers
        GLint PVM;
        ~~~~~ ^
/usr/include/sys/param.h:120:13: note: expanded from macro 'PVM'
#define PVM     4
                ^
1 error generated.
make[2]: *** [CMakeFiles/tests.dir/src/test/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/tests.dir/all] Error 2
make: *** [all] Error 2

I thus replace all PVM in include and src/lib to a dummy name PVMM, but I commented the original lines. For example in include/MatterSim.hpp:

// GLint PVM;
GLint PVMM;

The same goes for MatterSim.cpp and vertex.sh in src/lib.

After this process, the compilation will complete without any error, but the rendered images are all red. The problem is due to the commented lines in vertex.sh

# uniform mat4 PVM;
uniform mat4 PVMM;

# ...

# gl_Position = PVM * vec4(vertex, 1.0);
gl_Position = PVMM * vec4(vertex, 1.0);

If I removed the commented lines, everything works fine. While I do not know the exact reason why, it seems that changing the naming of PVM to something else works universally for both Ubuntu and MacOS.

owen94 commented 6 years ago

@chihyaoma I face the similar problem when I am compiling it. And my rendering is totally black if I didnot remove the commented line in vertex.sh.

Thank you for you helpful solution.

Do you already find out why this happen?

mcimpoi commented 5 years ago

I got all blue images (e.g. when running in ipython notebook). I don't understand why -- but changing the running directory ( %cd Matterport3DSimulator/ ) seems to fix the problem.

Hope this helps.

achichichi commented 4 years ago

Hello @mcimpoi : When I running scr/driver/driver.py in jupyter notebook, I got a valueerror about "MatterSim: Could not open navigation graph file: ./connectivity/2t7WUuJeko7_connectivity.json, is scan id valid?". I don't know how to solve this problem. Did you got the problem when running in ipython notebook? Thank you so much.

Wangnaijia commented 3 years ago

@achichichi Hi, I met the same question when running the other script. Have you solved this problem?