So I have a situation where I have a lot of images that needs to be loaded into VrayHDRI maps to be used in a scene. The problem is they are all at different aspect ratios and resolutions. In this case I can't control the aspect ratio of the textures with UV maps so I have to control it using tiling, but there's no way to do so automatically. So is there any way, with maxscript or other, to automatically calculate the aspect ratio of the loaded image and apply it to the VrayHDRI map? And if not, is this something that could be added? a simple checkbox for "keep aspect ratio" would save a lot of time.
Announcement
Collapse
No announcement yet.
Texture bmp aspect ratio
Collapse
X
-
Couldn't you make a Photoshop action that converts all images to a 1:1 ratio?
Comment
-
Changing the pictures in Photoshop would defy the purpose because the aspect ratio would still be wrong and the images would be squished in 3ds Max. Unless you were to crop them down to perfect squares, but that's not really an option either. I'm looking into doing it with Maxscript, but it maybe beyond my scripting abilities at this point.
Comment
-
If anyone is interested I managed to make a work-around. This script:
Code:macroscript AspectRatio category: "ShimaStuff" ( matName = sme.GetMtlInParamEditor() bmpName = matName.HDRIMapName tempBmp = openBitmap bmpName texHeight = tempBmp.height as float texWidth = tempBmp.width as float aspectRatio = texWidth / texHeight matName.coords.V_Tiling = aspectRatio )
Comment
Comment