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

Double (mirrored) ephemeris lines in perspective/orthographic projections #811

Closed
Atque opened this issue Oct 22, 2019 · 5 comments
Closed
Assignees
Labels
bug Something likely wrong in the code importance: medium A bit annoying, minor miscalculation, but no crash state: confirmed A developer can reproduce the issue
Milestone

Comments

@Atque
Copy link
Contributor

Atque commented Oct 22, 2019

Expected Behaviour

Ephemeris lines display as normal, even when using perspective and orthographic projections.

Actual Behaviour

Lines show up in doubles, or "mirrored". That is, a mirrored version of the line is displayed in the opposite direction of the real line. It's not attached to the sky and floats around when panning. See this screenshot:

stellarium-240

The mirrored line (note that it has neither markers nor lables) is located between Jupiter and Venus. This screenshot uses perspective projection, and the same result is seen when using orthographic projection. The rest of them are fine.

Steps to reproduce

  1. Show an ephemeris of a planet/asteroid/comet of choice.
  2. Show lines.
  3. Look in the opposite direction of the true ephemeris line.

System

  • Stellarium version: stellarium-0.19.2.17267-win64.exe (latest public beta)
  • Operating system: Windows 10 64-bit
  • Graphics Card: GeForce GTX 1070, latest drivers
@alex-w alex-w added bug Something likely wrong in the code state: confirmed A developer can reproduce the issue importance: medium A bit annoying, minor miscalculation, but no crash labels Oct 22, 2019
@alex-w
Copy link
Member

alex-w commented Oct 22, 2019

Same problem for planetary trails!

guillaumechereau added a commit that referenced this issue Oct 23, 2019
This is an attempt to fix the bug #811.  Line clipping cannot be done
using only two dimension coordinates, because of cases where one point
is in front of us, and the other one is behind us.

In fact we should actually be using 4 dimensions to properly handle all
the clipping cases, but this is not supported by the projection class.

Not tested much.
@guillaumechereau
Copy link
Contributor

I just pushed a fix attempt in a branch: fix-ephemeris-lines-perspective.

alex-w added a commit that referenced this issue Oct 23, 2019
This is an attempt to fix the bug #811.  Line clipping cannot be done
using only two dimension coordinates, because of cases where one point
is in front of us, and the other one is behind us.

In fact we should actually be using 4 dimensions to properly handle all
the clipping cases, but this is not supported by the projection class.

Not tested much.
@alex-w
Copy link
Member

alex-w commented Oct 23, 2019

I've tested it and apparently it solve the bug, because I don't see rendering issue now.

@alex-w alex-w closed this as completed Oct 23, 2019
@alex-w alex-w added this to the 0.19.3 milestone Oct 23, 2019
@alex-w alex-w reopened this Oct 23, 2019
@alex-w alex-w added the state: in progress The problem is in process of solution... label Oct 24, 2019
@alex-w
Copy link
Member

alex-w commented Oct 24, 2019

Oops... drawing in orthographic projection still have problem

@guillaumechereau
Copy link
Contributor

I push a fix for the orthographic projection. This is not a perfect solution: it might still shows some errors at the border, but I think it should be enough for the moment.

guillaumechereau added a commit that referenced this issue Dec 18, 2019
This should fix bug #811.  The problem is that with the ortho projection
the points that are 'behind' the sphere should be hidden using culling,
but at the moment we don't really support that.  Here I add a clipping
test at the projection, even though this is not optimal (two clipped
points could still be linked by a partially visible line).

Hopefully this is enough to fix the bug.  I only activate this with the
ortho projection.
@alex-w alex-w removed the state: in progress The problem is in process of solution... label Dec 18, 2019
@alex-w alex-w closed this as completed Dec 18, 2019
gzotti pushed a commit that referenced this issue Dec 23, 2019
This is an attempt to fix the bug #811.  Line clipping cannot be done
using only two dimension coordinates, because of cases where one point
is in front of us, and the other one is behind us.

In fact we should actually be using 4 dimensions to properly handle all
the clipping cases, but this is not supported by the projection class.

Not tested much.
gzotti pushed a commit that referenced this issue Dec 23, 2019
This should fix bug #811.  The problem is that with the ortho projection
the points that are 'behind' the sphere should be hidden using culling,
but at the moment we don't really support that.  Here I add a clipping
test at the projection, even though this is not optimal (two clipped
points could still be linked by a partially visible line).

Hopefully this is enough to fix the bug.  I only activate this with the
ortho projection.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something likely wrong in the code importance: medium A bit annoying, minor miscalculation, but no crash state: confirmed A developer can reproduce the issue
Development

No branches or pull requests

3 participants