Transparency problems - Printable Version
+- AB4D Forum (https://forum.ab4d.com)
+-- Forum: Products Forums (https://forum.ab4d.com/forumdisplay.php?fid=4)
+--- Forum: Ab3d.PowerToys (https://forum.ab4d.com/forumdisplay.php?fid=9)
+--- Thread: Transparency problems (/showthread.php?tid=4179)
Transparency problems - kreativasas - 03-09-2020
i have a problem with transparency in my 3d model.
I try to explain;
I my view i have many object (3dmesh) colored with a diffusematerial.
If i modify alpha on a object to make him transparent i can see through him only some meshes and not all.
It seems it is transparent only for some object and not for all.
RE: Transparency problems - close - 03-09-2020
did you have a look at the samples: Utilities/Transparency Problem
RE: Transparency problems - kreativasas - 03-10-2020
(03-09-2020, 07:11 PM)close Wrote: Hi,
No but i understand the problem. the transparency works only with object loaded before the object with transparency.
Do you know a way to bypass this problem?
RE: Transparency problems - abenedik - 03-11-2020
If you would follow the advice by "close" and would check the "Transparency problem" sample, you would also saw the solution for the problem - you need to sort the objects so that those farther away from the camera are rendered first (have a smaller index in the Children collection).
As written by the comment in the sample, the Ab3d.PowerToys library provides a TransparencySorter class that can help you with objects sorting. There are also 2 additional samples (the next 2 samples) that demonstrate its usage.
The next version of Ab3d.DXEngine will provide 2 alternative ways to render transparent objects with transparent textures: alpha clipping and using alpha-to-coverage. Those two methods will not require to sort objects by camera distance but have disadvantages because some artifacts can be shown. The next version of Ab3d.DXEngine should be published at the end of March 2020 or at the beginning of April 2020.
RE: Transparency problems - kreativasas - 03-12-2020
Ok solved with TransparencySorter.SimpleSort(3dview)
But there is stilla problem.
In my 3dview I have some object visual3d and also some object defined like geometrymodel3d (one of them is the one with transparency)
When i sort the view the transparency of the geometrymodels is ok but with the objects defined as visual3d the error still remains.
Is there a way to manually modify positions in che children collection of the view?