# Apply an opacity to the an entire scene

**URL:** <https://forum.techsoft3d.com/t/apply-an-opacity-to-the-an-entire-scene/436>\
**Category:** HOOPS Visualize Web\
**Created:** [August 14, 2021, 2:51am UTC](https://forum.techsoft3d.com/t/apply-an-opacity-to-the-an-entire-scene/436 "2021-08-14T02:51:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jonathan](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.techsoft3d.com/jonathan/32/44_2.png) [@Jonathan](https://forum.techsoft3d.com/u/Jonathan)\
**Post date:** [August 14, 2021, 2:51am UTC](https://forum.techsoft3d.com/t/apply-an-opacity-to-the-an-entire-scene/436/1 "2021-08-14T02:51:41Z")

</div>

Question: Is it possible to apply an opacity setting for the scene’s ambient color?

Answer: Yes, it is possible to set the opacity for an entire scene with our x-ray transparency mode:

[https://docs.techsoft3d.com/communicator/latest/build/api\_ref/typedoc/classes/communicator.view.html#setdrawmode](https://docs.techsoft3d.com/communicator/latest/build/api_ref/typedoc/classes/communicator.view.html#setdrawmode)

[https://docs.techsoft3d.com/communicator/latest/build/api\_ref/typedoc/classes/communicator.view.html#setxrayopacity](https://docs.techsoft3d.com/communicator/latest/build/api_ref/typedoc/classes/communicator.view.html#setxrayopacity)

Here’s the code that you’ll need:

hwv.view.setDrawMode(Communicator.DrawMode.XRay);  
hwv.view.setXRayOpacity(.8);
