Thu, Jan 9, 5:03 PM CST

Renderosity Forums / Poser - OFFICIAL



Welcome to the Poser - OFFICIAL Forum

Forum Coordinators: RedPhantom

Poser - OFFICIAL F.A.Q (Last Updated: 2025 Jan 09 3:46 am)



Subject: script for downsizing textures


aleks ( ) posted Fri, 05 June 2009 at 4:55 AM · edited Fri, 22 November 2024 at 3:54 PM

heya! i'm looking for a automatic python script or something similar for following purposes: i need v4, v3, m4 and m3 as background figures in 3d max scenes. i can import them quite well in max, no problem in that and i can reduce the polygon count low enough to make them renderable in relatively large numbers. what slows things down are highres textures that are normally available on the market, most of them around 4k pixels.

is it possible to write a script (or is there one) that can reduce the resolution of textures to around 1000 pixels more or less automatically? ideally i hit the "rescale" button on python tab and it saves the loaded xyz.pz3 with lowres textures! :-D i need figures and clothes for v4 & co because i also use close-ups so it HAS to be them! ;-)

thanks in advance


PhilC ( ) posted Fri, 05 June 2009 at 5:13 AM

In Python you'll need the Python Image Library (PIL) freely available but not included in current versions of Poser.

I can write you one, pretty sure I've already got one somewhere. However if you do a Google search on "free image resize" you'll get a boat load of good replies.

Ones that caught my eye are:-

Microsoft PowerToys for Windows XP

IrfanView

I use IrfanView, it can resize, not immediately sure if it can batch process. Certainly worth a look.

Or if you have Photoshop or Paint Shop Pro you can set up a simple macro to do it.

Hope that helps.


aleks ( ) posted Fri, 05 June 2009 at 5:24 AM

yes, i know about image resizer and photoshop, got them already, but the trouble is to search for each and every texture attached to poser figures and clothes, resize them, rename them (i don't want my original texture to be destroyed) and link them back to poser figure. that's just too much to do it by hand for 50-60 figures. :P


PhilC ( ) posted Fri, 05 June 2009 at 5:49 AM

ahh ok you need to:-

Search the scene for all textures used in all figures.
Resize those textures and save with a new name.
Apply the resized textures to the scene figures to replace the original full sized ones.

Is that correct?


aleks ( ) posted Fri, 05 June 2009 at 5:54 AM

yes! :-)


momodot ( ) posted Fri, 05 June 2009 at 6:08 AM

I really miss the max texture size setting from Poser 5... is that a hidden feature that is somehow accessible in Poser 7 by some trick? Of all the features to drop I can't believe they dropped that one! I used to render scenes with that set to 1024 or even 512 then hide everything but the main figures and render those at full texture resolution... it let me render big complex scenes.



svdl ( ) posted Fri, 05 June 2009 at 9:12 AM

A Photoshop action that resizes a texture to 50% or 25% isn't hard to make. I've made one for Photoshop 6.
Running that action on a batch of image files, automatically saving those files with a new name, isn't hard to do either.
Running a find/replace on the .pz3 where old names are automatically replaced by new names isn't hard to do either.
The only thing I do not know yet how to do is how to run a Photoshop batch from the command line and provide it with a list of files to process. It should be possible to do so.
 

The pen is mightier than the sword. But if you literally want to have some impact, use a typewriter

My gallery   My freestuff


PhilC ( ) posted Fri, 05 June 2009 at 9:15 AM

...... and if you ran the collectsceneinventory script first you would have everything gathered together so that the edited PZ3 would not have path issues.


svdl ( ) posted Fri, 05 June 2009 at 9:21 AM

Should have thought of collectsceneinventory! Running that Photoshop action on a single folder is easy and straightforward - and since that folder contains copies of the texture files, overwriting them with the reduced resolution version is not a problem. Then you wouldn't have to rename the paths in the pz3.

The pen is mightier than the sword. But if you literally want to have some impact, use a typewriter

My gallery   My freestuff


PhilC ( ) posted Fri, 05 June 2009 at 9:22 AM

Just checked Irfanview has the batch resize feature. Soooooo

  1. run Scripts > Utility > collectSceneInventory
  2. Select the script option to save all to a directory.
  3. Close Poser
  4. Run the batch resize in Irfanview. You'll not be overwriting the originals just the files in the collected directory.
  5. Reopen Poser and reload the saved PZ3 from the collected directory. All the textures will be the revised size.

Way to go team I think we have cracked it :)
 


gagnonrich ( ) posted Fri, 05 June 2009 at 9:23 AM

Quote - I use IrfanView, it can resize, not immediately sure if it can batch process. Certainly worth a look.

It does batch processing and I use that feature all the time. Besides resizing, it can flip, rotate, crop, and change colors, gamma, sharpness, and a whole lot more in a batch process.

My visual indexes of Poser content are at http://www.sharecg.com/pf/rgagnon


PhilC ( ) posted Fri, 05 June 2009 at 9:23 AM

heh :)


aleks ( ) posted Fri, 05 June 2009 at 9:37 AM

WOW! works like a charm! i used image resizer powertoy - select bitmaps, rightclick, "resize pictures" ... ready in 5 secs. THANK YOU!!!


PhilC ( ) posted Fri, 05 June 2009 at 9:39 AM

Cool, I love it when a plan comes together :))


Acadia ( ) posted Fri, 05 June 2009 at 10:11 AM

Quote - ahh ok you need to:-

Search the scene for all textures used in all figures.
Resize those textures and save with a new name.
Apply the resized textures to the scene figures to replace the original full sized ones.

Is that correct?

What I do in Paint Shop Pro is the above, but instead of renaming the textures, I copy the folder that contains those textures to another part of my hard drive, and then when I resize and save the textures I just save them as the same name. That way Poser automatically uses those resized textures.  If I ever want to use the hires ones again, I simply swap the folder with the smaller texture files with those of the hires one.

I had to resize every texture I used with my old computer. Anything more than 1024 pixels on the longest side made my computer freeze up and crash.

"It is good to see ourselves as others see us. Try as we may, we are never
able to know ourselves fully as we are, especially the evil side of us.
This we can do only if we are not angry with our critics but will take in good
heart whatever they might have to say." - Ghandi



Acadia ( ) posted Fri, 05 June 2009 at 10:14 AM · edited Fri, 05 June 2009 at 10:21 AM

Quote - Just checked Irfanview has the batch resize feature. Soooooo

  1. run Scripts > Utility > collectSceneInventory
  2. Select the script option to save all to a directory.
  3. Close Poser
  4. Run the batch resize in Irfanview. You'll not be overwriting the originals just the files in the collected directory.
  5. Reopen Poser and reload the saved PZ3 from the collected directory. All the textures will be the revised size.

Way to go team I think we have cracked it :)
 

Hmmm. I'll have to look and see if Poser 6 has something like that. That's a handy little piece of information!

EDIT:  Yep!!! Poser 6 has this Utility!  Thanks for the tip!  It's accessible directly from the Python Scripts window thingy inside Poser.

"It is good to see ourselves as others see us. Try as we may, we are never
able to know ourselves fully as we are, especially the evil side of us.
This we can do only if we are not angry with our critics but will take in good
heart whatever they might have to say." - Ghandi



markschum ( ) posted Fri, 05 June 2009 at 10:33 AM

You can try Faststone photo resizer. Its a freeware program that can do batch resizing either to a percentage or to a fixed size in one dimension.

 http://www.faststone.org/


Privacy Notice

This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.