Skip to content

Camera can enter object #542

Closed
Closed

Description

@elalish

Description

Really there are two problems here. The first is the near and far plane are set arbitrarily to 0.1 and 10 times the framed height, respectively, which is not enough in all cases. More importantly, zooming the camera moves it physically closer to the center of model, and thus sometimes inside of the model, which can't be fixed by the near plane. I would propose solving this by zooming in by narrowing the FOV and keeping the camera at the ideal radius.

Live Demo

https://maps3d.io/blog/
Just zoom in and you'll soon see something like this:
Screenshot from 2019-05-09 09-03-50

Browser Affected

  • Chrome
  • Edge
  • Firefox
  • Helios
  • IE
  • Safari

OS

  • Android
  • iOS
  • Linux
  • MacOS
  • Windows

Activity

  1. cdata commented on May 9, 2019

    @cdata
    Contributor

    The first is the near and far plane are set arbitrarily to 0.1 and 10 times the framed height, respectively, which is not enough in all cases.

    Just some background: this actually isn't arbitrary. We probably should have left a comment (at the time the assets we were testing could not be mentioned in public). We arrived at these ratios after a lot of empirical observation related to depth precision. We had problematic assets we were testing from NASA and were getting the best results from this range. It might actually be worth us testing the behavior against some of those assets since we are no longer scaling the object as of #526 (I wouldn't be surprised to learn that this has an effect on what we were seeing).

  2. cdata commented on May 9, 2019

    @cdata
    Contributor

    Going to flag this as a bug and related to #232

  3. elalish commented on May 13, 2019

    @elalish
    ContributorAuthor

    Can you point me to the troublesome models? As I start to mess with this, I'd like to make sure they still work.

  4. cdata commented on May 13, 2019

    @cdata
    Contributor

    I will send one to you offline. It's 30MB and can't be attached to this thread unfortunately.

  5. self-assigned this
    on May 21, 2019
  6. pushmatrix commented on Jun 6, 2019

    @pushmatrix
    Contributor

    Hmm we seem to run into this with a few of our models as well. Especially the ones where there are hanging parts not near the center of the object

  7. added
    flag: partner
    on Jun 6, 2019
  8. elalish commented on Jun 7, 2019

    @elalish
    ContributorAuthor

    @cdata I think this is important for 1.0.

  9. added this to the v0.7.0 milestone on Jul 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

arc: interactionarc: rendering & effectsflag: partnertype: bug

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions