Ability to set global embedded texture import settings for Needle?

Would be ace if I could set these to be 2048px max size and Compression:Automatic by default, is there anywhere I can do that? By default it assumes 4096px and no compression by default
image.png

Original Post on Discord

by user 103054507105067008

There are two experimental components right now.

TextureSize clamps the max texture size of all objects to whatever you define there. It can be in the scene anywhere.

TextureCompressionSettings must be on the GltfObject gameObject. It chooses a toktx compression type based on the slot (e.g. normal textures will be exported using uastc).

Out of curiosity, why don’t you clamp resolution from wherever you’re exporting this if that’s the goal?

I’ll try the components thanks - @herbst🌵 I get your point, this is only when using high resolution source assets from sites like Turbosquid, I usually get given a file from an artist that might be used elsewhere like a high res animation after so the source files are never clamped that much. We try to compress at export only

by user 103054507105067008

You can also always run files through gltf-transform CLI prior to importing in Unity. That’s especially useful if they e.g. use outdated glTF features like spec/gloss

E.g. gltf-transform resize --width 1024 --height 1024 myFile.glb myFile.1k.glb

I agree it would be nice if everything and the kitchen sink can be adjusted directly in Unity :smile:
But I think selecting the textures and setting the max. res there is a good solution – same as it would be for the “old” workflows of e.g. importing an FBX with textures

The more places we add for configuring it the more confusing it gets for users too, another thing to balance.

I’ll make note to set that using the component for now as I know we sometimes want the source files to stay native resolution in case compressing them before import produces issues but that’s just one of a few reasons as I’m used to those unity workflows of compress on export, keep source files native sizes

by user 103054507105067008

Love the look of the CLI tool, going to try it tomorrow, might figure out a new workflow as I’m establishing some now for my workplace if we get new hires in as I envision us using Needle a lot more soon

by user 103054507105067008

Will of course reach out to you about licenses when we do, if those experimental components get a doc page please link me it as I don’t know about some of those components if they are newer

by user 103054507105067008

But you can, just select the right resolution on the textures – not sure I understand the workflow issue with that yet!

Just if importing new files, would be useful to have some default 2048px max size and compression set to auto, same as Unity default import texture settings are

by user 103054507105067008

I agree - a default production build should apply some compression if nothing is specifically configured.