Amerio.Stephane Posted May 5, 2025 Posted May 5, 2025 Hi, I'm wondering what would be the best or simplest way to have this effect: the text should be overlayed in the 3d world (not influenced by world lights) the text should be dynamic (can be changed at runtime) the text should behave as a billboard the text shall fade-in and fade-out, or have some transition effect (global fade, or rolling fade, or other fancy fading effect) The last point (fading) is problematic with the existing Text object, because its material doesn't have any way to control the transparency. The billboard effect can be control through code, but maybe there is a possibility to "bake it" at runtime inside a billboard or GUI object? What do you think?
cash-metall Posted May 5, 2025 Posted May 5, 2025 3 hours ago, Amerio.Stephane said: The billboard effect can be control through code, but maybe there is a possibility to "bake it" at runtime inside a billboard or GUI object? Yes sure! you can find an example in cpp_samples_demo_2.19.1.2/source/render_to_texture/GuiToTexture.cpp there are minimal reproduse how to create your own GUI, render it into a texture and placing it into an object. as an example there is an LСD screen created, however there are no restrictions to put a texture in billboards material.
Amerio.Stephane Posted May 7, 2025 Author Posted May 7, 2025 Hi, Thanks for the link to the code sample. Alternatively, I found out that the Text transparency can actually be controlled by the Alpha of its Color! Great! As a suggestion, it would also be great if the distances could be used to control the fading in/out of the text (multiplying the color alpha). Thanks!
silent Posted May 7, 2025 Posted May 7, 2025 Quote As a suggestion, it would also be great if the distances could be used to control the fading in/out of the text (multiplying the color alpha). Could you please elaborate on this? You want ObjectText to fade-in or fade-out based on it's Visibility setting inside LOD section? How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN
Amerio.Stephane Posted May 7, 2025 Author Posted May 7, 2025 Yes, that would be a good addition, as currently the text simply fully turn on/off. So if visibility has a fade distance of say 5m, at max=10m, and text alpha is 0.5, then from d=10 to d=15 the actual alpha changes from 0.5 to 0. 1
Recommended Posts