Board index FlightGear Development Aircraft

Fuzzy OSGtext

Questions and discussion about creating aircraft. Flight dynamics, 3d models, cockpits, systems, animation, textures.

Fuzzy OSGtext

Postby Octal450 » Sun May 14, 2017 5:16 pm

Anyone know why this happens?

http://prntscr.com/f7r395

It happens on some text only, if I move around, the fuzzyness goes to a different part of it.

Doesn't happen here: http://prntscr.com/f7r3l7

Code: Select all
   <text>
      <name>engtype</name>
      <offsets>
         <x-m>-0.001</x-m>
         <y-m>-0.043</y-m>
         <z-m>0.0705</z-m>
      </offsets>
      <alignment>left-center</alignment>
      <axis-alignment>yz-plane</axis-alignment>
      <type type="string">text-value</type>
      <format type="string">%s</format>
      <truncate type="bool">false</truncate>
      <font type="string">BoeingCDU-Large.ttf</font>
      <property>/MCDUC/eng</property>
      <draw-text type="bool">true</draw-text>
      <draw-alignment type="bool">false</draw-alignment>
      <draw-boundingbox type="bool">false</draw-boundingbox>
      <character-size>0.0055</character-size>
      <font-resolution>
         <width type="int">32</width>
         <height type="int">32</height>
      </font-resolution>
   </text>
   <!-- Green -->
   <animation>
        <type>material</type>
        <object-name>engtype</object-name>
        <diffuse>
            <red>0.2</red>
            <green>0.4</green>
            <blue>0.2</blue>
        </diffuse>
        <ambient>
            <red>0</red>
            <green>0</green>
            <blue>0</blue>
        </ambient>
        <specular>
            <red>0</red>
            <green>0</green>
            <blue>0</blue>
        </specular>
        <emission>
            <red>0.2</red>
            <green>0.4</green>
            <blue>0.2</blue>
        </emission>
    </animation>
Waste of time. Goodbye forever.
Octal450
 
Posts: 4398
Joined: Tue Oct 06, 2015 12:51 pm

Re: Fuzzy OSGtext

Postby erik » Mon May 15, 2017 7:22 am

My first impression was that one font was line art and the other a bitmap font.
It turns out ttf can in fact contain bitmap data:
https://www.microsoft.com/typography/tt/sbit.htm

But since it seems to be the same font type in both case (the only difference seems that one is bold and one is not) that would render this idea void.

Erik
erik
 
Posts: 1520
Joined: Thu Nov 01, 2007 1:41 pm

Re: Fuzzy OSGtext

Postby nepcia » Mon May 15, 2017 12:17 pm

my guess is that it is because nice-looking, antialiased fonts are rendered with some semi-transparent pixels around them. This may cause underneath objects not being rendered in those places because of depth testing. I think that's why it is necessary to register transparent objects with
Code: Select all
<inherits-from>Effects/model-transparent</inherits-from>
But I don't know if it's possible to add this to <text> object.

I came across this problem on 787-8 where half of the instruments seemed transparent. But when I changed font to default one, it looked ok.
Image
(Runway and taxi lines visible through pixels around Helvetica.txf letters)

Cheers
Marcin
nepcia
 
Posts: 10
Joined: Sat May 13, 2017 5:27 pm

Re: Fuzzy OSGtext

Postby Octal450 » Mon May 15, 2017 1:05 pm

Alright, I'll try.

Thanks,
Josh
Waste of time. Goodbye forever.
Octal450
 
Posts: 4398
Joined: Tue Oct 06, 2015 12:51 pm

Re: Fuzzy OSGtext

Postby Octal450 » Mon May 15, 2017 4:03 pm

Not working. Why does this happen in one place but not in another?
Waste of time. Goodbye forever.
Octal450
 
Posts: 4398
Joined: Tue Oct 06, 2015 12:51 pm

Re: Fuzzy OSGtext

Postby RenanMsV » Mon May 15, 2017 4:37 pm

Here it also happens. Also, when the camera is far away the texts disappear.

no-zoom
Image

A little close
Image

Really close
Image

This happens when I use the zoom of the camera or when I move it closer.
It also happens in the CDU.
www.flightgearbrasil.com.br
www.fgbrazukas.wixsite.com/fgbrazukas
RenanMsV
 
Posts: 134
Joined: Thu Oct 27, 2016 2:02 am
Callsign: BR-RVD

Re: Fuzzy OSGtext

Postby erik » Mon May 15, 2017 4:45 pm

Could this be related to a too low resolution for the Canvas texture and/or enabled/disabled mipmapping?

Erik
erik
 
Posts: 1520
Joined: Thu Nov 01, 2007 1:41 pm

Re: Fuzzy OSGtext

Postby nepcia » Mon May 15, 2017 4:50 pm

I don't know how yours (I don't even know if it's the same problem) but mine depends on player position. So when I move around by changing camera or adjusting view position, different parts of text are affected.
nepcia
 
Posts: 10
Joined: Sat May 13, 2017 5:27 pm

Re: Fuzzy OSGtext

Postby erik » Mon May 15, 2017 4:52 pm

That's why I suspect the texture resolution to which Canvas draws to.

Erik
erik
 
Posts: 1520
Joined: Thu Nov 01, 2007 1:41 pm

Re: Fuzzy OSGtext

Postby Thorsten » Mon May 15, 2017 5:35 pm

If it's canvas, disable mipmapping.
Thorsten
 
Posts: 11068
Joined: Mon Nov 02, 2009 8:33 am

Re: Fuzzy OSGtext

Postby Octal450 » Mon May 15, 2017 6:05 pm

None of this is canvas.

This topic is for the developer side of it. For OSGtext.
Waste of time. Goodbye forever.
Octal450
 
Posts: 4398
Joined: Tue Oct 06, 2015 12:51 pm

Re: Fuzzy OSGtext

Postby xcvb » Mon May 15, 2017 9:20 pm

Maybe texture transparency could be the problem. Did you remove all the alpha channels from the png images?
xcvb
 
Posts: 88
Joined: Sat Mar 14, 2015 2:08 pm
Version: 2018.1.1
OS: Fedora 27

Re: Fuzzy OSGtext

Postby Octal450 » Mon May 15, 2017 9:35 pm

YUP!
I changed to JPG, since I don't know how to remove that, and problem solved! :)

Kind Regards,
Josh
Waste of time. Goodbye forever.
Octal450
 
Posts: 4398
Joined: Tue Oct 06, 2015 12:51 pm

Re: Fuzzy OSGtext

Postby xcvb » Mon May 15, 2017 9:42 pm

Remove transparency from all png's, also from the text. Transparent images always make trouble.
xcvb
 
Posts: 88
Joined: Sat Mar 14, 2015 2:08 pm
Version: 2018.1.1
OS: Fedora 27

Re: Fuzzy OSGtext

Postby Octal450 » Mon May 15, 2017 10:13 pm

I understand. Thanks!
Waste of time. Goodbye forever.
Octal450
 
Posts: 4398
Joined: Tue Oct 06, 2015 12:51 pm

Next

Return to Aircraft

Who is online

Users browsing this forum: Oswald, StuartC and 2 guests