Reduce texture sizes easily with this script.

123457»

Comments

  • hphoenix said:
     

    @Esemwy 's script used the temp folder.  Mine doesn't use it at all (resized textures go into the original runtime/textures/whateverpath for the original texture, except for connect-based stuff, which uses the selected path in the main dialog.)  So I'm not sure which one you are using now, mine or his.  There's two separate resizing things done in this thread.

     

    I will re-read. I may have missed something because the script I used did not provide any choices on where to save those new files.  And yes "sometimes" but not always the script I got first and DS did delete those files. I had to resort to making copies prior to clearing scene to save them so being able to have them placed in their correct location would be awsome!

  • wscottartwscottart Posts: 356

    This is an awesome tool. I've bookmarked this thread to try and not lose track of it.

  • sapatsapat Posts: 1,719

    which is the latest copy of the script?  I downloaded a verions of it, but it was a while back and it's had updates since then.

    Thx.

  • EsemwyEsemwy Posts: 563

    Most people seem to be using @hphoenix version. The latest is here on the previous page. Mine is at the top of the thread. It hasn’t changed in a while.

  • sapatsapat Posts: 1,719

    Yours is the one I had originally, so will dl that one again.  I'll dl the other one as well, but will give yours a go first, thx.

  • EsemwyEsemwy Posts: 563
    edited January 2019

    Let me know if anything is broken. I haven't done anything to it in a while, so bit-rot may have set in.

    Post edited by Esemwy on
  • sapatsapat Posts: 1,719
    Esemwy said:

    Let me know if anything is broken. I haven't done anything to it in a while, so bit-rot may have set in.

    Will do, and thx for all you have done.

  • avmorganavmorgan Posts: 135

    These scripts are able to do almost everything I'd look for in this kind of utility. There's one thing in particular I'd want to add if I could do the scripting... other people might too, so I thought I'd mention it. When I upgraded to a better system (old laptop to new laptop), I had to settle for 1/4 of the HD space. I have my runtime backed up on an external HD with room to spare, but it is growing too large for my C drive. I was tempted to convert my primary runtime/textures directory to a reduced size but there was no real convenient way to switch to my backup runtime/textures (on my E drive) at will. I would love it if the TextureMapSizeSwitcher had the option to look for the textures (that is the default names but in the alternate runtime). I think, by preference, I'd want to start out with lower res textures during setup and then switch out to higher res textures where needed at final save and render. 

    Would that be difficult to implement?

  • hphoenixhphoenix Posts: 1,325
    avmorgan said:

    These scripts are able to do almost everything I'd look for in this kind of utility. There's one thing in particular I'd want to add if I could do the scripting... other people might too, so I thought I'd mention it. When I upgraded to a better system (old laptop to new laptop), I had to settle for 1/4 of the HD space. I have my runtime backed up on an external HD with room to spare, but it is growing too large for my C drive. I was tempted to convert my primary runtime/textures directory to a reduced size but there was no real convenient way to switch to my backup runtime/textures (on my E drive) at will. I would love it if the TextureMapSizeSwitcher had the option to look for the textures (that is the default names but in the alternate runtime). I think, by preference, I'd want to start out with lower res textures during setup and then switch out to higher res textures where needed at final save and render. 

    Would that be difficult to implement?

    Adding an extra path to search in isn't really that difficult, though it really depends on exactly how you are defining a 'separate runtime'.   If it's a duplicate of the exsting runtime structure (with just different content) then it's just another base directory to add (along with a UI to manage it).  If it's just a directory full of textures, that gets a little more complicated.

    One of the primary design considerations I made (in contrast to @Esemwy's, which is equally valid) was to put the resized textures into the same folder as the originals.  This kept all the textures in their original paths, so changing them manually was still very simple.  The only exception to this was Connect-installed content, as its subdirectories are protected.  Adding this feature would make the location non-deterministic....meaning that if the new path got changed around one could easily lose track of what to use as the new base path, and then you are back to square one.

    It's not a bad idea, I'm just not sure how well it would work.  I'll give it some thought.

  • avmorganavmorgan Posts: 135

    Given the amount of "drift" my runtime has seen over the course of three computer upgrades (since I started with DS), I totally get where you're coming from. I think I had to merge three base directories (spread over partitions) into one, this last upgrade, so I can't really call my backup a mirror, folder-structure-wise. Heh. Of course, it'd be worth it to me to pick up a new external (at least 10TB's worth) and build up a "clean" backup, and then make a full restore of my main install; at least, if the size switcher could access the full-scale backup textures. Ideally, my backup should use the same folder structure up to the drive letter, regardless of any difference in file content. I'll let you think about it for a while, 'cuz the more I think about it right now, the worse my headache gets. 

    For now, I can just swap the files manually as needed. Thanks for your response!

  • icemage1993icemage1993 Posts: 27
    edited March 2019

    This script is freaking awesome, thank you hphoenix!

    Btw, can i manually set where all the resized textures saved? Or atleast made the script save those file to temp folder like the original script by Esemwy, because as of now the script save the resized textures to the original textures location and that make uninstall stuff with DIM complicated!

    Post edited by icemage1993 on
  • hphoenixhphoenix Posts: 1,325

    This script is freaking awesome, thank you hphoenix!

    Btw, can i manually set where all the resized textures saved? Or atleast made the script save those file to temp folder like the original script by Esemwy, because as of now the script save the resized textures to the original textures location and that make uninstall stuff with DIM complicated!

    Unfortunately, in order to find (and switch between) the textures, they need to be in a uniform place.  As in, to switch back to the original texture, they need to be in the same directory.  This also makes manually switching the textures easier (as the file browser should pop-up pointing at the same location).  The only exception to this is for Connect installed content.

     

  • hphoenix said:

    This script is freaking awesome, thank you hphoenix!

    Btw, can i manually set where all the resized textures saved? Or atleast made the script save those file to temp folder like the original script by Esemwy, because as of now the script save the resized textures to the original textures location and that make uninstall stuff with DIM complicated!

    Unfortunately, in order to find (and switch between) the textures, they need to be in a uniform place.  As in, to switch back to the original texture, they need to be in the same directory.  This also makes manually switching the textures easier (as the file browser should pop-up pointing at the same location).  The only exception to this is for Connect installed content.

     

    I see, thanks for the answer!

     

  • sean2_7606d08833sean2_7606d08833 Posts: 25
    edited March 2019
    hphoenix said:

    Unfortunately, in order to find (and switch between) the textures, they need to be in a uniform place.  As in, to switch back to the original texture, they need to be in the same directory.  This also makes manually switching the textures easier (as the file browser should pop-up pointing at the same location).  The only exception to this is for Connect installed content.

    (1)

    Aren't all the filenames relative to the content base? Or am I forgetting something?

    If so, it seems like if you just added the option to always save to a specific content directory (not just for Connect), then people who want this behavior can create a "temporary" content directory, save all the modified files there, but it can still switch back automatically, since it's just the "same directory" but in a different base? They do lose the "file browser pops up in the right place", but maybe that's an acceptable trade-off for them.

    (2)

    I'm on a fork of this I made back when I reported the 4.9 version comparison failure, because there's one other thing I really need that yours doesn't do. 99.9% of the time I'm not authoring textures, so my textures never change. That means when I run resizer, if the texture already exists, replacing the output would have no effect. So for performance reasons I just always want to skip. But this isn't an option--the global setting lets you choose between "always overwrite" and "always ask", whereas I want a third option, "always skip".

    If you care about why, the point is that it lets you not have to keep track of what you've resized. Click everything thing in the scene and run resizer on it all. More commonly I do this to resize all the clothing on a character whose skin is already resized.

    On the same quality-of-life axis is always skipping the prompt when you try to switch a texture that's already been switched. E.g. if I set the character skin to 1/4 and then load new clothing, it's convenient to just select the character and resize and get no messages.

    If adding more options to the config screen is too unpleasant, you could add these to the dialogs that pop up, i.e. add a new option of "skip all". You could also go the route of a checkbox "use this response for all remaining textures" that applies to whatever response you choose for the yes/no box, rather than adding "yes to all" or "no to all". This way the extra choices aren't visible to people who never hit the dialogs; the cognitive load is only paid once something "goes wrong". (In my mind, though, this isn't "wrong" at all and I'd prefer the global option, but I just wanted to point out the option.)

    I can't give you my code because I didn't write any of this, I just hardcoded my fork to *always* skip those dialogs, but given that I use it this way I imagine there are others who might use it this way as well. Plus I'd like to get off the fork so I can get the Connect fixes, just in case I ever use Connect. (Although I also have scripts hardcoded to size 1/2, 1/4, and 1/8 without opening the dialog which I guess I'd have to re-do.)


    (3)

    Did you ever look at the 'temp' problem I mentioned here? I don't remember now what content was causing this to test it out now, but I assume the issue is that some content is automagically generating textures (maybe doing layer stuff?) when it's loaded. IIRC my fork just looks for "/temp/" in the filename or something like that. I can look it up and tell you my exact fix if you want.

    (4)

    I made a totally unrelated script which makes copies of all the current textures on an object and rebinds the surfaces to use them, so you can one-click prepare for editing the textures of anything. Is there an existing way to do this that I missed, and if not is this something other people need, i.e. should I post it?

    (I bring it up here because I basically just took the code for Resizer and Switcher and ran them back-to-back, but with a different naming convention and not actually resizing. Of course the credits for Resize/Switcher are still in there since it's 90% the same code. Also because the "always copy them to a specific base directory" idea would be totally useful for segregating the original content from any modified content--at least personally I already have a separate content directory for this myself, e.g. in case I need to reinstall everything with DIM on a new drive, all my modifications are in a separate directory tree.)

    Post edited by sean2_7606d08833 on
  • I got a question, regarding image quality.

    If i were to reduce to extra small texture sizes in, say, a Dreamland Models city block, and retain the best quality possible, would I have to aim the camera closer to the target in order to achieve positive results?

    I know Scene Optimizer allows this to happen, but I am hoping this freebie script will be just as good or better.

  • Hi, loving the idea, but having read through, i noticed there was a problem going from 4.9 to 4.10. Is there a chance you'll change things from 4.10 to the new 4.11pro? As for the moment I'll hang off downloading & installing. Thanks in advance

  • LoonyLoony Posts: 1,086

    I just got this Script as tipp... so uhm, will the script warn me before it runs? because I am somtimes kinda dement... so I will forgot to save the scene before... I am soo afraid, that I destroy my setupt, when I overwrite it :(

    and do I have to select EVERY item or will it reduce ALL?

     

Sign In or Register to comment.