Skip to content
This repository has been archived by the owner on Dec 6, 2020. It is now read-only.

[renamed] Depth buffer causes outline to be rendered incorrectly. #33

Open
tntmeijs opened this issue Mar 1, 2019 · 4 comments
Open
Labels
bug Something isn't working postponed

Comments

@tntmeijs
Copy link
Member

tntmeijs commented Mar 1, 2019

Describe the bug
The Maya viewport camera uses a different aspect ratio, fov, etc. than the Wisp camera.

To Reproduce
Steps to reproduce the behavior:

  1. Open Maya.
  2. Add a primitive.
  3. Load Wisp.
  4. Switch to the Wisp renderer.

Expected behavior
The object should match its Maya wireframe outline perfectly.

Screenshots
maya_wisp_camera_size_mismatch

Desktop (please complete the following information):

  • OS: Windows 10 64-bit
  • Maya2019
@tntmeijs tntmeijs added bug Something isn't working good first issue Good for newcomers code change This issue requires code modifications labels Mar 1, 2019
@tntmeijs tntmeijs mentioned this issue Mar 12, 2019
6 tasks
@tntmeijs tntmeijs added being worked on Issue is being worked on by the development team and removed good first issue Good for newcomers code change This issue requires code modifications labels Mar 28, 2019
@MeineZ
Copy link
Collaborator

MeineZ commented Apr 4, 2019

The wireframe is closer to match the correct wireframe, but the fix is a hack right now. It is 'fixed' by multiplying the depth value by 0.5, the closer it gets to a depth value of 0. So, when the depth value is 0.0 it's multiplied by 0.5 and the closer it gets to 1.0 to less the 0.5 factor is applied to it.

float depthScalar = 1.0 - (depth.r * ((1.0 - depth.r) * 0.5));

The Maya viewport next to the 'fixed' Wisp viewport
The Maya viewport next to the 'fixed' Wisp viewport

Zoomed in on tiny errors that are still there
Zoomed in on tiny errors that are still there

Zoomed in on tiny errors that are still there
Zoomed in on tiny errors that are still there

@MeineZ
Copy link
Collaborator

MeineZ commented Apr 4, 2019

The wireframe aligns the models correctly now. The small error is still there, but the outline is correctly surrounding the model now.

See PR #53

Screenshot from Gyazo

@MeineZ MeineZ removed the being worked on Issue is being worked on by the development team label Apr 11, 2019
@MeineZ
Copy link
Collaborator

MeineZ commented Apr 11, 2019

I noticed that this formula actually shouldn't even work, if you think about it.. The current formula results in the following plot.

Screenshot from Gyazo

@sainsay sainsay changed the title Wisp viewport objects do not match the size of the Maya objects in viewport 2.0 [renamed] depth buffer causes outline to be rendered incorrectly. Jun 6, 2019
@sainsay sainsay changed the title [renamed] depth buffer causes outline to be rendered incorrectly. [renamed] Depth buffer causes outline to be rendered incorrectly. Jun 6, 2019
@VZout
Copy link
Contributor

VZout commented Jun 11, 2019

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working postponed
Projects
None yet
Development

No branches or pull requests

4 participants