Adding to Cart…
Licensing Agreement | Terms of Service | Privacy Policy | EULA
© 2025 Daz Productions Inc. All Rights Reserved.You currently have no notifications.
Licensing Agreement | Terms of Service | Privacy Policy | EULA
© 2025 Daz Productions Inc. All Rights Reserved.
Comments
I was just asking for a texture resizer product in another thread a couple days ago. I'll be highly interested in whatever you come up with! Such a tool could have so many uses, and I'm stunned that there is not one out there already.
The script to do the resizing (with the help of ImageMagick) is working. Need to give it a little bit of GUI for some options, but it does find and resize all the images of the selected item in the scene.
(it doesn't handle children of selections, or multiple selections....yet.)
Next will be the scripts that will set the maps for the selected item to either medium or small resized versions.
Okay. I have working scripts, though I'm polishing them up a bit, and making better UI interfaces for them. But they function!
Doing tests now to see how good they help.
Restarted DS, loaded a resized scene. One Genesis2Female, with hair and clothing, an environment, with props (some instanced), several lights, and camera, then ran the Iray render at 3072 x 2048, with Optix acceleration, no special samplers on. NOTE: I'm still running on DS 4.8 release, so we may see some changes with 4.9!
At the default resolutions (mostly large sizes), using GPU-Z to measure GPU memory usage (base without DS running is a little below 750MB, with DS started with empty scene is 1010MB.) Texture compression was changed for each run, at full it was 512/1024, medium was 256/512, and at small was 256/512 (this becomes important, see below):
GPU Mem at load of scene: 1241MB. GPU Mem at Max during iterations: 3080MB. Total memory usage of Iray: 1839MB
At half-size resolutions for ALL used image maps, from GPU-Z:
GPU Mem at load of scene: 1204MB. GPU Mem at Max during iterations: 2600MB. Total memory usage of Iray: 1396MB
At quarter-size resolutions for ALL used image maps, from GPU-Z:
GPU Mem at load of scene: 1127MB. GPU Mem at Max during iterations: 2584MB. Total memory usage of Iray: 1457MB
We see a 24% decrease in Iray memory usage going from full size to half-size images. Since we don't know the precise percentages of geometry vs. textures, we know some of that memory is exactly the same geometry. But when we go to the quarter-resolution images, we see almost the same change, even slightly less of a percentage decrease? This indicates that a lot of my textures (in this particular scene) were getting small enough that compression was actually becoming a problem. This is why the low/high thresholds are important to adjust based on your images. Low should be kept at 256 or 512, high should be kept at 512 or 1024. Small maps (below 512x512) NEED to stay uncompressed since the compression algorithms start to work against you below that. Also, it depends on the complexity of the particular image, but as a general rule, the above values should be good.
I should note that the 770GTX is running BOTH my displays (one of which is a 4k, the other a 1080p) so these particular results may be a bit less accurate. Though I did try to minimize the offsets.
The scene I used quickly becomes geometry and texture quantity bound, which is why we see no benefit from going to quarter-size images. With a larger scene, with more 4k x 4k images, we'd probably see a much larger impact.
Still, roughly a 25% memory savings (including geometry, which means texture-wise, it was probaly closer to 40% or 50% of texture memory) is pretty significant! And knowing a bit more how to manage compression settings is an added benefit.
Once I get the scripts finished, I hope some additional results will be posted here. I think a variety of scenes (from simple to very complicated) would help nail down exactly how much reduction helps, and how to best adjust the Iray compression thresholds.
Very encouraging. Thanks for the update.
Also, I will post the rendered images for comparison once I've got fully rendered versions.
Also, I've noticed a small issue with the resizing via imageMagick on PNGs with an alpha channel in them. Trying to figure that one out.....
Okay, comparison images posted:
http://hphoenix.deviantart.com/art/Washing-Machine-Bubble-Genie-FullResTex-613926943 (this is the full-res textures version)
http://hphoenix.deviantart.com/art/Washing-Machine-Bubble-Genie-SmallResTex-613928806 (this is the one with quarter-resolution version, or 1/16th size)
I don't see much, if ANY difference (aside from the coin box details which were the resizing issue with greyscale PNGs with alpha channels problem....still trying to figure out a way to get correct output) between the two images. And the small res uses about 450MB less texture memory than the full res.
(The washing machines are my own work, will be posting them and the matching coin-op stack dryer somewhere as a freebie soonish....The bubbles use my current WIP on a soap-film shader for Iray.)
Comments?
Interesting comparison. The other difference I see (apart from the one you mentioned) was the white shelf that runs behind the machines. The texture looks very pixelated in the second picture, which I assume is due to its texture being too small.
Yep. That particular one uses a fairly small texture. In that particular instance, it'd be better served with a 'marble' procedural texture....no map needed at all. I think the original texture was 512x512, so at 1/4 res, it was only 128x128. Got pretty aliased. For a true 'final' render, I'd change that one texture to use it's full version, or switch it to a procedural.
I'm on my small screen (13") laptop at the moment and I can't really see any quality drop-off. It makes me wonder why the big textures are needed at all but it goes to show that it would be a good idea - as already suggested - for PAs to include the smaller options.
I know that ImageMagick runs on OSX so this could possibly work for Mac users too.
NIce work on the washing machines, btw. Maybe give the tub (the internal cylinder with holes) and the coin box a polished steel surface? Are the multiple machines instances and would that make a difference for VRAM demands?
Could the script look at the original size before it makes them smaller? If below a certain threashold, the script could leave them alone.
Yes, ImageMagick runs on just about everything. And source is available if you find something it doesn't run on! Which is one of the reasons I chose it.
As far as the Washing Machine, all the materials can be modified, pretty easily. The coin-box details texture is what got futzed by ImageMagic.....so the coin box won't look right in the small res textures version. Look at the full size textures version. It should have a brushed metal appearance. I tried very hard to keep the materials well separated and logical. Also, it is fully rigged (lid opens and closes, drum turns, agitator turns, coin-return button has a morph for pressing in....) and I will include the PSD file with the layers to make the LED display so you can easily adjust what is being displayed......
I considered doing that. But I didn't want to over-complicate the resizer. It has a very simple set of options: Generate Medium, Generate Small, Generate Both. And I'm adding the path to the resizer executable (should also save the last value so it stays after it is set once.) The small size images, while the chance of them having issues is bigger, isn't something I wanted to decide FOR the user. And they take very little additional space comparatively. To simplify things (so less could break) I leave that up to the user to handle.
Best usage would be to run the script and resize both, then go through the texture directory and preview each of the '_sml' textures....and if you see pixellation or significant degredation, just copy the '_med' image over the small one.
I should also note that I saw very little benefit when going from medium to small. In fact, I saw a small increase in memory usage (due to the compression system.) So unless you are using it on something with VERY large textures (4k x 4k or LARGER) I wouldn't even bother with the small size.
The 2 deviant art pics say a lot.
The first thing I do upon returning to DS, and familiarizing with Genesis3, is textures reduction - both size and quatity.
This script will be extremely helpful for animators and those with last generation graphics cards...
I have the scripts working pretty good. Still can't figure out the issue with those greyscale PNGs having issues on resizing in ImageMagick. Going to try to release the scripts by this weekend.