View Issue Details

IDProjectCategoryView StatusLast Update
0001681NoesisGUIC# SDKpublic2020-05-25 10:56
Reporterai_enabledAssigned Tosfernandez 
Status assignedResolutionreopened 
Product Version3.0.0 
Target Version3.0Fixed in Version3.0.0 
Summary0001681: ImageBrush with reloaded texture (through RaiseTextureChanged) doesn't recalculate its viewport/viewbox properly
DescriptionHi guys,

RaiseTextureChanged provides a great mechanism for delayed texture loading.
So far it works perfectly well except a single case I've noticed.
We have a resource like this:

   <ImageBrush x:Key="WidgetBackgroundImageTexture"
                ViewportUnits="Absolute" />

Unfortunately, this ImageBrush doesn't react to the texture reloading properly.
I've ensured that the new texture is loaded by NoesisGUI (I see it's actually replacing my temporary placeholder magenta texture with something else) but Viewbox/Viewport is not recalculated so the tiling is wrong.

Please let me know if I can help with this bug further.

TagsNo tags attached.




2020-05-07 17:50


Good.jpg (1,215,008 bytes)
Bad.jpg (1,207,506 bytes)


2020-05-09 00:00

manager   ~0006338

Is this something you can reproduce always?
Because it seems to be working fine for me with your game v0.26.8.20 and our RC5.
Is it normal that if I modify the image and save it, then the game shows the "COMPILING" message and reloads?
Anyway, before reloading I can see the background image is tiled correctly.


2020-05-09 00:15

updater   ~0006339

Last edited: 2020-05-09 00:17

View 4 revisions

The current game version doesn't have image reloading implemented for NoesisGUI yet. It simply invokes full reloading (scripts + UI, with purging our NoesisTextureProvider's cache). That's why you cannot reproduce the issue.

If you want to check, please use this Editor build (built with RC4)
It also doesn't have hot reloading for image file changes. But it's using `RaiseTextureChanged` for each image that could not be provided to NoesisGUI instantly through `LoadTexture` method of TextureProvider's implementation. (All of them are cannot be provided instantly in this build. So I've implemented async texture loading for NoesisGUI TextureProvider)

Also, `GetTextureInfo` method of TextureProvider's implementation will provide width=0 height=0 for missing files and width=1 height=1 for existing image files that are not yet loaded in the cache (if they're loaded it will provide actual width and height).

So far it works perfectly well for every image used in the UI except the ImageBrush x:Key="WidgetBackgroundImageTexture"

I've verified that for "/UI/Images/Backgrounds/WidgetBackground.png" after `RaiseTextureChanged` NoesisGUI does request the `GetTextureInfo()` method (and collects result with width=8 and height=8) and then does `LoadTexture()` for it. The texture is loaded properly (it was magenta texture initially, and I clearly see it's no longer a magenta texture), but the tiling is not updated.




2020-05-12 00:14

updater   ~0006347

Please check the main menu. There is another but similar issue when the texture has incorrect rendering (incorrect stretching) in Image object after reloading. I've tried manually setting Image width or/and height but it doesn't help.

<Image Source="/UI/Images/Logo/logo_cryofall_128.png"
                                               SnapsToDevicePixels="False" />

file location: Core.cpk\UI\Controls\Menu\MainMenuOverlay.xaml


2020-05-12 00:15

updater   ~0006348

Here is the screenshot:



2020-05-12 00:16

updater   ~0006349

Last edited: 2020-05-12 00:46

View 2 revisions

How should it look:
(if you use Ctrl+F5 it will look this way as our texture provider will not use reloading and instantly provide the proper texture size by using the cached DX Texture2D object)

UPD. I've checked the whole game and there are no other cases of this issue. Even though we're using Image Stretch in several other places.



2020-05-12 00:33

updater   ~0006350

No priority with this as I believe it would be not right to report to NoesisGUI 1x1 size as it doesn't result in the correct layout immediately which might be essential in some cases (it's weird when for example the main menu layout is changed as the images are loaded asynchronously).
When providing actual size to NoesisGUI it works properly and likely will not cause any other issues. Calculating an actual size is a slight and reasonable overhead and it's anyway much better than how it was before NoesisGUI supported async texture loading with our texture provider.


Issue History

Date Modified Username Field Change
2020-05-07 17:50 ai_enabled New Issue
2020-05-07 17:50 ai_enabled File Added: Good.jpg
2020-05-07 17:50 ai_enabled File Added: Bad.jpg
2020-05-07 17:50 ai_enabled Summary Texture reloaded with RaiseTextureChanged is not utilized for textures used in some ImageBrush => ImageBrush with reloaded texture (RaiseTextureChanged) doesn't recalculate the viewport/viewbox
2020-05-07 17:51 ai_enabled Summary ImageBrush with reloaded texture (RaiseTextureChanged) doesn't recalculate the viewport/viewbox => ImageBrush with reloaded texture (through RaiseTextureChanged) doesn't recalculate its viewport/viewbox properly
2020-05-08 10:59 sfernandez Assigned To => sfernandez
2020-05-08 10:59 sfernandez Status new => assigned
2020-05-08 10:59 sfernandez Target Version => 3.0.0
2020-05-09 00:00 sfernandez Status assigned => feedback
2020-05-09 00:00 sfernandez Note Added: 0006338
2020-05-09 00:15 ai_enabled Note Added: 0006339
2020-05-09 00:15 ai_enabled Status feedback => assigned
2020-05-09 00:15 ai_enabled Note Edited: 0006339 View Revisions
2020-05-09 00:16 ai_enabled Note Edited: 0006339 View Revisions
2020-05-09 00:17 ai_enabled Note Edited: 0006339 View Revisions
2020-05-11 20:10 sfernandez Status assigned => resolved
2020-05-11 20:10 sfernandez Resolution open => fixed
2020-05-11 20:10 sfernandez Fixed in Version => 3.0.0
2020-05-12 00:14 ai_enabled Status resolved => feedback
2020-05-12 00:14 ai_enabled Resolution fixed => reopened
2020-05-12 00:14 ai_enabled Note Added: 0006347
2020-05-12 00:15 ai_enabled File Added: Screenshot at 02-12-43.jpg
2020-05-12 00:15 ai_enabled Note Added: 0006348
2020-05-12 00:15 ai_enabled Status feedback => assigned
2020-05-12 00:16 ai_enabled File Added: Screenshot at 02-15-38.jpg
2020-05-12 00:16 ai_enabled Note Added: 0006349
2020-05-12 00:33 ai_enabled Note Added: 0006350
2020-05-12 00:46 ai_enabled Note Edited: 0006349 View Revisions
2020-05-25 10:56 jsantos Target Version 3.0.0 => 3.0