Yellow-Dog-Man / Resonite-Issues

Issue repository for Resonite.
https://resonite.com
141 stars 2 forks source link

LUTs Do Not Import From URLs #2947

Open lxw404 opened 2 months ago

lxw404 commented 2 months ago

Describe the bug?

Somewhat tangentially related to: https://github.com/Yellow-Dog-Man/Resonite-Issues/issues/2946, however LUTs can also not be loaded directly from a URL as an import source.

To Reproduce

Copy this url: https://wiki.resonite.com/images/8/8f/LUT_BaseLinear.png, and paste it into the resonite window, then import it as an LUT.

Expected behavior

The LUT should import normally.

Screenshots

No response

Resonite Version Number

2024.9.12.772

What Platforms does this occur on?

Windows

What headset if any do you use?

Valve Index, Desktop

Log Files

LUT URL Import Fail - 2024.9.12.772 - 2024-09-13 02_20_20.log

A relevant part of the log:

2:24:26 AM.522 (145 FPS)    Exception running asynchronous task:
System.AggregateException: One or more errors occurred. ---> System.IO.DirectoryNotFoundException: Could not find a part of the path "D:\Apps\SteamLibrary\steamapps\common\Resonite\https:\wiki.resonite.com\images\8\8f\LUT_BaseLinear.png".
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share, System.Int32 bufferSize, System.Boolean anonymous, System.IO.FileOptions options) [0x00164] in <9577ac7a62ef43179789031239ba8798>:0 
  at System.IO.FileStream..ctor (System.String path, System.IO.FileMode mode, System.IO.FileAccess access, System.IO.FileShare share) [0x00000] in <9577ac7a62ef43179789031239ba8798>:0 
  at (wrapper remoting-invoke-with-check) System.IO.FileStream..ctor(string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
  at System.IO.File.OpenRead (System.String path) [0x00000] in <9577ac7a62ef43179789031239ba8798>:0 
  at Elements.Assets.TextureDecoder.Decode (System.String file, System.Nullable`1[T] generateMipMaps, Elements.Assets.AlphaHandling alphaHandling, System.Int32 maxSize, System.Single sizeRatio) [0x00018] in <5c37294489144a5bbbe1f3da92ad10c1>:0 
  at Elements.Assets.Bitmap2D.Load (System.String file, System.Nullable`1[T] generateMipmaps, Elements.Assets.AlphaHandling alphaHandling, System.Int32 maxSize, System.Single sizeRatio) [0x00000] in <5c37294489144a5bbbe1f3da92ad10c1>:0 
  at FrooxEngine.ImageImporter+<ImportLUT>d__4.MoveNext () [0x0056d] in <7b41c5634a2646e4ac41ed80a4ddbeee>:0 

It seems that it is just appending the web URL to the local path, making the import fail.

Additional Context

No response

Reporters

LuxKitty Venport/dustysprinkles

shiftyscales commented 1 month ago

This issue is similar to related issues #1439 and #2285.

Dusty-Sprinkles commented 1 month ago

Wouldn't this be somewhat different/still a bug since a LUT in this case is just an image format and the expected behaviour for those should be they import from URL just like any other image?

Frooxius commented 1 month ago

No. LUT's in Resonite aren't actually images, they are volumetric data. When you import LUT encoded as image, it gets converted into that format.