First of all, hi to everyone!
its my first post, and i just installed Houdini Apprentice and hope to make magic like the first famous Houdini lol
i already have 1 drive, with my textures of daily use. but i dont want to convert one by one,
since the .rat format is the more suitable for texturing, is there a command or a script for convert a folder into .RAT format?
other question:
Why convertion an image to .rat format, increases its size about 100%?
i just tested and convert a 9mb texture file and it jumped just to 90mb!
Thanx for any help or reply
Sty
Is possible to batch converter a folder of images to .RAT?
18540 11 1- Sty
- Member
- 101 posts
- Joined: 7月 2009
- Offline
- edward
- Member
- 7766 posts
- Joined: 7月 2005
- Offline
- edward
- Member
- 7766 posts
- Joined: 7月 2005
- Offline
PS. As for the file size, it depends on which format you're converting from. I think .rat files have no compression, explaining the big difference in file sizes. .rat files are also mipmaps (http://en.wikipedia.org/wiki/Mipmap) [en.wikipedia.org] so they will be about 1/3 larger than the original uncompressed size as well.
- mark
- スタッフ
- 2598 posts
- Joined: 7月 2005
- Offline
edward
The iconvert command line tool comes with Houdini for converting image files. So you can run a script that uses it. Using bash, it's a one liner:
for f in *; do iconvert $f ${f%%.*}.rat; done
You can also create a COP network with a File COP (to read the source image) and an output driver to save .rat files.
Or use mplay.
- Sty
- Member
- 101 posts
- Joined: 7月 2009
- Offline
- Sty
- Member
- 101 posts
- Joined: 7月 2009
- Offline
- edward
- Member
- 7766 posts
- Joined: 7月 2005
- Offline
- AndrewVK
- Member
- 136 posts
- Joined: 7月 2005
- Offline
- Sty
- Member
- 101 posts
- Joined: 7月 2009
- Offline
- Sty
- Member
- 101 posts
- Joined: 7月 2009
- Offline
- Sojwita
- Member
- 1 posts
- Joined: 8月 2009
- Offline
Here is an windows script. It will convert all image files in folder “c:\houdini\bin\” .
cd “c:\houdini\bin\”
var string list
lf -n “*” > $list
while ($list <> “”)
do
var str file ; lex “1” $list > $file
# Convert this $file.
var str ratfile ; sal -p “[^.^l” “.rat”
system iconvert $file $ratfile
done
You can add other arguments to the lf command to collect file list based on names, dates, sizes, etc. Similarly, you can change the sal command to make the rat file name include timestamp, etc.
The script is in the free version of biterscripting ( http://www.biterscripting.com [biterscripting.com] ) .
Sojwita
cd “c:\houdini\bin\”
var string list
lf -n “*” > $list
while ($list <> “”)
do
var str file ; lex “1” $list > $file
# Convert this $file.
var str ratfile ; sal -p “[^.^l” “.rat”
system iconvert $file $ratfile
done
You can add other arguments to the lf command to collect file list based on names, dates, sizes, etc. Similarly, you can change the sal command to make the rat file name include timestamp, etc.
The script is in the free version of biterscripting ( http://www.biterscripting.com [biterscripting.com] ) .
Sojwita
- Sty
- Member
- 101 posts
- Joined: 7月 2009
- Offline
-
- Quick Links