You can disable visibility for LOD2 and LOD3 while working with the scene in the preview. Also, you can open LOD1 and disable any other objects to increase the speed.
And one more thing, the rendering in the preview window and the final rendering (Ctrl + R) is different in quality. Render by Ctrl + R is better.
thank you very much. This script is like miracle for my renders! Original scene with two gen3 took 3.3GB after med resizing it has 1.1GB and I dont see big difference!
Quick question: How is the performance of this script compared to the max texture size definition within the Iray render parameters? I would presume that this is similar, or is there some other interaction that I'm missing by physically resizing?
These scripts actually reduce the dimensions of the textures. That reduces memory size much more than the texture compression does.
NVIDIA claims about 30% reduction overall in memory consumption with their texture compression. Halving the dimensions of the image, say 4096x4096 -> 2048x2048, will reduce the required memory for the texture before iray's compression by 75%. Iray's compression may then further reduce the memory consumption.
@tondalee - I would not expect performing a texture reduction on an HD figure to NOT cause such problems. AFAIK the HD detail is accomplished by using sub-division and normal maps, so altering any of the textures is going to mess that system up. I do not use these scripts on human figures unless they are staged in the background. The best results show up on props like vehicles and buildings. I have had success with clothing and armor, even used in foreground settings.
@tondalee - Have to agree with @Connatic that especially for close up work, you do NOT want to be using the resized images. However, you CAN manually swap which textures you are using (after you've created the resized images) so that not ALL the images use the lower resolution. Try swapping out the full res for the medium res on the various areas that ARE having issues.....specifically, the normal and transparency maps. These are much more likely to cause issues with resizing in close-up work.
Also, that particular product has odd-sized transparency and reflection maps, which will not scale nearly as well as those which are powers of 2 in size (i.e., 4096x4096, 2048x2048, 1024x1024, 512x512, etc.)
The resizing scripts are helpful, but they can still require some additional effort to get good results. Try swapping a few of those I mentioned back to the full resolution maps, while leaving the main texture and bump maps resized. If you see the same results, swap the normal and transparency maps back to the medium resized images, and swap the texture and bump maps to the full resolution ones. And at that kind of close up level, you may not be able to completely remove any distortion.....hence why we suggest using these only on those items that are considerably smaller (at full render) than the maps (based on pixel dimensions in the rendered image.) In close-ups, portraiture, and things that are close to the camera, it is better to use the full resolution maps, and only switch to resized maps for those elements in midground and background.
Hi, which directory are the reduced textures saved? When I open my projects that have reduced textures they are loaded without textures and an error appears asking me to inform the texture directory
Hi, which directory are the reduced textures saved? When I open my projects that have reduced textures they are loaded without textures and an error appears asking me to inform the texture directory
Esemwy's script saves them in the DS temp directory (which is cleared on every start of DS). My scripts save the files in the original path (if non-cloud) or in a selected non-cloud path (for cloud files). There ARE two different scripts for resizing in this thread. Might want to read through all of it.
I finally got around to trying this script with the NFXStudio Farmhouse, which I cannot render without it completely crashing my PC. Even after hiding all interior walls, the Farmhouse completely crashes my computer.. I've never had this happen before. So I had no option but to try this script.
Unfortunately I get errors when I try to run this script. It says to see the log file (below):
Loading script: C:/Users/Public/Documents/My DAZ 3D Library/Scripts/Reduce Texture Size/TextureMapResizer.dsa
Loaded image Faded Paint Bump.jpg
Loaded image Roof Shingles Displacement.jpg
Loaded image Porch Ceiling Displacement.jpg
Loaded image Paint Bump.jpg
Loaded image Door Hardware Displacement.jpg
Loaded image Farmhouse Wood Trim Bump.jpg
Loaded image Faded Blue Paint.jpg
Loaded image Living Room Bump.jpg
Loaded image Living Room Displacement.jpg
Loaded image Second Floor Carpet.jpg
Loaded image Second Floor Carpet Bump.jpg
Loaded image Stairwell Bump.jpg
Loaded image Stairwell Displacement.jpg
Loaded image Kitchen Bump.jpg
Loaded image Kitchen Displacement.jpg
Loaded image Bedroom Two Bump.jpg
Loaded image Bedroom One Displcaement.jpg
Loaded image Dining Room Bump.jpg
Loaded image Dining Room Displacement.jpg
Loaded image Bedroom Two Displacement.jpg
Loaded image Bathroom and Hallway Bump.jpg
Loaded image Bathroom and Hallway Displacement.jpg
Loaded image Frosted Glass.jpg
Loaded image Electric Outlet Single Displacement.jpg
Loaded image Electric Outlet Double.jpg
Loaded image Electric Outlet Double Displacement.jpg
Loaded image Light Switch And Outlet Double.jpg
Loaded image Light Switch And Outlet Double Displacement.jpg
Loaded image Brass Hinge.jpg
Loaded image Kitchen Countertop.JPG
Loaded image Rusty Metal.jpg
Loaded image Shower Liner.jpg
Loaded image Shower Liner Displacement.jpg
Loaded image Shower Head.jpg
Loaded image Shower Curtain Texture.jpg
Loaded image Shower Curtain Opacity.jpg
Loaded image Basement Joists.jpg
Loaded image Hardwood Floor Texture.jpg
Loaded image Hardwood Floor Specular.jpg
Loaded image Hardwood Floor Displacement.jpg
Loaded image Basement Ceiling.jpg
Loaded image Basement Ceiling Bump.jpg
Loaded image Basement Beam.jpg
Loaded image Bathroom Tiles.jpg
Loaded image Bathroom Tiles Displacement.jpg
Loaded image Heating Grate Texture.jpg
Loaded image Heating Grate Opacity.jpg
Loaded image Heating Grate Displacement.jpg
Loaded image Heat Register Texture.jpg
Loaded image Heat Register Displacement.jpg
Loaded image Living Room Rug.jpg
Loaded image Dining Room Rug.jpg
Loaded image Bath Mat.jpg
Loaded image Bath Mat Displacement.jpg
Loaded image Basement Floor Texture.jpg
Loaded image Basement Walls.jpg
Loaded image Basement Walls Displacement.jpg
Loaded image Basement Walls Normal.jpg
Loaded image Basement Posts.jpg
Loaded image Basement Post Plate.jpg
Loaded image Basement Post Displacement.jpg
Loaded image Welcome Mat Displacement.jpg
Loaded image Front Walk Displacement.jpg
Loaded image Front Walk Edgers Displacement.jpg
WARNING: Script Error: Line 409
WARNING: TypeError: Result of expression 'cm.getCloudContentDirectoryPath' [undefined] is not a function.
WARNING: Stack Trace:
<anonymous>()@C:/Users/Public/Documents/My DAZ 3D Library/Scripts/Reduce Texture Size/TextureMapResizer.dsa:409
Error in script execution: C:/Users/Public/Documents/My DAZ 3D Library/Scripts/Reduce Texture Size/TextureMapResizer.dsa
Are you using DS 4.9+ or an older version? Esemwy's script (and possibly mine as well, though I think it might) won't work with older versions of DS, since it will try to load the cloud directory path, which doesn't exist in the older versions.
I finally got around to trying this script with the NFXStudio Farmhouse, which I cannot render without it completely crashing my PC. Even after hiding all interior walls, the Farmhouse completely crashes my computer.. I've never had this happen before. So I had no option but to try this script.
Unfortunately I get errors when I try to run this script. It says to see the log file (below):
Loading script: C:/Users/Public/Documents/My DAZ 3D Library/Scripts/Reduce Texture Size/TextureMapResizer.dsa
Loaded image Faded Paint Bump.jpg
Loaded image Roof Shingles Displacement.jpg
Loaded image Porch Ceiling Displacement.jpg
Loaded image Paint Bump.jpg
Loaded image Door Hardware Displacement.jpg
Loaded image Farmhouse Wood Trim Bump.jpg
Loaded image Faded Blue Paint.jpg
Loaded image Living Room Bump.jpg
Loaded image Living Room Displacement.jpg
Loaded image Second Floor Carpet.jpg
Loaded image Second Floor Carpet Bump.jpg
Loaded image Stairwell Bump.jpg
Loaded image Stairwell Displacement.jpg
Loaded image Kitchen Bump.jpg
Loaded image Kitchen Displacement.jpg
Loaded image Bedroom Two Bump.jpg
Loaded image Bedroom One Displcaement.jpg
Loaded image Dining Room Bump.jpg
Loaded image Dining Room Displacement.jpg
Loaded image Bedroom Two Displacement.jpg
Loaded image Bathroom and Hallway Bump.jpg
Loaded image Bathroom and Hallway Displacement.jpg
Loaded image Frosted Glass.jpg
Loaded image Electric Outlet Single Displacement.jpg
Loaded image Electric Outlet Double.jpg
Loaded image Electric Outlet Double Displacement.jpg
Loaded image Light Switch And Outlet Double.jpg
Loaded image Light Switch And Outlet Double Displacement.jpg
Loaded image Brass Hinge.jpg
Loaded image Kitchen Countertop.JPG
Loaded image Rusty Metal.jpg
Loaded image Shower Liner.jpg
Loaded image Shower Liner Displacement.jpg
Loaded image Shower Head.jpg
Loaded image Shower Curtain Texture.jpg
Loaded image Shower Curtain Opacity.jpg
Loaded image Basement Joists.jpg
Loaded image Hardwood Floor Texture.jpg
Loaded image Hardwood Floor Specular.jpg
Loaded image Hardwood Floor Displacement.jpg
Loaded image Basement Ceiling.jpg
Loaded image Basement Ceiling Bump.jpg
Loaded image Basement Beam.jpg
Loaded image Bathroom Tiles.jpg
Loaded image Bathroom Tiles Displacement.jpg
Loaded image Heating Grate Texture.jpg
Loaded image Heating Grate Opacity.jpg
Loaded image Heating Grate Displacement.jpg
Loaded image Heat Register Texture.jpg
Loaded image Heat Register Displacement.jpg
Loaded image Living Room Rug.jpg
Loaded image Dining Room Rug.jpg
Loaded image Bath Mat.jpg
Loaded image Bath Mat Displacement.jpg
Loaded image Basement Floor Texture.jpg
Loaded image Basement Walls.jpg
Loaded image Basement Walls Displacement.jpg
Loaded image Basement Walls Normal.jpg
Loaded image Basement Posts.jpg
Loaded image Basement Post Plate.jpg
Loaded image Basement Post Displacement.jpg
Loaded image Welcome Mat Displacement.jpg
Loaded image Front Walk Displacement.jpg
Loaded image Front Walk Edgers Displacement.jpg
WARNING: Script Error: Line 409
WARNING: TypeError: Result of expression 'cm.getCloudContentDirectoryPath' [undefined] is not a function.
WARNING: Stack Trace:
<anonymous>()@C:/Users/Public/Documents/My DAZ 3D Library/Scripts/Reduce Texture Size/TextureMapResizer.dsa:409
Error in script execution: C:/Users/Public/Documents/My DAZ 3D Library/Scripts/Reduce Texture Size/TextureMapResizer.dsa
Are you using DS 4.9+ or an older version? Esemwy's script (and possibly mine as well, though I think it might) won't work with older versions of DS, since it will try to load the cloud directory path, which doesn't exist in the older versions.
I use DS 4.8. I tried both yours and Esemwy's scripts, and neither one works with the Farmhouse. The weird thing is that after I posted that log file early this morning, I tried to reduce textures on other items just for the heck of it, and Esemwy's script works fine on everything else that I try, just not the Farmhouse.
So there's obviously some other problem with the Farmhouse. I just found this thread, apparently there were some problems with it in the past: https://www.daz3d.com/forums/viewthread/54093/ Maybe this is the source of my problem. I'll open a ticket and see what happens.
@DSDT if you are comfortable editing my TextureMapResizer.dsa script, I can tell you how to fix it. It's a one-line fix.
Look through the file in a text editor, and look for the line
function isConnectFilename(srcfile)
After that line, will be an opening brace ("{"). Insert a new line after that, that reads as follows:
if(DSVersion < 4.9) return false;
Then save the file and restart DAZ Studio, and try it again.
Let me know if you can do it, and what the result is on the 'Farmhouse' product.
I finally got around to trying this script with the NFXStudio Farmhouse, which I cannot render without it completely crashing my PC. Even after hiding all interior walls, the Farmhouse completely crashes my computer.. I've never had this happen before. So I had no option but to try this script.
Unfortunately I get errors when I try to run this script. It says to see the log file (below):
Loading script: C:/Users/Public/Documents/My DAZ 3D Library/Scripts/Reduce Texture Size/TextureMapResizer.dsa
Loaded image Faded Paint Bump.jpg
Loaded image Roof Shingles Displacement.jpg
Loaded image Porch Ceiling Displacement.jpg
Loaded image Paint Bump.jpg
Loaded image Door Hardware Displacement.jpg
Loaded image Farmhouse Wood Trim Bump.jpg
Loaded image Faded Blue Paint.jpg
Loaded image Living Room Bump.jpg
Loaded image Living Room Displacement.jpg
Loaded image Second Floor Carpet.jpg
Loaded image Second Floor Carpet Bump.jpg
Loaded image Stairwell Bump.jpg
Loaded image Stairwell Displacement.jpg
Loaded image Kitchen Bump.jpg
Loaded image Kitchen Displacement.jpg
Loaded image Bedroom Two Bump.jpg
Loaded image Bedroom One Displcaement.jpg
Loaded image Dining Room Bump.jpg
Loaded image Dining Room Displacement.jpg
Loaded image Bedroom Two Displacement.jpg
Loaded image Bathroom and Hallway Bump.jpg
Loaded image Bathroom and Hallway Displacement.jpg
Loaded image Frosted Glass.jpg
Loaded image Electric Outlet Single Displacement.jpg
Loaded image Electric Outlet Double.jpg
Loaded image Electric Outlet Double Displacement.jpg
Loaded image Light Switch And Outlet Double.jpg
Loaded image Light Switch And Outlet Double Displacement.jpg
Loaded image Brass Hinge.jpg
Loaded image Kitchen Countertop.JPG
Loaded image Rusty Metal.jpg
Loaded image Shower Liner.jpg
Loaded image Shower Liner Displacement.jpg
Loaded image Shower Head.jpg
Loaded image Shower Curtain Texture.jpg
Loaded image Shower Curtain Opacity.jpg
Loaded image Basement Joists.jpg
Loaded image Hardwood Floor Texture.jpg
Loaded image Hardwood Floor Specular.jpg
Loaded image Hardwood Floor Displacement.jpg
Loaded image Basement Ceiling.jpg
Loaded image Basement Ceiling Bump.jpg
Loaded image Basement Beam.jpg
Loaded image Bathroom Tiles.jpg
Loaded image Bathroom Tiles Displacement.jpg
Loaded image Heating Grate Texture.jpg
Loaded image Heating Grate Opacity.jpg
Loaded image Heating Grate Displacement.jpg
Loaded image Heat Register Texture.jpg
Loaded image Heat Register Displacement.jpg
Loaded image Living Room Rug.jpg
Loaded image Dining Room Rug.jpg
Loaded image Bath Mat.jpg
Loaded image Bath Mat Displacement.jpg
Loaded image Basement Floor Texture.jpg
Loaded image Basement Walls.jpg
Loaded image Basement Walls Displacement.jpg
Loaded image Basement Walls Normal.jpg
Loaded image Basement Posts.jpg
Loaded image Basement Post Plate.jpg
Loaded image Basement Post Displacement.jpg
Loaded image Welcome Mat Displacement.jpg
Loaded image Front Walk Displacement.jpg
Loaded image Front Walk Edgers Displacement.jpg
WARNING: Script Error: Line 409
WARNING: TypeError: Result of expression 'cm.getCloudContentDirectoryPath' [undefined] is not a function.
WARNING: Stack Trace:
<anonymous>()@C:/Users/Public/Documents/My DAZ 3D Library/Scripts/Reduce Texture Size/TextureMapResizer.dsa:409
Error in script execution: C:/Users/Public/Documents/My DAZ 3D Library/Scripts/Reduce Texture Size/TextureMapResizer.dsa
Are you using DS 4.9+ or an older version? Esemwy's script (and possibly mine as well, though I think it might) won't work with older versions of DS, since it will try to load the cloud directory path, which doesn't exist in the older versions.
I use DS 4.8. I tried both yours and Esemwy's scripts, and neither one works with the Farmhouse. The weird thing is that after I posted that log file early this morning, I tried to reduce textures on other items just for the heck of it, and Esemwy's script works fine on everything else that I try, just not the Farmhouse.
So there's obviously some other problem with the Farmhouse. I just found this thread, apparently there were some problems with it in the past: https://www.daz3d.com/forums/viewthread/54093/ Maybe this is the source of my problem. I'll open a ticket and see what happens.
@DSDT if you are comfortable editing my TextureMapResizer.dsa script, I can tell you how to fix it. It's a one-line fix.
Look through the file in a text editor, and look for the line
function isConnectFilename(srcfile)
After that line, will be an opening brace ("{"). Insert a new line after that, that reads as follows:
if(DSVersion < 4.9) return false;
Then save the file and restart DAZ Studio, and try it again.
Let me know if you can do it, and what the result is on the 'Farmhouse' product.
I edited the script and tested it on the Farmhouse, and it does in fact work now. So thats awesome. But the Farmhouse still crashed my PC even when I switched to the smallest textures. There's something beyond textures that is causing the Farmhouse to crash, I have no idea what is wrong with it. I saw that the biggest textures were for the roof, so I completely deleted the roof and the whole second floor and it still crashed my PC. Btw, this Farmhouse doesn't just crash DS 4.8, it completely crashes my PC where I have to do a hard boot. Its a really nasty thing. Its happend 5 times now during testing between yesterday and today, and I'm done with it. I wish I could return it, but I waited too long to test it, I think I bought this Farmhouse 6-8 weeks ago so I'm past the 30 day window.
But at least I have your script working now, so this will be really handy for other things.I love that I can switch to different textures on the fly. So thanks again for that.
I finally got around to trying this script with the NFXStudio Farmhouse, which I cannot render without it completely crashing my PC. Even after hiding all interior walls, the Farmhouse completely crashes my computer.. I've never had this happen before. So I had no option but to try this script.
Unfortunately I get errors when I try to run this script. It says to see the log file (below):
Loading script: C:/Users/Public/Documents/My DAZ 3D Library/Scripts/Reduce Texture Size/TextureMapResizer.dsa
Loaded image Faded Paint Bump.jpg
Loaded image Roof Shingles Displacement.jpg
Loaded image Porch Ceiling Displacement.jpg
Loaded image Paint Bump.jpg
Loaded image Door Hardware Displacement.jpg
Loaded image Farmhouse Wood Trim Bump.jpg
Loaded image Faded Blue Paint.jpg
Loaded image Living Room Bump.jpg
Loaded image Living Room Displacement.jpg
Loaded image Second Floor Carpet.jpg
Loaded image Second Floor Carpet Bump.jpg
Loaded image Stairwell Bump.jpg
Loaded image Stairwell Displacement.jpg
Loaded image Kitchen Bump.jpg
Loaded image Kitchen Displacement.jpg
Loaded image Bedroom Two Bump.jpg
Loaded image Bedroom One Displcaement.jpg
Loaded image Dining Room Bump.jpg
Loaded image Dining Room Displacement.jpg
Loaded image Bedroom Two Displacement.jpg
Loaded image Bathroom and Hallway Bump.jpg
Loaded image Bathroom and Hallway Displacement.jpg
Loaded image Frosted Glass.jpg
Loaded image Electric Outlet Single Displacement.jpg
Loaded image Electric Outlet Double.jpg
Loaded image Electric Outlet Double Displacement.jpg
Loaded image Light Switch And Outlet Double.jpg
Loaded image Light Switch And Outlet Double Displacement.jpg
Loaded image Brass Hinge.jpg
Loaded image Kitchen Countertop.JPG
Loaded image Rusty Metal.jpg
Loaded image Shower Liner.jpg
Loaded image Shower Liner Displacement.jpg
Loaded image Shower Head.jpg
Loaded image Shower Curtain Texture.jpg
Loaded image Shower Curtain Opacity.jpg
Loaded image Basement Joists.jpg
Loaded image Hardwood Floor Texture.jpg
Loaded image Hardwood Floor Specular.jpg
Loaded image Hardwood Floor Displacement.jpg
Loaded image Basement Ceiling.jpg
Loaded image Basement Ceiling Bump.jpg
Loaded image Basement Beam.jpg
Loaded image Bathroom Tiles.jpg
Loaded image Bathroom Tiles Displacement.jpg
Loaded image Heating Grate Texture.jpg
Loaded image Heating Grate Opacity.jpg
Loaded image Heating Grate Displacement.jpg
Loaded image Heat Register Texture.jpg
Loaded image Heat Register Displacement.jpg
Loaded image Living Room Rug.jpg
Loaded image Dining Room Rug.jpg
Loaded image Bath Mat.jpg
Loaded image Bath Mat Displacement.jpg
Loaded image Basement Floor Texture.jpg
Loaded image Basement Walls.jpg
Loaded image Basement Walls Displacement.jpg
Loaded image Basement Walls Normal.jpg
Loaded image Basement Posts.jpg
Loaded image Basement Post Plate.jpg
Loaded image Basement Post Displacement.jpg
Loaded image Welcome Mat Displacement.jpg
Loaded image Front Walk Displacement.jpg
Loaded image Front Walk Edgers Displacement.jpg
WARNING: Script Error: Line 409
WARNING: TypeError: Result of expression 'cm.getCloudContentDirectoryPath' [undefined] is not a function.
WARNING: Stack Trace:
<anonymous>()@C:/Users/Public/Documents/My DAZ 3D Library/Scripts/Reduce Texture Size/TextureMapResizer.dsa:409
Error in script execution: C:/Users/Public/Documents/My DAZ 3D Library/Scripts/Reduce Texture Size/TextureMapResizer.dsa
Are you using DS 4.9+ or an older version? Esemwy's script (and possibly mine as well, though I think it might) won't work with older versions of DS, since it will try to load the cloud directory path, which doesn't exist in the older versions.
I use DS 4.8. I tried both yours and Esemwy's scripts, and neither one works with the Farmhouse. The weird thing is that after I posted that log file early this morning, I tried to reduce textures on other items just for the heck of it, and Esemwy's script works fine on everything else that I try, just not the Farmhouse.
So there's obviously some other problem with the Farmhouse. I just found this thread, apparently there were some problems with it in the past: https://www.daz3d.com/forums/viewthread/54093/ Maybe this is the source of my problem. I'll open a ticket and see what happens.
@DSDT if you are comfortable editing my TextureMapResizer.dsa script, I can tell you how to fix it. It's a one-line fix.
Look through the file in a text editor, and look for the line
function isConnectFilename(srcfile)
After that line, will be an opening brace ("{"). Insert a new line after that, that reads as follows:
if(DSVersion < 4.9) return false;
Then save the file and restart DAZ Studio, and try it again.
Let me know if you can do it, and what the result is on the 'Farmhouse' product.
I edited the script and tested it on the Farmhouse, and it does in fact work now. So thats awesome. But the Farmhouse still crashed my PC even when I switched to the smallest textures. There's something beyond textures that is causing the Farmhouse to crash, I have no idea what is wrong with it. I saw that the biggest textures were for the roof, so I completely deleted the roof and the whole second floor and it still crashed my PC. Btw, this Farmhouse doesn't just crash DS 4.8, it completely crashes my PC where I have to do a hard boot. Its a really nasty thing. Its happend 5 times now during testing between yesterday and today, and I'm done with it. I wish I could return it, but I waited too long to test it, I think I bought this Farmhouse 6-8 weeks ago so I'm past the 30 day window.
But at least I have your script working now, so this will be really handy for other things.I love that I can switch to different textures on the fly. So thanks again for that.
I'll update the scripts on here when I have time this coming week. It's a pretty quick and simple fix. :) Thanks for testing it. Glad it works for you now.
The Farmhouse may be using 4.9 shader features, which could crash Iray in 4.8. If possible, you might try installing 4.9.4 (beta) alongside 4.8, and see if it works in it. I don't have it, so I can't test this theory. It is a lot of geometry, but I can't see it being SO heavy it would crash your system. What kind of GPU do you have in your box, and how much memory in the system itself?
I'll update the scripts on here when I have time this coming week. It's a pretty quick and simple fix. :) Thanks for testing it. Glad it works for you now.
The Farmhouse may be using 4.9 shader features, which could crash Iray in 4.8. If possible, you might try installing 4.9.4 (beta) alongside 4.8, and see if it works in it. I don't have it, so I can't test this theory. It is a lot of geometry, but I can't see it being SO heavy it would crash your system. What kind of GPU do you have in your box, and how much memory in the system itself?
I have dual 980tis and 32GB of system ram. I've had DS crash before when its run out of memory on occasion, when I'm using Terra Dome 3 with a big scene for example, but its never crashed my PC, just the DS app. I'll probably have to try 4.9 beta, its something I've been avoiding as I hate to fix what isn't broken and I Iike 4.8.
I finally got around to trying this script with the NFXStudio Farmhouse, which I cannot render without it completely crashing my PC. Even after hiding all interior walls, the Farmhouse completely crashes my computer.. I've never had this happen before. So I had no option but to try this script.
Unfortunately I get errors when I try to run this script. It says to see the log file (below):
Loading script: C:/Users/Public/Documents/My DAZ 3D Library/Scripts/Reduce Texture Size/TextureMapResizer.dsa
Loaded image Faded Paint Bump.jpg
Loaded image Roof Shingles Displacement.jpg
Loaded image Porch Ceiling Displacement.jpg
Loaded image Paint Bump.jpg
Loaded image Door Hardware Displacement.jpg
Loaded image Farmhouse Wood Trim Bump.jpg
Loaded image Faded Blue Paint.jpg
Loaded image Living Room Bump.jpg
Loaded image Living Room Displacement.jpg
Loaded image Second Floor Carpet.jpg
Loaded image Second Floor Carpet Bump.jpg
Loaded image Stairwell Bump.jpg
Loaded image Stairwell Displacement.jpg
Loaded image Kitchen Bump.jpg
Loaded image Kitchen Displacement.jpg
Loaded image Bedroom Two Bump.jpg
Loaded image Bedroom One Displcaement.jpg
Loaded image Dining Room Bump.jpg
Loaded image Dining Room Displacement.jpg
Loaded image Bedroom Two Displacement.jpg
Loaded image Bathroom and Hallway Bump.jpg
Loaded image Bathroom and Hallway Displacement.jpg
Loaded image Frosted Glass.jpg
Loaded image Electric Outlet Single Displacement.jpg
Loaded image Electric Outlet Double.jpg
Loaded image Electric Outlet Double Displacement.jpg
Loaded image Light Switch And Outlet Double.jpg
Loaded image Light Switch And Outlet Double Displacement.jpg
Loaded image Brass Hinge.jpg
Loaded image Kitchen Countertop.JPG
Loaded image Rusty Metal.jpg
Loaded image Shower Liner.jpg
Loaded image Shower Liner Displacement.jpg
Loaded image Shower Head.jpg
Loaded image Shower Curtain Texture.jpg
Loaded image Shower Curtain Opacity.jpg
Loaded image Basement Joists.jpg
Loaded image Hardwood Floor Texture.jpg
Loaded image Hardwood Floor Specular.jpg
Loaded image Hardwood Floor Displacement.jpg
Loaded image Basement Ceiling.jpg
Loaded image Basement Ceiling Bump.jpg
Loaded image Basement Beam.jpg
Loaded image Bathroom Tiles.jpg
Loaded image Bathroom Tiles Displacement.jpg
Loaded image Heating Grate Texture.jpg
Loaded image Heating Grate Opacity.jpg
Loaded image Heating Grate Displacement.jpg
Loaded image Heat Register Texture.jpg
Loaded image Heat Register Displacement.jpg
Loaded image Living Room Rug.jpg
Loaded image Dining Room Rug.jpg
Loaded image Bath Mat.jpg
Loaded image Bath Mat Displacement.jpg
Loaded image Basement Floor Texture.jpg
Loaded image Basement Walls.jpg
Loaded image Basement Walls Displacement.jpg
Loaded image Basement Walls Normal.jpg
Loaded image Basement Posts.jpg
Loaded image Basement Post Plate.jpg
Loaded image Basement Post Displacement.jpg
Loaded image Welcome Mat Displacement.jpg
Loaded image Front Walk Displacement.jpg
Loaded image Front Walk Edgers Displacement.jpg
WARNING: Script Error: Line 409
WARNING: TypeError: Result of expression 'cm.getCloudContentDirectoryPath' [undefined] is not a function.
WARNING: Stack Trace:
<anonymous>()@C:/Users/Public/Documents/My DAZ 3D Library/Scripts/Reduce Texture Size/TextureMapResizer.dsa:409
Error in script execution: C:/Users/Public/Documents/My DAZ 3D Library/Scripts/Reduce Texture Size/TextureMapResizer.dsa
Are you using DS 4.9+ or an older version? Esemwy's script (and possibly mine as well, though I think it might) won't work with older versions of DS, since it will try to load the cloud directory path, which doesn't exist in the older versions.
I use DS 4.8. I tried both yours and Esemwy's scripts, and neither one works with the Farmhouse. The weird thing is that after I posted that log file early this morning, I tried to reduce textures on other items just for the heck of it, and Esemwy's script works fine on everything else that I try, just not the Farmhouse.
So there's obviously some other problem with the Farmhouse. I just found this thread, apparently there were some problems with it in the past: https://www.daz3d.com/forums/viewthread/54093/ Maybe this is the source of my problem. I'll open a ticket and see what happens.
@DSDT if you are comfortable editing my TextureMapResizer.dsa script, I can tell you how to fix it. It's a one-line fix.
Look through the file in a text editor, and look for the line
function isConnectFilename(srcfile)
After that line, will be an opening brace ("{"). Insert a new line after that, that reads as follows:
if(DSVersion < 4.9) return false;
Then save the file and restart DAZ Studio, and try it again.
Let me know if you can do it, and what the result is on the 'Farmhouse' product.
I edited the script and tested it on the Farmhouse, and it does in fact work now. So thats awesome. But the Farmhouse still crashed my PC even when I switched to the smallest textures. There's something beyond textures that is causing the Farmhouse to crash, I have no idea what is wrong with it. I saw that the biggest textures were for the roof, so I completely deleted the roof and the whole second floor and it still crashed my PC. Btw, this Farmhouse doesn't just crash DS 4.8, it completely crashes my PC where I have to do a hard boot. Its a really nasty thing. Its happend 5 times now during testing between yesterday and today, and I'm done with it. I wish I could return it, but I waited too long to test it, I think I bought this Farmhouse 6-8 weeks ago so I'm past the 30 day window.
But at least I have your script working now, so this will be really handy for other things.I love that I can switch to different textures on the fly. So thanks again for that.
You can use these models in a more powerful program like Carrara or Lightwave. If you don't want to spend money use Blender. I don't think Daz is really good with large scenes.
I'll update the scripts on here when I have time this coming week. It's a pretty quick and simple fix. :) Thanks for testing it. Glad it works for you now.
The Farmhouse may be using 4.9 shader features, which could crash Iray in 4.8. If possible, you might try installing 4.9.4 (beta) alongside 4.8, and see if it works in it. I don't have it, so I can't test this theory. It is a lot of geometry, but I can't see it being SO heavy it would crash your system. What kind of GPU do you have in your box, and how much memory in the system itself?
I have dual 980tis and 32GB of system ram. I've had DS crash before when its run out of memory on occasion, when I'm using Terra Dome 3 with a big scene for example, but its never crashed my PC, just the DS app. I'll probably have to try 4.9 beta, its something I've been avoiding as I hate to fix what isn't broken and I Iike 4.8.
Well, there were several bugs in Iray in 4.8 that did cause crashing issues with certain geometry and some shader settings. A lot of them have been fixed in 4.9. I'd recommend at least installing the 4.9.4 beta to try the scene with to see if it still crashes. But I understand about keeping 4.8 around. I still have it on my secondary system. But my primary rendering/gaming one has 4.9 on it.
Thanks for this great script. I've got a couple of versions running - the default and another that divides the texture dimensions by 1.414 (reduces the area by half, not a 4, which is great for my poor old 970 without sacrificing too much quality).
This scripts sounds like a solution for all of my problems, but I'm a noob in Daz. so forgive my silly questions.
I render in Iray, but have no Nvidia Card. So my CPU has to do all of the work. In some scenes I have rendertimes over 18h. When I understand it right ( with my poor english), this scripts will save me a lot of time.
The big question is...
The reduced files will be saved, but what happen if I load the prop, figure etc. again? Will they be loaded with the original size texture, or with the reduced?
This scripts sounds like a solution for all of my problems, but I'm a noob in Daz. so forgive my silly questions.
I render in Iray, but have no Nvidia Card. So my CPU has to do all of the work. In some scenes I have rendertimes over 18h. When I understand it right ( with my poor english), this scripts will save me a lot of time.
The big question is...
The reduced files will be saved, but what happen if I load the prop, figure etc. again? Will they be loaded with the original size texture, or with the reduced?
Unfortunately, these probably won't help you much. GPUs are much more memory constrained than the CPU, which has access to all the system RAM as well as virtual memory should paging/swapping become necessary. As such, textures can easily consume all the RAM on a GPU and cause the render to default to CPU.
I doubt the relatively small amount of savings would have a noticeable impact on CPU performance.
As far as saved scenes, they save exactly as they are when you save them, with the modified textures, even if those textures are in temporary storage and will disappear when DS exits. You should either save before running the script, or make sure it saves the textures in your content directory.
Comments
You can disable visibility for LOD2 and LOD3 while working with the scene in the preview. Also, you can open LOD1 and disable any other objects to increase the speed.
And one more thing, the rendering in the preview window and the final rendering (Ctrl + R) is different in quality. Render by Ctrl + R is better.
Hello Hoenix,
thank you very much. This script is like miracle for my renders! Original scene with two gen3 took 3.3GB after med resizing it has 1.1GB and I dont see big difference!
Tony.
Quick question: How is the performance of this script compared to the max texture size definition within the Iray render parameters? I would presume that this is similar, or is there some other interaction that I'm missing by physically resizing?
Thanks :)
These scripts actually reduce the dimensions of the textures. That reduces memory size much more than the texture compression does.
NVIDIA claims about 30% reduction overall in memory consumption with their texture compression. Halving the dimensions of the image, say 4096x4096 -> 2048x2048, will reduce the required memory for the texture before iray's compression by 75%. Iray's compression may then further reduce the memory consumption.
Hello,
during my playing with this life saving script :) I found one strange thing.
I used AdalineHD for Victoria 7, resized textures by internal algoritms to med (ImageMagic doesnt work for me).
Result is on the picture bellow. It seems that parts where textures connect each other has some problems.
Please, do you found it as well and is there any solution for it?
Thank you,
Tonda.
@tondalee - I would not expect performing a texture reduction on an HD figure to NOT cause such problems. AFAIK the HD detail is accomplished by using sub-division and normal maps, so altering any of the textures is going to mess that system up. I do not use these scripts on human figures unless they are staged in the background. The best results show up on props like vehicles and buildings. I have had success with clothing and armor, even used in foreground settings.
@tondalee - Have to agree with @Connatic that especially for close up work, you do NOT want to be using the resized images. However, you CAN manually swap which textures you are using (after you've created the resized images) so that not ALL the images use the lower resolution. Try swapping out the full res for the medium res on the various areas that ARE having issues.....specifically, the normal and transparency maps. These are much more likely to cause issues with resizing in close-up work.
Also, that particular product has odd-sized transparency and reflection maps, which will not scale nearly as well as those which are powers of 2 in size (i.e., 4096x4096, 2048x2048, 1024x1024, 512x512, etc.)
The resizing scripts are helpful, but they can still require some additional effort to get good results. Try swapping a few of those I mentioned back to the full resolution maps, while leaving the main texture and bump maps resized. If you see the same results, swap the normal and transparency maps back to the medium resized images, and swap the texture and bump maps to the full resolution ones. And at that kind of close up level, you may not be able to completely remove any distortion.....hence why we suggest using these only on those items that are considerably smaller (at full render) than the maps (based on pixel dimensions in the rendered image.) In close-ups, portraiture, and things that are close to the camera, it is better to use the full resolution maps, and only switch to resized maps for those elements in midground and background.
Thank you all for responses and information.
I will use full map for more detailed renders and for persons far away medimum. Beucase from distance, I dont see any problems.
Thanks to the OP for this script...much appreciated.
Hi, which directory are the reduced textures saved? When I open my projects that have reduced textures they are loaded without textures and an error appears asking me to inform the texture directory
Esemwy's script saves them in the DS temp directory (which is cleared on every start of DS). My scripts save the files in the original path (if non-cloud) or in a selected non-cloud path (for cloud files). There ARE two different scripts for resizing in this thread. Might want to read through all of it.
Are you using DS 4.9+ or an older version? Esemwy's script (and possibly mine as well, though I think it might) won't work with older versions of DS, since it will try to load the cloud directory path, which doesn't exist in the older versions.
@DSDT if you are comfortable editing my TextureMapResizer.dsa script, I can tell you how to fix it. It's a one-line fix.
Look through the file in a text editor, and look for the line
function isConnectFilename(srcfile)
After that line, will be an opening brace ("{"). Insert a new line after that, that reads as follows:
if(DSVersion < 4.9) return false;
Then save the file and restart DAZ Studio, and try it again.
Let me know if you can do it, and what the result is on the 'Farmhouse' product.
I edited the script and tested it on the Farmhouse, and it does in fact work now. So thats awesome. But the Farmhouse still crashed my PC even when I switched to the smallest textures. There's something beyond textures that is causing the Farmhouse to crash, I have no idea what is wrong with it. I saw that the biggest textures were for the roof, so I completely deleted the roof and the whole second floor and it still crashed my PC. Btw, this Farmhouse doesn't just crash DS 4.8, it completely crashes my PC where I have to do a hard boot. Its a really nasty thing. Its happend 5 times now during testing between yesterday and today, and I'm done with it. I wish I could return it, but I waited too long to test it, I think I bought this Farmhouse 6-8 weeks ago so I'm past the 30 day window.
But at least I have your script working now, so this will be really handy for other things.I love that I can switch to different textures on the fly. So thanks again for that.
I'll update the scripts on here when I have time this coming week. It's a pretty quick and simple fix. :) Thanks for testing it. Glad it works for you now.
The Farmhouse may be using 4.9 shader features, which could crash Iray in 4.8. If possible, you might try installing 4.9.4 (beta) alongside 4.8, and see if it works in it. I don't have it, so I can't test this theory. It is a lot of geometry, but I can't see it being SO heavy it would crash your system. What kind of GPU do you have in your box, and how much memory in the system itself?
I have dual 980tis and 32GB of system ram. I've had DS crash before when its run out of memory on occasion, when I'm using Terra Dome 3 with a big scene for example, but its never crashed my PC, just the DS app. I'll probably have to try 4.9 beta, its something I've been avoiding as I hate to fix what isn't broken and I Iike 4.8.
You can use these models in a more powerful program like Carrara or Lightwave. If you don't want to spend money use Blender. I don't think Daz is really good with large scenes.
Well, there were several bugs in Iray in 4.8 that did cause crashing issues with certain geometry and some shader settings. A lot of them have been fixed in 4.9. I'd recommend at least installing the 4.9.4 beta to try the scene with to see if it still crashes. But I understand about keeping 4.8 around. I still have it on my secondary system. But my primary rendering/gaming one has 4.9 on it.
Thanks for this great script. I've got a couple of versions running - the default and another that divides the texture dimensions by 1.414 (reduces the area by half, not a 4, which is great for my poor old 970 without sacrificing too much quality).
This is going to be very helpful! Thank you!
This scripts sounds like a solution for all of my problems, but I'm a noob in Daz. so forgive my silly questions.
I render in Iray, but have no Nvidia Card. So my CPU has to do all of the work. In some scenes I have rendertimes over 18h. When I understand it right ( with my poor english), this scripts will save me a lot of time.
The big question is...
The reduced files will be saved, but what happen if I load the prop, figure etc. again? Will they be loaded with the original size texture, or with the reduced?
Unfortunately, these probably won't help you much. GPUs are much more memory constrained than the CPU, which has access to all the system RAM as well as virtual memory should paging/swapping become necessary. As such, textures can easily consume all the RAM on a GPU and cause the render to default to CPU.
I doubt the relatively small amount of savings would have a noticeable impact on CPU performance.
As far as saved scenes, they save exactly as they are when you save them, with the modified textures, even if those textures are in temporary storage and will disappear when DS exits. You should either save before running the script, or make sure it saves the textures in your content directory.
Thanks for the still brilliant contribution. Even with a good VGA I still find myself having trouble with unnecessary texture sizes in my renders.
Thank you: this script is F A N T A S T I C ! ! !
Wow - thanks for this it has saved me hours of messing around manually doing the job!
Thank you.
Thank you! I've been desparate to find something that will allow me to use some of the more comlex sets I've bought. I'm going to try this now.