[Interest] [Qt3D] Distance field and texture atlas

Sean Harmer sean.harmer at kdab.com
Thu Apr 21 15:02:36 CEST 2016


Hi,

On Thursday 21 April 2016 14:50:55 Xavier Bigand wrote:
> I know that QtQuick already manage the distance field for text elements,
> but I want to be able to use it with Qt3D too.
> Our Qt3D objects are managed in C++ code not in QML, we prefer to not bind
> those elements in QML because of the memory overhead.

Oh sorry, I didn't realise you were talking about Qt 3D. Qt 3D does not use 
distance fields at all in any out of the box materials at this stage. You will 
need to write a custom Material/Effect to sample from the distance fields. Can 
you elaborate a bit on your particular use case please? Maybe this is 
something we can integrate for Qt 5.8?
 
> Does the backend of QML and Qt3D share the same Rendering backend?

No. The integration point is in the Scene3D item. Other than that Qt 3D is 
distinct from Qt Quick.

Cheers,

Sean

> 
> 2016-04-21 14:34 GMT+02:00 Sean Harmer <sean.harmer at kdab.com>:
> > On Thursday 21 April 2016 12:51:27 Xavier Bigand wrote:
> > > Hi,
> > > 
> > > Is there any plans to let the user control distance field and texture
> > 
> > atlas?
> > 
> > > We are interested by the distance field for text and icons rendering as
> > 
> > we
> > 
> > > apply scale and rotation on some small elements. We have to much
> > > elements
> > > to regenerate textures at the right size from svg or ttf, and doing a
> > 
> > cache
> > 
> > > can consume a lot of memory.
> > 
> > What do you want to control? QML text elements use a distance field glyph
> > cache
> > out of the box (unless you force it to native rendering). I think the
> > vertical
> > size of this is hard wired for now. In theory it could be exposed.
> > 
> > Afaik Image elements don't use a distance field at all, so you would need
> > to
> > write a custom QQuickItem plus material to make use of distance fields
> > here.
> > 
> > > Texture atlas can also a good thing to improve performances, but with
> > > new
> > > API that are coming like vulkan the interest will decrease, so this
> > 
> > feature
> > 
> > > will be interesting only for few years.
> > 
> > That assumes a backend to Qt Quick that uses something which supports
> > bindless
> > textures.
> > 
> > Cheers,
> > 
> > Sean
> > --
> > Dr Sean Harmer | sean.harmer at kdab.com | Managing Director UK
> > KDAB (UK) Ltd, a KDAB Group company
> > Tel. +44 (0)1625 809908; Sweden (HQ) +46-563-540090
> > Mobile: +44 (0)7545 140604
> > KDAB - Qt Experts

-- 
Dr Sean Harmer | sean.harmer at kdab.com | Managing Director UK
KDAB (UK) Ltd, a KDAB Group company
Tel. +44 (0)1625 809908; Sweden (HQ) +46-563-540090
Mobile: +44 (0)7545 140604
KDAB - Qt Experts



More information about the Interest mailing list