# XRay / DoNotXRay — isolated nodes look faded / washed out (especially after camera zoom)

**URL:** <https://forum.techsoft3d.com/t/xray-donotxray-isolated-nodes-look-faded-washed-out-especially-after-camera-zoom/5210>\
**Category:** HOOPS Visualize Web\
**Tags:** code, webviewer\
**Created:** [September 4, 2026, 7:38pm UTC](https://forum.techsoft3d.com/t/xray-donotxray-isolated-nodes-look-faded-washed-out-especially-after-camera-zoom/5210 "2026-09-04T19:38:48Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![raja.r](https://avatars.discourse-cdn.com/v4/letter/r/a3d4f5/32.png) [@raja.r](https://forum.techsoft3d.com/u/raja.r)\
**Post date:** [September 4, 2026, 7:38pm UTC](https://forum.techsoft3d.com/t/xray-donotxray-isolated-nodes-look-faded-washed-out-especially-after-camera-zoom/5210/1 "2026-09-04T19:38:48Z")

</div>

**Question**

We’re using DrawMode.XRay as a “glass” isolation mode. Background geometry should be very transparent; isolated nodes should stay fully solid via `InstanceModifier.DoNotXRay`.

After applying the sequence below, isolated nodes sometimes still look faded / low-opacity. It can get worse after camera zoom / `setCamera`. Does this API order look correct? Is there a known issue with `DoNotXRay` not sticking through draw-mode / camera updates?

**Core sequence**

```auto
// 1) Enable XRay (glass background)

await viewer.view.setXRayOpacity(0.05, Communicator.ElementType.Faces);

// optionally also for lines:

// await viewer.view.setXRayOpacity(0.05, Communicator.ElementType.Lines);

await viewer.view.setXRayTransparencyMode(

Communicator.TransparencyMode.Unsorted

);

await viewer.view.setDrawMode(Communicator.DrawMode.XRay);

await viewer.view.setLineVisibility(false);

// 2) Isolated nodes: selectable + exempt from XRay

const root = viewer.model.getAbsoluteRootNode();

await viewer.model.setInstanceModifier(

Communicator.InstanceModifier.DoNotSelect,

[root],

true

);

await viewer.model.setInstanceModifier(

Communicator.InstanceModifier.DoNotSelect,

slicedNodeIds,

false

);

await viewer.model.setInstanceModifier(

Communicator.InstanceModifier.DoNotXRay,

slicedNodeIds,

true

);

// 3) Keep isolated nodes visible

await viewer.model.setNodesVisibility(slicedNodeIds, true);

// NOTE: this appears to have no effect while in XRay mode:

// await viewer.model.setNodesOpacity(slicedNodeIds, 1.0);

```

**What we observe**

1. Background XRay opacity works (`0.05`, also tried `0`).
2. `setNodesOpacity(slicedNodeIds, 1.0)` does **not** restore solid look in XRay.
3. We rely on `DoNotXRay` for solid isolated nodes.
4. Isolated nodes can still look washed out; sometimes worse after zoom / camera updates.
5. Suspect either:
  - `DoNotXRay` needs to be re-applied after `setDrawMode(XRay)` / idle / camera change, or
  - something else overrides the solid appearance for those nodes.

**Questions for HOOPS**

1. Is this the recommended order for XRay isolation with solid selected nodes?
2. Should `DoNotXRay` be applied **before** or **after** `setDrawMode(XRay)`?
3. Does camera/`setCamera` invalidate `DoNotXRay` (need re-apply)?
4. Is `setNodesOpacity` expected to be ignored in XRay mode?
5. Any difference between package/body/mesh node IDs for `DoNotXRay` — do child mesh nodes also need the modifier?

**Environment**

- HOOPS Communicator: `2025.6.1`
- Browser: `Chrome`
- Model: BIM / IFC-style spaces + assets

* * *

Before any interaction in Xray mode.

 ![Before interaction](https://us1.discourse-cdn.com/flex020/uploads/techsoft3d/original/2X/0/025fad6f0f6271496034310dab7e55ae7e944092.png)

After any interaction in Xray mode.

 ![After Interaction](https://us1.discourse-cdn.com/flex020/uploads/techsoft3d/original/2X/f/f6fbe890265d1935900bc9957d63495a3e68e15c.jpeg)

---

<div class="post-metadata">

**Author:** ![tino](https://avatars.discourse-cdn.com/v4/letter/t/9dc877/32.png) [@tino](https://forum.techsoft3d.com/u/tino)\
**Post date:** [September 7, 2026, 5:16pm UTC](https://forum.techsoft3d.com/t/xray-donotxray-isolated-nodes-look-faded-washed-out-especially-after-camera-zoom/5210/2 "2026-09-07T17:16:18Z")

</div>

Hello @raja.r,

Using your code with only slight modifications to fit the model I’m testing, I’m not able to reproduce the issue of inconsistent transparency rendering:

 ![image](https://us1.discourse-cdn.com/flex020/uploads/techsoft3d/original/2X/4/4e0a86d62a05601ca59b112b042f6e26c0c2a299.jpeg)

I would expect this call:

```auto
await viewer.model.setInstanceModifier(Communicator.InstanceModifier.DoNotXRay,slicedNodeIds,true);

```

…to make the node completely opaque (no transparency). Yet in your screenshots, it looks like the blue nodes have some transparency set. Can you confirm if this is the case? Also, it would be helpful if you can send the Stream Cache file in question so that we can take a deeper look.

If the Stream Cache file is too big as an attachment to a post or if you prefer to keep it confidential, please create a support ticket via our [Support Portal](https://partner.support.techsoft3d.com/servicedesk/customer/portal/12).

Thanks,  
Tino

---

<div class="post-metadata">

**Author:** ![raja.r](https://avatars.discourse-cdn.com/v4/letter/r/a3d4f5/32.png) [@raja.r](https://forum.techsoft3d.com/u/raja.r)\
**Post date:** [September 16, 2026, 6:36pm UTC](https://forum.techsoft3d.com/t/xray-donotxray-isolated-nodes-look-faded-washed-out-especially-after-camera-zoom/5210/3 "2026-09-16T18:36:58Z")

</div>

Hi @tino Our model contains space nodes with authored opacity `0.29`.

In XRay mode, we want to:

1. Override these specific nodes to opacity `0.5` or 0.7.
2. Preserve their original face color.
3. Show selected spaces in the normal selection color while retaining opacity `0.5`.

`setNodesOpacity` and `setNodesMaterial({ opacity: 0.5 })` appear to multiply the authored opacity rather than replace it.

We currently use `setXRayMaterial` with `XRayGroup.Selected`, but it applies one shared material to every highlighted node, preventing individual selected spaces from showing a different color.

Is there a supported API to override authored opacity for specific nodes—rather than multiply it—while preserving normal selection highlighting in XRay mode?

---

<div class="post-metadata">

**Author:** ![tino](https://avatars.discourse-cdn.com/v4/letter/t/9dc877/32.png) [@tino](https://forum.techsoft3d.com/u/tino)\
**Post date:** [September 21, 2026, 12:17am UTC](https://forum.techsoft3d.com/t/xray-donotxray-isolated-nodes-look-faded-washed-out-especially-after-camera-zoom/5210/4 "2026-09-21T00:17:02Z")

</div>

Hello @raja.r,

Are you able to set the opacity for a given material of a node by doing something like this:

```auto
let nodeId = 34; //change to your node id
let mat = await hwv.model.getNodesMaterial([nodeId]);
await hwv.model.setNodesMaterial([nodeId], { ...mat[0], ["opacity"]: 0.7 });

```

Thanks,  
Tino

---

<div class="post-metadata">

**Author:** ![raja.r](https://avatars.discourse-cdn.com/v4/letter/r/a3d4f5/32.png) [@raja.r](https://forum.techsoft3d.com/u/raja.r)\
**Post date:** [September 21, 2026, 12:10pm UTC](https://forum.techsoft3d.com/t/xray-donotxray-isolated-nodes-look-faded-washed-out-especially-after-camera-zoom/5210/5 "2026-09-21T12:10:48Z")

</div>

![Screenshot 2026-09-21 at 5.38.02 PM](https://us1.discourse-cdn.com/flex020/uploads/techsoft3d/original/2X/e/e5fe7e22e030e3c0b1b4c2beddfc54e71b42d7f9.jpeg)

 ![image](https://us1.discourse-cdn.com/flex020/uploads/techsoft3d/original/2X/1/11c69b3c23ee6f427db820c445c82a56d45ca1d1.jpeg)

Now it is increased but when i blend wth xray it is kind of diluted.

---

<div class="post-metadata">

**Author:** ![tino](https://avatars.discourse-cdn.com/v4/letter/t/9dc877/32.png) [@tino](https://forum.techsoft3d.com/u/tino)\
**Post date:** [September 21, 2026, 12:20pm UTC](https://forum.techsoft3d.com/t/xray-donotxray-isolated-nodes-look-faded-washed-out-especially-after-camera-zoom/5210/6 "2026-09-21T12:20:27Z")

</div>

Unfortunately, we don’t have a similar model to try different settings on our end. In light of that, can you send us the Stream Cache file?

The file may be too big to send or attach in the forum. So it would be preferable if you create a ticket on our [Support Portal](https://partner.support.techsoft3d.com/servicedesk/customer/portal/12).

---

<div class="post-metadata">

**Author:** ![raja.r](https://avatars.discourse-cdn.com/v4/letter/r/a3d4f5/32.png) [@raja.r](https://forum.techsoft3d.com/u/raja.r)\
**Post date:** [September 22, 2026, 8:50am UTC](https://forum.techsoft3d.com/t/xray-donotxray-isolated-nodes-look-faded-washed-out-especially-after-camera-zoom/5210/7 "2026-09-22T08:50:01Z")

</div>

[Jira Service Management](https://partner.support.techsoft3d.com/servicedesk/customer/portal/12/SDHC-20581?created=true) created ticket here

---

<div class="post-metadata">

**Author:** ![raja.r](https://avatars.discourse-cdn.com/v4/letter/r/a3d4f5/32.png) [@raja.r](https://forum.techsoft3d.com/u/raja.r)\
**Post date:** [September 25, 2026, 12:46pm UTC](https://forum.techsoft3d.com/t/xray-donotxray-isolated-nodes-look-faded-washed-out-especially-after-camera-zoom/5210/8 "2026-09-25T12:46:44Z")

</div>

Sorry forgot to mention the xray opacity is 0.05
