Skip to content

Add X-Ray (Model Transparency) in View Mode - #648

Open
Crosshair97 wants to merge 2 commits into
dgud:masterfrom
Crosshair97:feature/xray-toggle
Open

Crosshair97 wants to merge 2 commits into
dgud:masterfrom
Crosshair97:feature/xray-toggle

Conversation

@Crosshair97

@Crosshair97 Crosshair97 commented Aug 28, 2026 •

Copy link
Copy Markdown

this pull request introduces a togglable "X-Ray Mode" to the View menu. it allows for soft, semi-transparent rendering of the mesh.

changes:

  • added xray toggle to the view menu and initial properties in wings_view.erl.

  • updated render_objects/4 in wings_render.erl to apply gl:blendFunc and gl:blendColor when the xray property is true, bypassing the depth mask for a soft transparency effect.

@dgud

dgud commented Sep 4, 2026

Copy link
Copy Markdown
Owner

To me this looks annoyingly bad without edges drawn and more complex thing then a cube,
should we only support it with edges and in workmode?

depthMask off is a pain to render nicely we have the same problem with transparent materials,
you can only do so much without a ray-tracer or sorting all faces.

But I can see that it is useful sometimes.

Users will want to be able set the color, but nice default color, Preferences/Advanced maybe ?

@Crosshair97

Copy link
Copy Markdown
Author

you have a good point about that.
i never thought about other side effects that it may brings, but i was using 'Art of Illusion' 3d software that has this feature. it helped me so much when i have many objects and dense sides.

i think supporting it only in certain ways like edges would not be bad, as it also simplify it more.

for alpha color, i picked this from 'AoI' program, it is nice one, but users are free to choose from preferences if they want.

maybe also add option that sets alpha level? like [ 25% - 50% - 75% ], i think we are giving wings so much freedom here haha.

thanks for your efforts nonetheless :)

@Micheus

Micheus commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

This option would be useful for modelling with reference. I usually set a transparent material and have to use workmode to see through the object or switch to wireframe only.

To me this looks annoyingly bad without edges drawn and more complex thing then a cube,
should we only support it with edges and in workmode?

@dgud , maybe it could look at the Show Edges option. This way, if some user wants to get the x-ray without edges it could just toggle the edges visibility - good for everyone. 🙂

maybe also add option that sets alpha level? like [ 25% - 50% - 75% ], i think we are giving wings so much freedom here haha

@Crosshair97 I think it can free for user to choose. Just like other parameters in the Preference dialog. You could add an option to set the colour as well.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants