OSGText Issues: Difference between revisions

Jump to navigation Jump to search
m
Line 99: Line 99:
The issue is using a {{tag|material}} animation to set the colour of the text no longer works, because osgText no longer uses the OpenGL materials, and hence ignores the material properties in the StateSet. The only control we have over the colour of the text is the osgText::Text::setColor method - which is what Canvas uses of course.<ref>https://sourceforge.net/p/flightgear/mailman/message/36624316/</ref>
The issue is using a {{tag|material}} animation to set the colour of the text no longer works, because osgText no longer uses the OpenGL materials, and hence ignores the material properties in the StateSet. The only control we have over the colour of the text is the osgText::Text::setColor method - which is what Canvas uses of course.<ref>https://sourceforge.net/p/flightgear/mailman/message/36624316/</ref>


The issue seems many aircraft could be changed to do something simpler (use decal text with no lighting), or use Canvas, but masking a fully generic replacement for what <text> used to do is quite difficult - for correctness it should use the full lighting model / ALS / etc so that painted text on a panel / tail / etc is lit correctly.
The issue seems many aircraft could be changed to do something simpler (use decal text with no lighting), or use Canvas, but masking a fully generic replacement for what {{tag|text}} used to do is quite difficult - for correctness it should use the full lighting model / ALS / etc so that painted text on a panel / tail / etc is lit correctly.


That’s completely doable but means hooking an effect into the <text> element, which is certainly some work to get correct, since the shader also needs to interact correctly with the osgText source texture (containing the glyphs and offsets)<ref>https://sourceforge.net/p/flightgear/mailman/message/36740020/</ref>
That’s completely doable but means hooking an effect into the <text> element, which is certainly some work to get correct, since the shader also needs to interact correctly with the osgText source texture (containing the glyphs and offsets)<ref>https://sourceforge.net/p/flightgear/mailman/message/36740020/</ref>

Navigation menu