Ticket #4206 - Transparency display lost on multicolored object when reloading file

Post here for help on using FreeCAD's graphical user interface (GUI).
Forum rules
and Helpful information
IMPORTANT: Please click here and read this first, before asking for help

Also, be nice to others! Read the FreeCAD code of conduct!
otoien
Posts: 84
Joined: Sun Aug 13, 2017 2:38 am

Ticket #4206 - Transparency display lost on multicolored object when reloading file

Postby otoien » Sun Nov 24, 2019 4:55 am

After saving a file, next time it is reloaded I keep having trouble that display of transparency frequently is lost on more complicated objects but not the transparency parameter. Initially I thought this had to do with objects originally imported from STEP files (where after transparency was set), however I have now been able to isolate a the simple case of an extruded object with multicolored faces where transparency display is lost on file load.

To reproduce (tested with latest development version on Win7, but I have experienced these problems for a long time, also in stable ver. 0.18):

1. Create a simple shape, for instance a rectangle and extrude it. Mark it and apply transparency under the view tab, for instance set it to 80% and observe correct display. Save and close file. Reload it and observe correct display of transparency.

2a. Mark object, right click, Set Colors, mark one of the faces and change color. Keep transparency. Transparency is still corretly displayed. Save file and close it. Reload file. Observe transparency display gone but color is correct, and on inspection the transparency parameter under the view tab is still at 80%.

2b. Close file without saving and reload again (transparency gone). Mark object and change color so that it gets a single color. Transparency is back again. Save file, close and reload. Transparency is now correct.

2c. Close file without saving and reload again (transparency gone). Change transparency (for instance to 81%). Observe correct transparency being displayed again. Save, close and reload. Transparency display is gone again.


Is this a bug, or an inherent "feature"? It would seem that because a simple thing as making a change to the transparency parameter can make it appear again, a routine that would bring back transparency display could be performed on file load?

Could the problems be related to this fairly recent change that can allow per face transparency to be set?
https://forum.freecadweb.org/viewtopic.php?t=16476

The attached files show the results of the different tests above.

OS: Windows 7 SP 1 (6.1)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18760 (Git)
Build type: Release
Branch: master
Hash: ef73ab5f3a330d3c44138f23290f8c9f7a334caf
Python version: 3.6.7
Qt version: 5.12.1
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/United States (en_US)

(For the record I am using a Nivida graphics card)

2a:
Transparency-test001a.FCStd
(5.34 KiB) Downloaded 15 times
2b:
Transparency-test001b.FCStd
(5.34 KiB) Downloaded 15 times
2c:
Transparency-test001c.FCStd
(5.33 KiB) Downloaded 14 times
Last edited by Kunda1 on Tue Nov 26, 2019 10:24 pm, edited 1 time in total.
Reason: Added ticket number to thread title
otoien
Posts: 84
Joined: Sun Aug 13, 2017 2:38 am

Re: Transparency display lost on multicolored object when reloading file

Postby otoien » Tue Nov 26, 2019 3:27 am

A little bump as it got off the screen too fast:
Can anyone reproduce this with the attached files or described procedure?
Should it be reported on the bugtracker?
UR_
Posts: 1197
Joined: Tue Jan 03, 2017 8:42 pm

Re: Transparency display lost on multicolored object when reloading file

Postby UR_ » Tue Nov 26, 2019 5:40 am

Same here


OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.18782 (Git)
Build type: Release
Branch: master
Hash: 84752715e829ed7fec40453a0714513b36d637a9
Python version: 3.7.3
Qt version: 5.12.5
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: German/Germany (de_DE)



OpenGL version is: 4.6 (4.6.0 NVIDIA 441.20)


for 2 faces compound , property tab says:

Screenshot 001.png
Screenshot 001.png (4 KiB) Viewed 619 times

but console prints:

Code: Select all

obj.ViewObject.DiffuseColor
[(0.0, 0.0, 1.0, 0.0), (0.800000011920929, 0.800000011920929, 0.800000011920929, 0.0)]
wmayer
Site Admin
Posts: 16639
Joined: Thu Feb 19, 2009 10:32 am

Re: Transparency display lost on multicolored object when reloading file

Postby wmayer » Tue Nov 26, 2019 6:22 pm

Confirmed! Feel free to open a bug report.

The problem might be that the Transparency property was designed to affect the whole object and the possibility to set transparent color per face was added much later. So, it seems that the order of reading in the properties from the project matters.
otoien
Posts: 84
Joined: Sun Aug 13, 2017 2:38 am

Re: Transparency display lost on multicolored object when reloading file

Postby otoien » Tue Nov 26, 2019 9:57 pm

Thanks, bug report submitted: issue #4206
Last edited by wmayer on Tue Nov 26, 2019 10:25 pm, edited 1 time in total.
Reason: Replace url tags with bug tags
User avatar
sgrogan
Posts: 6163
Joined: Wed Oct 22, 2014 5:02 pm

Re: Transparency display lost on multicolored object when reloading file

Postby sgrogan » Tue Nov 26, 2019 10:23 pm

otoien wrote:
Tue Nov 26, 2019 9:57 pm
Thanks, bug report submitted: https://www.freecadweb.org/tracker/view.php?id=4206
Thanks otoien!
This is a model bug triage/bug report for FreeCAD.
"fight the good fight"
Montoya88
Posts: 37
Joined: Sat Mar 19, 2016 5:06 am

Re: Ticket #4206 - Transparency display lost on multicolored object when reloading file

Postby Montoya88 » Wed Jan 15, 2020 12:04 am

Hi, I'm having transparency issues myself. However when I adjust transparency to anything other than 0 all objects turn to wire frame.
chrisb
Posts: 28913
Joined: Tue Mar 17, 2015 9:14 am

Re: Ticket #4206 - Transparency display lost on multicolored object when reloading file

Postby chrisb » Wed Jan 15, 2020 12:08 am

And your version is ...?
A Sketcher Lecture with in-depth information is available in English, auf deutsch, en français, en español.
Montoya88
Posts: 37
Joined: Sat Mar 19, 2016 5:06 am

Re: Ticket #4206 - Transparency display lost on multicolored object when reloading file

Postby Montoya88 » Wed Jan 15, 2020 12:15 am

OS: Windows 8.1
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.4 (GitTag)
Build type: Release
Branch: releases/FreeCAD-0-18
Hash: 980bf9060e28555fecd9e3462f68ca74007b70f8
Python version: 3.6.6
Qt version: 5.6.2
Coin version: 4.0.0a
OCC version: 7.3.0
Locale: English/UnitedStates (en_US)
Montoya88
Posts: 37
Joined: Sat Mar 19, 2016 5:06 am

Re: Ticket #4206 - Transparency display lost on multicolored object when reloading file

Postby Montoya88 » Wed Jan 15, 2020 12:17 am

Attached is the file that I attempted to use transparency. Mainly the objects named sleeve and sleeve splice
Attachments
Goal Post.FCStd
(135.89 KiB) Downloaded 12 times