Transparency

Technical discussions
Post Reply
ZiquanShi
Posts: 1
Joined: Mon Jul 29, 2013 12:27 am

Transparency

Post by ZiquanShi »

Hello everybody

It looks like the order of the main objects creation can change the transparency properties to each other.
The green object is first created with no parent, and then the blue objects are created with no parent too. The blue objects in this case are not visible behind the green object because is created afterwards and all objects have no parent. If the blue object is child of green object then the blue object can be seen behind green object.
I don't know if this is a bug or not, but that is not the main problem I am facing.
The problem is that intermediary sections are visible in transparency mode, and I don't see a reason for. (see attached file)

Any ideas?
Thank you
ZiquanShi

nickz
Site Admin
Posts: 236
Joined: Fri Jul 26, 2013 3:58 am

Re: Transparency

Post by nickz »

Hello Ziquan

Unfortunately transparency in KernelCAD, and actually in any CAD software I believe, is rarely useful. The problem is in the implementation of OpenGL graphic library

Rendering of two objects on top of each other on the screen is done via painting image of the object being rendered first and then if transparency is enabled, second object is transparent and is on top of the first its image is blended in into the first one.

When rendering is in reverse order there is nothing behind to blend into, so the picture will be rendered as if there is nothing behind.

So the main thing is to make sure you always render transparent object after the object(s) beneath it. This can be done by changing order of objects in the model, but this has to be done dynamically in response of view manipulations as rotations by 180 degrees swap the object on top. So this would be somewhat cumbersome.

The same thing happens in DirectX because both libraries are geared for performance.

But still in some situations it makes sense, for example when creating a single image for printing or when it is known that the transparent object is always outside (scene inside a transparent sphere)

We also hope to implement dynamic rendering lists depending on transparency. It is some way ahead. Write us to provide a motivation so it will happen sooner.

Regards
Nick

nickz
Site Admin
Posts: 236
Joined: Fri Jul 26, 2013 3:58 am

Re: Transparency

Post by nickz »

Update Dec 10, 2013
We are going to review this functionality in v5.0 planned for the next May (2014). There is a way to do dynamic rearrangement of the objects in v4.* too. Contact us if it is urgent
Nick

nickz
Site Admin
Posts: 236
Joined: Fri Jul 26, 2013 3:58 am

Re: Transparency

Post by nickz »

Starting with v5.0 transparency should work as expected without any limitations. This is one of the benefits on the new rendering engine

Post Reply