golgepapaz
Topic Author
Posts: 43
Joined: 01 Aug 2013, 01:59

[Unity] Exception when define opacity

04 Aug 2014, 10:13

Hi,

I am trying to simulate a dialog window that is shown on center of screen. Here is the xaml,
<Grid x:Name="background" Background="Black" Opacity="0.5" Visibility="Collapsed" />
<WeatherEditor x:Name="weatherEditor" VerticalAlignment="Center" HorizontalAlignment="Center" Visibility="Collapsed"/>
When this editor is shown I also make grid visible and grid fills all the background so that user can only interact with weather editor. But I am getting following exception at console.
Exception: Offscreen atlas texture is full. Can't find space for 50x50 rectangle. Please increase Offscreen size in renderer
Noesis.Error.Check () (at Assets/Plugins/NoesisGUI/Scripts/Core/NoesisError.cs:60)
Noesis.UIRenderer.Noesis_UpdateRenderer (Int32 rendererId, Double timeInSeconds) (at Assets/Plugins/NoesisGUI/Scripts/Core/NoesisUIRendererImports.cs:141)
Noesis.UIRenderer.Update (Double timeInSeconds, AntialiasingMode aaMode, TessellationMode tessMode, TessellationQuality tessQuality, RendererFlags flags, Boolean enableMouse, Boolean enableTouch) (at Assets/Plugins/NoesisGUI/Scripts/Core/NoesisUIRenderer.cs:85)
NoesisGUIPanel.LateUpdate () (at Assets/Plugins/NoesisGUI/Scripts/NoesisGUIPanel.cs:97)
I also find out that removing opacity from grid solves the problem.

Second question: Is there any ready to use element for dialog windows at NoesisGUI?

Thanks
 
User avatar
sfernandez
Site Admin
Posts: 1911
Joined: 22 Dec 2011, 19:20

Re: [Unity] Exception when define opacity

04 Aug 2014, 17:41

Opacity groups (elements where you set the UIElement.Opacity property with a value >0 and <1, or elements using an UIElement.OpacityMask) have to use an offscreen texture in order to achieve a correct transparency of the element subtree.

The size of these extra texture is defined in the NoesisGUIPanel by the Offscreen Width and Height sizes, relative to the viewport size (when used attached to a Camera), or to the texture size (when attached to a RenderTexture).

You can increase this values if you are getting errors.

Anyway, I would emphasize that UIElement.Opacity shouldn't be used if it can be substituted by Brush.Opacity or Color alpha channel as explained here: http://www.noesisengine.com/docs/Gui.Co ... izing.html

There is an open discussion on how to improve this in NoesisGUI because some customers don't feel comfortable with the current status. We will be glad if you can share your opinion there: viewtopic.php?f=3&t=247&start=10&hilit=offscreen

Who is online

Users browsing this forum: No registered users and 1 guest