View Issue Details

IDProjectCategoryView StatusLast Update
0000196FreeCADBugpublic2010-11-29 17:39
Reporterunauthenticated Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version0.11 
Summary0000196: Enabling transparency on non-primitive object changes the appearance of other objects
DescriptionIf you take a revolved object, and put a cylinder half into it, when giving transparency to the object, the cylinder is rendered with the transparency too, if the camera sees the cube behind the cylinder.

Discovered in version 3696.
TagsNo tags attached.
FreeCAD Information

Activities

unauthenticated

2010-11-07 13:06

viewer   ~0000401

Just a fix on my report, the rendering problem also occurs on objects placed above the transparent object, not only objects placed mid-through it.

2010-11-07 19:45

 

transparency.jpg (Attachment missing)

yorik

2010-11-07 19:46

administrator   ~0000403

For me it transparency looks OK (see attached screenshot). Can you post a screenshot?

unauthenticated

2010-11-07 22:10

viewer   ~0000404

Last edited: 2010-11-07 22:47

In fact, the error appears on small scale. If objects are too distant, the problem does not show up. As well, when the object exceeds a lot the transparent object, it can't easily be seen. But with some precision machinery, you have to have this bug.
Thanks for having tried already!

2010-11-07 22:42

 

transp_off.png (Attachment missing)

2010-11-07 22:43

 

transp_on.png (Attachment missing)

yorik

2010-11-13 18:55

administrator   ~0000412

For me it looks like an opengl clipping artifact (it happens in almost all opengl applications I know). It would be interesting if you could explain precisely what you did to obtain this artifact?

myier

2010-11-13 21:08

reporter   ~0000416

(I'm the reporter)
Maybe this is an OpenGL issue, I don't really know. What I feel, is that there is a computation problem somewhere because it only happens on the rendering of faces of objects that are close from the transparent shape. If I take the cylinder and put the revolved object in the middle, the problem does not clearly appear, like you did in your screenshot. It is an issue only on faces of objects that are close enough from the transparent object, and when the transparent object is behind them I think. It's quite hard to explain, but when you move the camera when objects are close from each other, or do not exceed each other much when they intersect, the transparency of non-transparent objects seems modified, and that, not homogeneously. I mean the object that is close from the transparent object is displayed sometimes with an oval transparency artifact which moves depending on the direction of the camera.
Maybe it happens to me a lot because I work with objects of small sizes too.

yorik

2010-11-13 21:31

administrator   ~0000417

What do you mean by very small size? Can you give me an example so I can try something similar?

myier

2010-11-13 22:07

reporter   ~0000420

If I remember correctly, the improperly-rendered object are closer or smaller than around 2 (FreeCAD units) from the transparent object.
If you really have problems reproducing, I'll try to make a simple sequence that fails for me.

myier

2010-11-21 18:08

reporter   ~0000431

Last edited: 2010-11-21 18:35

I found a very simple example to illustrate the bug:
- create a shpere (radius=2)
- enable transparency on the sphere and color it
- create a cylinder
-> you will see the sphere through the cylinder.

2010-11-21 18:28

 

opengl1.jpg (Attachment missing)

2010-11-21 18:29

 

opengl2.jpg (Attachment missing)

yorik

2010-11-21 18:35

administrator   ~0000432

I couldn't reproduce your bug exactly, but I found other artifacts that might be related. I just uploaded 2 new screenshots, doing the sphere and the cylinder as in your example above. Screenshot opengl1.jpg shows what appears immediately after creating both objects and setting transparency: Everything is normal, from whatever angle and whatever distance you see the objects. Screenshot opengl2.jpg shows what happens when you hover the mouse on the objects, preselecting them, then hovering to another view... The preselection mechanism redraws the preselected object on top of the other objects, and sometimes this happens in wrong order

Would that be related to your bug? Could you try the following?
- See if there is any difference if object 1 is selected, or object 2, or both, or neither
- Try disabling selection & preselection highlight in the preferences and see if there is any difference?

myier

2010-11-21 18:39

reporter   ~0000433

Sorry, I just noticed I has missed something in my example, I edited the previous note while you were posting. The sphere should have had the same radius than the cylinder, in which case the top of the sphere shouldn't be seen at all, but it is (at least on my computer).
To reply to your last question, the bug I report here it not related to the preselection, but I agree that selection and preselection are quite working randomly too.

Jriegel

2010-11-29 17:38

administrator   ~0000443

Hi guys,
its actually not a bug (yea I know, all developer say that) but! ....

OpenGL can not really deal very good with transparency. The shapes get
normally rendered in arbitrary order. Unfortunately to get real transparency
you have to render the farer pieces first and overlay the nearer (transparent)
pieces. Coin does that by sorting bevor rendering. It has some kind tricks to do
that in good performance. But that has its limitation especially in self intersecting situations.

Its not a bug, you just can not do it better without huge performance loss....

Raytracing give the only perfect thing in this cases....

Jriegel

2010-11-29 17:39

administrator   ~0000444

Its a problem but whont fix

Issue History

Date Modified Username Field Change
2010-11-06 22:55 unauthenticated New Issue
2010-11-07 13:06 unauthenticated Note Added: 0000401
2010-11-07 19:45 yorik File Added: transparency.jpg
2010-11-07 19:46 yorik Note Added: 0000403
2010-11-07 22:10 unauthenticated Note Added: 0000404
2010-11-07 22:42 unauthenticated File Added: transp_off.png
2010-11-07 22:43 unauthenticated File Added: transp_on.png
2010-11-07 22:47 unauthenticated Note Edited: 0000404
2010-11-13 18:55 yorik Note Added: 0000412
2010-11-13 19:01 yorik Status new => feedback
2010-11-13 21:08 myier Note Added: 0000416
2010-11-13 21:31 yorik Note Added: 0000417
2010-11-13 22:07 myier Note Added: 0000420
2010-11-21 18:08 myier Note Added: 0000431
2010-11-21 18:28 yorik File Added: opengl1.jpg
2010-11-21 18:29 yorik File Added: opengl2.jpg
2010-11-21 18:35 yorik Note Added: 0000432
2010-11-21 18:35 myier Note Edited: 0000431
2010-11-21 18:39 myier Note Added: 0000433
2010-11-29 17:38 Jriegel Note Added: 0000443
2010-11-29 17:39 Jriegel Note Added: 0000444
2010-11-29 17:39 Jriegel Status feedback => confirmed
2010-11-29 17:39 Jriegel Status confirmed => closed
2010-11-29 17:39 Jriegel Resolution open => fixed