How to make FragmentHighlighter to highlight an element with pure highlighter's color in openbim-components (IFCjs) + THREE.js

36 Views Asked by At

I using openbim-components (IFCjs) library alongside with THREE.js and face a problem that a tool for highlighting in openbim-components library (FragmentHighlighter) just adds a new mesh (with a material for highlighting - in my case it is a gray color) to the scene. Meaning that the old mesh is still there. Apparently, this collision creates an effect of overlapping: both meshes are in the same place, but their materials are different. So the materials are mixing. If elements are white highlighting work as it must But if elements' meshes are not white the highlighting overlaps and mixes I need to achieve a highlight color (pure gray as at the first image) to be when elements are not gray (as at the second image). Thanks in advance!

I attempted to set:

material.polygonOffset = true
material.polygonOffsetFactor = 1
material.polygonOffsetUnits = 1

to the first mesh's material, but it didn't work Any attempts to adjust depthTest (true for the highlighter's matertial and false for the element's one) failed, too

0

There are 0 best solutions below