Beakerboy / OSMBuilding

render an individual OSM building
MIT License
43 stars 5 forks source link

Black screen #22

Closed bryceco closed 2 years ago

bryceco commented 2 years ago

I'm not sure how to use this. When I click on the Example links using Safari on Mac or iPhone all I see is a black screen.

Beakerboy commented 2 years ago

I made some changes to the code yesterday and introduced a regression. I need to plug in the laptop so I can see the javascript console. I wish iPhone had the developer tools.

Beakerboy commented 2 years ago

I just fixed a few of the examples

bryceco commented 2 years ago

It looks better now. There is still some weirdness with Petronas clipping. I occasionally see a little bit of a grid representing the ground and I think you should make that always appear.

Beakerboy commented 2 years ago

The grid is always supposed to be there and 110% of the size of the base. Some of the structure have clipping where two overlapping buildings parts have very dissimilar materials. The OSMBuildings.org site had the same issue.

On my iPhone, only the underside of Petronas has issues.

bryceco commented 2 years ago

Looks much better now. The clipping I see (on iPhone) still occurs when I zoom out.

Beakerboy commented 2 years ago

ahh, yes, I think the directional lighting needs to be adjusted. I'm new to both Javascript and three-js. I think when you zoom out, the light angle is too narrow, which causes the object to move into the shadows,

BTW, I love nethack too! I wish iNethack had some sort of SSH plugin to allow it to run tiles from NOA on my iPhone. (not that you are the dev, but may understand my frustration)

Beakerboy commented 2 years ago

All my example renders are working.

bryceco commented 2 years ago

There is still clipping when zooming out. An easy solution would be to limit how for out you can zoom to ensure the building is always visible.

My version of nethack was based on an early version of iNethack from back when Dirk was working on it, so I’m somewhat familiar with the code base. I don’t know how to access tiles on NAO though.

Beakerboy commented 2 years ago

It turns out the camera.far attribute was too small for these large objects. You can now zoom out as far as you want.

bryceco commented 2 years ago

Awesome!