[Bf-committers] Texture fonts in blender
jesterking at letwory.net
Tue Nov 25 13:02:33 CET 2008
2008/11/25 Ton Roosendaal <ton at blender.org>:
> Interesting converation... but you mix up two things. Although our font
> code is a mess, the error you describe (text disappearing) is clearly a
> gfx card/driver related issue.
> If you would use a real workstation, with quality hardware, it would
> all go very good. BTW: ATI here in OSX works fine, Nvidias Ubuntu too.
> And very fast.
To add to this, all my machines feature ATi cards too and they run
Vista. Blender runs very smoothly on all of them, even on my low-end
laptop, so I agree that this is driver issue. Blender also draws
properly on the Matrox card I have (albeit somewhat slow, but that's
again driver issue - there were improvements with newer driver, but
they still haven't got it properly).
The fact that you mention behaviour happens only with certain drivers
only more so points to the issue.
> On 25 Nov, 2008, at 0:27, James wrote:
>> Hi Ivan,
>> On Sun, Nov 23, 2008 at 5:26 PM, Ivan Gagis <igagis at gmail.com> wrote:
>>> I recently started doing the same thing, because when I run blender
>>> on my
>>> Dell Inspiron 1501 laptop its interface works terribly slow.
>> Firstly, I agree; Blender's texture based text rendering is rubbish,
>> slow and ugly!
>> I haven't looked at this for a while; I've just started university so
>> I'm pretty busy at the moment, but from what I remember;
>>> But if I do the following actions then the fonts start behave badly:
>>> Press middle mouse button in 3d view window and start rotating the
>>> by moving the mouse, do this for 1 minute.
>>> text labels on buttons and in other places start disappearing.
>>> labels may blink sometimes when you do some unrelated actions e.g.
>>> camera with middle mouse button.
>> I think that what is most likely to be happening in your case is that
>> this causes part of the screen to be redrawn many times, but the area
>> with the text in is not re-drawn since nothing changes here, so
>> textures used for the text stay the same for a long time.
>> I think that this is causing those textures to be erroneously freed,
>> causing the text to disappear.
>> I don't really know why this would happen, but it might be the texture
>> garbage collector? You could try turning this off, and see if it
>>> I installed blender 2.46 from Ubuntu repository and I see the same
>>> there when I switch on the International fonts and "Use texture font"
>>> is on. So, looks like there is some problem in blender (possibly a
>> a bug, impossible! ;)
>>> which maybe changes OpenGL state at some point of time and that state
>>> incompatible with texture font rendering.
>> This could be the cause, but in this case the bug would be dependant
>> on the order things were drawn in the interface, so I don't see why it
>> would only happen after a lot of doing the same thing, rather than as
>> soon as you start to drag the view around.
>>> So, just want to ask you if you observed the same problem with your
>>> implementation and if so, have you coped with it?
>> I do have a similar problem (although I am, myself, freeing textures
>> that are still being used because I have no way of knowing that they
>> are still in use, see (5) below); I don't really have any 'the right
>> thing' ways to fix this problem (if it is the problem I think it is).
>> The only way to squash it would be to force a re-draw of the whole
>> interface just before running any texture garbage collection, and to
>> have the text-drawing library report which textures were used during
>> that re-draw, and so should not be freed. In my opinion this would be
>> pretty ugly.
>>> And why had not your Tex font implementation been integrated into
>>> Was it refused?
>> And my implementation hasn't been accepted because:
>> 1) I've never submitted it. ;)
>> 2) Its a pretty significant re-write of what is, essentially, a
>> no-longer maintained, external library used by Blender. (FTGL)
>> 3) People still seemed worried by patent issues related to
>> anti-aliasing and hinting of text, and these features were what I was
>> most interested in.
>> 4) My code, whilst functional (at least the last time I tried it on OS
>> X, a few months ago) is still unfinished and a little buggy, with one
>> really irritating bug that I can't squash. (Currently, I'm rather
>> suspecting of some of the metrics in bffont.ttf...)
>> 5) I'm worried that there is an insurmountable obstacle of being
>> unable to track when texture IDs that I allocate are no longer in use,
>> so I can't reliably know when to free texture memory (similar to the
>> problem referred to above) This can lead (albeit in rather unusual
>> circumstances) to texture memory being eventually exhausted, something
>> which has disastrous consequences (for OS X, at least).
>> I hope I don't sound too pessimistic; anyway, I've cc-ed this to the
>> development mailing list, because someone there can probably correct
>> anything that I've got horribly wrong.
>> Bf-committers mailing list
>> Bf-committers at blender.org
> Bf-committers mailing list
> Bf-committers at blender.org
More information about the Bf-committers