-
Notifications
You must be signed in to change notification settings - Fork 100
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
New visualisation by reference edits alpha value of referenced VisAttr #1117
Comments
The bug appears to be more complicated than I thought at first. Trying to further understand my problem |
This is far more complex, because VisAttrs are only partially represented in ROOT by TColor. This would leave you with a very difficult mechanism to properly update all dependent objects if |
What I now see is the transparency of seemingly unrelated detector components being set by a different VisAttr. This is dependant on the order the detectors were included in the xml description. |
To me it looks like ROOT inherits the transparency from the parent volume. |
@simonge What should we do with this issue? |
Feel free to close it. I still need to follow up on where the issue is coming from, might be somewhere in ROOT rather than DD4hep. The order/whether detectors are included shouldn't really be able to effect the visualisation of other unrelated detectors. |
The order how subdetectors are included should not affect the visualization. |
I have replicated this with a minimum example with in both the geant4 and ROOTJS geometry visualisation (see attached pictures) In the example xml file linked here, just swapping around the order Tube1 and Tube2 are in the file (or swapping their colours) should demonstrate the effect. Hopefully should just be able to use it out of the box. |
@simonge Thanks a lot for your help! Just for completeness: Do you get the same result with geoDisplay ? |
I discussed with the ROOT guys. To handle the transparency for volumes properly changes in ROOT shall be required. |
This PR root-project/root#13402 should eventually fix the problem. |
That's great thanks. |
Assumed fixed with latest ROOT. Closed due to no reaction. |
Setting the values of a new VisAttr by reference to another by name, then changing some results in the alpha of the original being edited. All other original attributes remain unchanged.
e.g. The alpha of AnlGray is changed to 0.3 by the following line
<vis name="TransparentGray" alpha="0.3" ref="AnlGray" showDaughters="true" visible="true"/>
I believe the problem is in the function
VisAttr::argb
from Objects.cppalpha = o.alpha;
may be better as
alpha = o.alpha();
The text was updated successfully, but these errors were encountered: