-
Hello Axmolers, I'm working on a HUD (see "heads up display for aircraft") for my Axmol app. The HUD is essentially a monochrome grid with dynamic text and symbols. It's composed of a parent For instance, if there is a character over a grid line, the area of intersection is more opaque than the non-intersecting areas. I couldn't find a setting that solves this. I tried rendering the HUD to a I feel like there should be an obvious answer for this but I'm not seeing it. Any help would be greatly appreciated. Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
That is one way to handle it.
You can render anything to the RenderTexture, and what you render does not need to be part of the scene. One way that may work is if your HUD is part of the scene, but just not visible, then you can make it visible, render to the render texture, then turn visibility off again. Alternatively, just don't put the root node of the HUD as part of the scene, but store a reference to it (as There may be other ways to do this too. |
Beta Was this translation helpful? Give feedback.
-
Have you tried playing around with BlendFunc? I'm fairly certain it will work, with some parameter tweaking you can make ui elements not copy the data of pixels behind them, but I don't know if you can selectively choose which pixels to leave out or which ones to copy since you said that your ui has some opacity so it would need to copy some world object colors, I think the best approach is your RenderTexture one but it doesn't hurt to try. also you can make up your ui using multiple render textures if you need more control over which parts are opaque but I think that's complicated. |
Beta Was this translation helpful? Give feedback.
-
Thanks for your replies everyone. RH101, your response to make the source HUD invisible except while it briefly renders to the texture was inspired (and completely obvious in retrospect). I tried it once I'd recovered from the facepalm. It works perfectly although it feels like my users are being subjected to subliminal HUD messages. I also tried your suggestion of not adding the HUD's base node to the scene. In my scene, I overrode the Thanks again, folks. |
Beta Was this translation helpful? Give feedback.
That is one way to handle it.
You can render anything to the RenderTexture, and what you render does not need to be part of the scene. One way that may work is if your HUD is part of the scene, but just not visible, then you can make it visible, render to the render texture, then turn visibility off again.
Alternatively, just don't put the root node…