[Interest] [Qt3D] Mirrored textures aspects

Sean Harmer sean.harmer at kdab.com
Mon May 8 19:56:51 CEST 2017



On 08/05/2017 18:39, Oleg Evseev wrote:
> Sean or Paul,
>
> Could you please explain aspects related to mirrored textures
> https://bugreports.qt.io/browse/QTBUG-54881
>
> I didn't understand why when building against qt-5.8 I don't need to
> mirror textures image and SceneLoader load 3d models fine, but in qt-5.9
> (like in qt-5.7 before) I need to mirror them, or they're shown flipped
> for loaded 3d objects. I though working with those issues was done
> before qt-5.8 rc and qt-5.9 shouldn't differ from 5.8 in this aspect.
>
> Thanks in advance!

Hi,

we took the call to stop flipping textures as default behaviour because 
often it is wasted CPU cycles, usually at application startup when 
you're trying to get things on screen as quickly as possible. In 5.9 
though there is now the mirrored property on QTextureLoader that allows 
getting the old behaviour. Of course, if the data is baked, then it's 
better to mirror the textures on disk as a build time or design time 
step. Even better is to use a compressed texture format such as one of 
those supported by dds or similar to avoid the CPU load of decompressing 
jpg/png images.

Iirc the issue form 5.7->5.8 was the obj loader flipping the texture 
coordinates which ended up screwing the normal mapped materials due to a 
change of sign in the calculation of the tangent vectors.

Cheers,

Sean

>
> ---
> With regards, Oleg
>
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
>

-- 
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