0

Billboard rendering problem

Anonymous 10 years ago 0
This discussion was imported from CodePlex

jdek wrote at 2013-08-08 16:30:

Hello,
The Billboard is working well, but sometimes it has additional dashes at its bottom and right sides. Here is how the Billboard looks for me :



Behold my code used to initialized the Billboard :
new BillboardTextVisual3D { Text = "1800", Position = new Point3D(0, 0, 0) };
May be this is due to antialiasing...
If somebody has a solution...

objo wrote at 2013-08-08 16:42:

Could some padding/margin around the text work? I think I added a property to control this.

jdek wrote at 2013-08-08 16:55:

Good idea thank you, but no, "dashes" are translated but still visible.
But I found a workaround :
Set this property on the HelixViewport3D :
RenderOptions.BitmapScalingMode="Fant"
"HighQuality" is working too. May be it is a lack of precision of my graphic card because this doesn't appear if I switch from one to another (laptop with Nvidia Optimus).

objo wrote at 2013-08-08 17:03:

thanks for the workaround. I hadn't seen the Fant mode before :)

3dfx_IceFire wrote at 2014-02-28 08:32:

I am having a similar problem with my source code. If I am creating my billboard text items by creating several BillboardTextVisual3D it looks nicely. However due to performance issues I would prefer to use BillboardTextGroupVisual3D with a list of BillboardTextItem but then I get the same rendering issues as mentioned by jdek above.
See the following picture as an example:


I fould out that this happens only if the background is not set to transparent.
See my cource code:

variant 1

         labelTextGroup = new BillboardTextGroupVisual3D()
         {
            Background = Brushes.White,
            Items = null
         };
[...]
var labelTextItems = new List<BillboardTextItem>();
labelTextItems.Add(new BillboardTextItem()
{
   Text = current.ToString(),
   Position = (Point3D)((double)i * Direction + (FontSize * 0.07) * DesciptionOrientation),
   VerticalAlignment = VerticalAlignment.Center,
   HorizontalAlignment = HorizontalAlignment.Center
 });
labelTextGroup.Items = labelTextItems;

variant 2

            BillboardTextVisual3D label = new BillboardTextVisual3D()
            {
               Text = current.ToString(),
               FontFamily = new FontFamily("Courier New"),
               FontSize = this.fontSize,
               Background = new SolidColorBrush(Color.FromRgb(255, 255, 255)),
               Position = (Point3D)((double)i * Direction + (FontSize * 0.07) * DesciptionOrientation),
            };
Besides that I cannot find a BitmapScalingMode property in the HelixViewport3D. Was there a change in the HelixViewport3D class?