Chaos Corona Forum
General Category => Porting and API => [Archive] Chaos Corona for Maya => Topic started by: hugojackson18 on 2015-08-01, 14:12:15
-
Hey, could someone explain to me how to create the tx files from the maketx.exe and what the correct workflow is please?
I've got a few 8k maps (4 exactly at the moment) and sometimes the render just take forever to do the first pass... I don't really know why.
Thanks!
EDIT: I've got those 4 file nodes connected to multiple shaders. Don't know if that makes a difference but just putting it up here. Should save memory normally
-
Create tx files with:
import makeTx as mk
mk.optimizeFileTextureNodes()
The translator looks for a file ending with .tx for the image file in the same locatino and if he finds one, it takes the tx file.
-
Thanks haggi. Is this to put in the script editor? Will it create tx files out of all the files in the hypershade?
And you said something in the manual about the extension needed to be .exr. I didn't understand this part. Do the files need to be exr to be correctly converted to tx or does the tx files need to be changed to a .exr extension to be recognised?
-
Yes, this part of the manual is not yet clear.
The maketx.exe program which converts images to tx files normally works with tif files. Unfortunatly this default behaviour does not work on windows correctly, I suppose that't because of the used tiff library. So what the script does it to create an exr - tx file for ever file texture in maya. It is then called after the original name with the extension ".exr.tx", e.g. if you have a texture file called "test.jpg", the result will be test.jpg.exr.tx".
In other words: place the two lines into a python tab in the script editor and execute it. In the output windows you should see a listing which files are used and you can see if your tx files are used as expected.
-
Amazing thanks a lot haggi, I shall try this tonight.
What kind of performance increase are we looking at with tx files?
-
I'm getting this error when I run the script....
In the script editor
Y:\Users\Hugo\Documents\maya\mayaToCorona\bin\makeTx.exe -v -oiio -o E:/PERSONAL PROJECTS/BEDROOM/sourceimages/stanmoreSpeaker/export_2.0/stanmore1002_specular.tif.exr E:/PERSONAL PROJECTS/BEDROOM/sourceimages/stanmoreSpeaker/export_2.0/stanmore1002_specular.tif
# Error: mtCoronaLogger : Conversion failed #
And this in the ouput window
TIFFReadDirectory: Warning, E:\PERSONAL PROJECTS\BEDROOM\sourceimages\stanmoreSpeaker\export_2.0\stanmore1002_normal.tif: wrong data type 7 for "RichTIFFIPTC"; tag ignored.
-
Hmmm... was the tx file created? That's only a warning.
-
No nothing was created unfortunately....
-
It is possible that this has something to do with the general tif format problem. Could you please try to convert the tif file into something else, e.g. exr, tga, png and try again?
-
I've tried with a png too, and had the same message. I'll try again tonight
-
Any chance that you can send me the file?
-
Absolutely. I will send you some of them tonight as soon as I'm home!
-
The files are 96mb....
-
I've tried with a very simple file in a brand new scene, and it still fails to convert to tx
-
I'll check it. Could you give me your simple scene just in case you do something else than me?
-
Here you go.
Just to be clear, the only thing i have to do is put those 2 lines of code into the script editor, python and run it, right?
-
Yes, exactly, that should work. I'll have a look.
-
Oh, yes, I simply oversaw that you path to the image files contains spaces what is often a source for problems. I fixed the script and in the next release it will work better. Meanwhile you can simply put the texture in a path which contains no spaces.
-
no waaaay, bloody stupid spaces. I never spaces at work on Linux but Windows is full of them... I'll be careful with this. Thanks!
-
Right so I managed to create the tx files, replaced the file paths but it's still pretty slow. I don't understand why on the benchmark scene, I can render the whole thing in 2min but a simple scene with one object takes forever...
-
Which benchmark scene do you mean?
-
Alpha 1,0 benchmark. On my computer it's really fast, but in my simple scene, with 4 8k maps tx, it takes forever. i dont understand