Start a video from a set frame?

I am trying out using a transparent webm video with frames for different UI elements for a popup in UI as a workaround for texture compression ruining some pngs we made in production builds. Is there a way to start the video player from a set timestamp of a video?

Original Post on Discord

by user 103054507105067008

Hey I think there’s no builtin way - can you try making a script that sets the VideoPlayer currentTime?

That’s not a great workaround. It will result in even bigger filesizes than a dev build too.

Also transparent webm will not work on all platforms; cross-platform transparent video support is still bad

All valid points, I’ll feed it back to the designer providing us the visuals. For now we have to run a dev build to avoid the texture compression otherwise which already gives us much larger size builds for now

by user 103054507105067008

Just to manage expectations there - if you want much higher texture quality you’ll always end up with higher filesizes

There’s no magic “give me perfect textures but small files” format I’m afraid ^^

I understand, I am just hitting issues with UI elements where the client wants certain vendor logos or text in a certain style where I have occasional compression issues. When we can selectively not compress textures I think that will be a non issue. For now I will try to stall

by user 103054507105067008

As a summary, there’s three options for textures:

JPG/PNG/WebP, with WebP being the most useful - smallest file size, highest runtime memory impact (effectively unpacked as full bitmap)
ETC1S - small file size, can have quality issues with detailled textures, works well on “real-world images” and textures, doesn’t work well on “data textures” (normals, metallic/roughness) and doesn’t work well on line art / vector art.
UASTC - largest file size, high quality, small size in memory.

Ultimately we want you to be able to choose, at least between the last two and maybe also WebP.

There’s also another option that we may be able to support SVG passthrough, that is, you’d use SVG images directly and then these are “unpacked” at runtime (so even smaller file size but same impact on memory usage)

Will the ETC15/UASTC be automatically set via Unity import settings per texture being Normal Map/not normal map also? Sounds perfect for the scenarios where I have seen texture compression be detrimental to visuals :+1:

by user 103054507105067008

Yes, that is already the case - when you add the “Texture Compression Settings” component on your GltfObject it does that under the hood. Could be more clear from the description

Ah, great!

by user 103054507105067008

Without this component you get default ETC1S for everything, which is great for small size but depending on your content may introduce artifacts.
With this component, you get ETC1S for color textures and UASTC for data textures, which is a “good default” for most 3D apps

Your usecase with “mixed apps” that have some 3D content (where this works great) and some 2D content with line art / vector graphics is not well covered by that yet, sorry for that…

Just making sure I feed back anything I encountered on my first project with Needle to help, the descriptions of texture compression options are super helpful also :sunglasses:

by user 103054507105067008

@ROBYER1 would it help if sprite textures would by default be using UASTC?

Definitely for now if that is easy to switch to, just for textures in canvas or UI only texture imported sprites

by user 103054507105067008

You can try 2.50.x with your sprites :wink:

Oooh yes! Thanks!

by user 103054507105067008