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

Transparency "glass effect" is broken #522

Open
ghost opened this issue Dec 3, 2019 · 5 comments
Open

Transparency "glass effect" is broken #522

ghost opened this issue Dec 3, 2019 · 5 comments

Comments

@ghost
Copy link

ghost commented Dec 3, 2019

System information

  • SolveSpace version: 3.0~690f87c
  • Operating system: Debian 9.x stretch (x86_64)

Expected behavior

Opaque solids should be shown throw half-transparent solid as throw "glass".

Actual behavior

Mesh faces of opaque solids inverted under half-transparent solid

pic.1

In same time another half-transparent solid, placed under half-transparent, is fully invisible

pic.2

Additional information

For bugs, please attach a savefile that shows the problematic behavior.
You can attach .slvs files by archiving them into a .zip first.

@whitequark
Copy link
Contributor

This has been discussed several years ago and there is no simple way to support high-quality transparency (you have to carefully sort solids before rendering them). Fixing this will require redesigning the entire rendering pipeline, which is an amount of effort inordinate with the usefulness of the transparency feature. Therefore this will not be fixed.

@Evil-Spirit
Copy link
Collaborator

Evil-Spirit commented Dec 7, 2019

We can make reordering of triangles with opacity materials to be in the last place inside triangle list of the mesh. Also, we can switch off zwrite for opacity objects and probaby switch off backface culling for them.

@whitequark
Copy link
Contributor

If I had known when introducing it that transparent meshes were so complicated I would not have done it in the first place. (I understood very little about graphics programming at the time.) I certainly have never intended for this feature to eventually require a major rearrangement of the rendering code...

@ghost
Copy link
Author

ghost commented Dec 8, 2019

As I know, @leozide already did a lot of work in LeoCAD for correct render mesh in same situation.

pic.1

@ghost ghost changed the title "Glass effect" is broken Transparency "glass effect" is broken Mar 29, 2021
@ruevs ruevs reopened this Mar 29, 2021
@ruevs
Copy link
Member

ruevs commented Mar 29, 2021

Reopening because of #977

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants