02-20-2019, 04:19 PM
(This post was last modified: 02-21-2019, 01:04 PM by tim.rutter.)
hi, I have had an issue for some time now regarding png and transparency. I believe I contacted you a long time ago regarding this, apologies for the long time its taken to find a resolution to this.
I have version 8.2.6863.1045 installed (have also tried the most recent build)
I am using a plane onto which I place a png which is this:
CrossHairGreenGreen.png (Size: 8.49 KB / Downloads: 36)
I am using this png to represent a user defined point on the screen. I rotate the png so that it always faces the camera and scale it so that point is always the same size in the view irrespective of the zoom level. This all works very well. The issue I have is that the transparency sorting doesn't always detect the transparent part of the png and displays it as white. It does however sometimes work.
i use the following code to create the transparency sorter:
_transparencySorter = new TransparencySorter(_main3DView.MainViewport, _mainCamera)
{
CameraAngleChange = 5.0,
SortingMode = TransparencySorter.SortingModeTypes.Simple,
ConsiderNonSolidColoredBrushesAsTransparent = true
};
_transparencySorter.Sort();
_transparencySorter.StartSortingOnCameraChanged();
However I get results like the attached image. This only happens when I fade the other models out i.e. set their opacity to less than 1 and then rotate.
The process appears to be: I load the 3D scene and add some points, transparency all works fine, not white backgrounds. I then have a slider control whcih I use to fade the instrument out i.e. set the opacity. Then when I rotate the view the pngs no longer have the transparent parts as transparent. I'm guessing before I slide the slider, nothing is transparent and so different code is called.
How it should look:
How it looks after fade and rotate:
I have version 8.2.6863.1045 installed (have also tried the most recent build)
I am using a plane onto which I place a png which is this:
CrossHairGreenGreen.png (Size: 8.49 KB / Downloads: 36)
I am using this png to represent a user defined point on the screen. I rotate the png so that it always faces the camera and scale it so that point is always the same size in the view irrespective of the zoom level. This all works very well. The issue I have is that the transparency sorting doesn't always detect the transparent part of the png and displays it as white. It does however sometimes work.
i use the following code to create the transparency sorter:
_transparencySorter = new TransparencySorter(_main3DView.MainViewport, _mainCamera)
{
CameraAngleChange = 5.0,
SortingMode = TransparencySorter.SortingModeTypes.Simple,
ConsiderNonSolidColoredBrushesAsTransparent = true
};
_transparencySorter.Sort();
_transparencySorter.StartSortingOnCameraChanged();
However I get results like the attached image. This only happens when I fade the other models out i.e. set their opacity to less than 1 and then rotate.
The process appears to be: I load the 3D scene and add some points, transparency all works fine, not white backgrounds. I then have a slider control whcih I use to fade the instrument out i.e. set the opacity. Then when I rotate the view the pngs no longer have the transparent parts as transparent. I'm guessing before I slide the slider, nothing is transparent and so different code is called.
How it should look:
How it looks after fade and rotate:

