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

Some generated voxel seems not right #39

Open
sunshineatnoon opened this issue Jun 25, 2018 · 6 comments
Open

Some generated voxel seems not right #39

sunshineatnoon opened this issue Jun 25, 2018 · 6 comments

Comments

@sunshineatnoon
Copy link

sunshineatnoon commented Jun 25, 2018

Thanks for sharing this awesome work. I am using the camera parameters from pbrs to generate my own training data, however, I found that some voxels look like a plain rather than a voxel, can anyone give me any hints on this ? Left image below is the depth and right image shows the corresponding voxel visualization using show_volume.m

@mgarbade
Copy link

The voxels are stored in the *.bin files. The png files contain the 2D depth maps only

@sunshineatnoon
Copy link
Author

@mgarbade Hi, Thanks for the reply. This is the voxel visualized from the .bin files, I just put the depth map for comparison.

@sunshineatnoon
Copy link
Author

After examining the code, I think I found the problem. This issue only occurs for second floor rooms. Because line 21 in getSceneVoxSUNCG.m (link) manually changes the world y coordinate of voxel origin to height_belowfloor. This does not apply to rooms in second floor, so after commenting this line out, I can get correct voxels. But why do we need this line in the beginning and will deleting this line cause any future trouble? I would be appreciate if anyone can give me some hints on this.

@KnightOfTheMoonlight
Copy link

@sunshineatnoon Hi, did u find a good voxorigin setting? Theoratically, as my understanding, voxel origin could be anywhere, cause this parameter is only for translation of transform. And Translation is not import for a whole scene 3d model rather than object inside a whole scene.

@sunshineatnoon
Copy link
Author

@KnightOfTheMoonlight Hi, what do u mean voxel origin? If u mean the world coordinate of voxel origin, u can find them in the .mat or .bin files. In my case, I can calculate the world coordinates of things I care about, and since I know the world coordinate of the voxel origin ((0,0,0) in the voxel), I can calculate the voxel coordinate of all things under my consideration.

@aluo-x
Copy link

aluo-x commented Feb 6, 2019

Also encountered this issue when porting the code, I believe the min of the bounding box for a room can be used as an origin. This can be found as roomnode["bbox"]["min"] using any json library in python, alternatively it can be found in matlab via roomStruct.bbox.min(2) since the rooms are Y up.

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

4 participants