OSGText Issues: Difference between revisions

Jump to navigation Jump to search
m
→‎Mapping to Canvas: https://sourceforge.net/p/flightgear/mailman/message/36624574/
m (→‎Background: moving here from LTS page:)
m (→‎Mapping to Canvas: https://sourceforge.net/p/flightgear/mailman/message/36624574/)
Line 39: Line 39:
== Ideas ==
== Ideas ==
=== Mapping to Canvas ===
=== Mapping to Canvas ===
For some purposes (pre-canvas HUDs or displays) text animations would have to be emissive, likewise for panel backlighting.
For other purposes - basically panel legends etc. they would be ambient/diffuse.
Since osgText animations also don't play nice with our whole effect framework, might there a way to internally map the animation to an equivalent canvas solution? We might be better off in a number of ways with that.<ref>https://sourceforge.net/p/flightgear/mailman/message/36624574/</ref>
Of course, emissive for panel legends would be totally wrong.
The problem is supporting emissive would be doable as a few-lines tweak and quite safe. Supporting ambient/diffuse will require the same solution as ‘making the text work with effects’, i.e a custom text shader I thin, and I don’t know if we could do that (or integrate it with the effects framework)
As for mapping to Canvas, James also is not sure how that would work - Canvas Text is also ‘just osgText’ but it seems works for Canvas because the output texture is applied to the cockpit and then effects are applied on top? Doing a safe transformation of osgText-animation to Canvas would mean working out the required canvas extent and somehow mapping it to the correct panel location (and UVs), which he’d be nervous about both the reliability and complexity of.
As for mapping to Canvas, James also is not sure how that would work - Canvas Text is also ‘just osgText’ but it seems works for Canvas because the output texture is applied to the cockpit and then effects are applied on top? Doing a safe transformation of osgText-animation to Canvas would mean working out the required canvas extent and somehow mapping it to the correct panel location (and UVs), which he’d be nervous about both the reliability and complexity of.


Navigation menu