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

Option to make selected objects not appear floating in front of others #100

Open
xeolabs opened this issue Feb 3, 2022 · 5 comments
Open

Comments

@xeolabs
Copy link
Member

xeolabs commented Feb 3, 2022

Feedback from user:

We would like to have Selection Tool work like Colorize Objects. The main difference is that we do not want the Selected Entity to be visible behind other solid materials (walls etc...).

unnamed

Possible options:

  1. have a BIMViewer configuration that switches the Selection tool between using the "selected" rendering effect and the "colorized" rendering effect
  2. have an EmphasisMaterial property that indicates whether we want selected objects to "glow through" other objects (current behaviour, where selected objects are post-rendered over the top of normal objects), or to just to have a different color

Notes:

(1) would allow us to have different colors on selected objects
(2) restricts us to the same color for all selected objects
(2) is likely cleaner than (1) architecturally, because xeokit's "colorized" was not intended for visualizing selected objects and may break user expectations (and require hacks)

@Amoki
Copy link

Amoki commented Feb 3, 2022

This is what I meant with xeokit/xeokit-sdk#493, but it's way better explained here

@xeolabs
Copy link
Member Author

xeolabs commented Feb 21, 2022

Solution

xeokit-bim-viewer

xeokit-sdk

Caveat

To make this work within the renderer, we need to make selected objects always appear opaque when selectedGlowThrough is false. Even transparent windows will appear opaque, as shown in the screenshot below.

This is a necessary hack at this point, because of the way renderer is currently architected. It will take a slightly deeper change to be able to preserve the original transparency of each selected object. However, perhaps the opacity is desirable?

Screenshot from 2022-02-21 16-24-44

@Amoki
Copy link

Amoki commented Feb 21, 2022

Is it possible to define different behavior for over and select?

@xeolabs
Copy link
Member Author

xeolabs commented Feb 21, 2022

@Amoki at the xeokit-sdk level it's supported for highlight and select, so could also be made to work for mouse-over as well.

Examples of selection and highlighting objects on mouse hover:

https://xeokit.github.io/xeokit-sdk/examples/#picking_canvas_mesh_highlight_glowThroughFalse
https://xeokit.github.io/xeokit-sdk/examples/#picking_canvas_mesh_selection_glowThroughFalse

@xeolabs
Copy link
Member Author

xeolabs commented Feb 21, 2022

Another possibility: Add Colorize tool #107

@xeolabs xeolabs changed the title Option to make selected objects not appear floating in front of others? Option to make selected objects not appear floating in front of others Feb 21, 2022
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

No branches or pull requests

2 participants