Author Topic: TX Files  (Read 19965 times)

2015-08-01, 14:12:15

hugojackson18

  • Active Users
  • **
  • Posts: 36
    • View Profile
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
« Last Edit: 2015-08-01, 14:46:00 by hugojackson18 »

2015-08-02, 16:36:19
Reply #1

haggi

  • Moderator
  • Active Users
  • ***
  • Posts: 335
    • View Profile
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.

2015-08-03, 15:43:40
Reply #2

hugojackson18

  • Active Users
  • **
  • Posts: 36
    • View Profile
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?

2015-08-03, 15:55:42
Reply #3

haggi

  • Moderator
  • Active Users
  • ***
  • Posts: 335
    • View Profile
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.

2015-08-03, 19:57:22
Reply #4

hugojackson18

  • Active Users
  • **
  • Posts: 36
    • View Profile
Amazing thanks a lot haggi, I shall try this tonight.

What kind of performance increase are we looking at with tx files?

2015-08-03, 21:09:45
Reply #5

hugojackson18

  • Active Users
  • **
  • Posts: 36
    • View Profile
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.

2015-08-04, 00:12:08
Reply #6

haggi

  • Moderator
  • Active Users
  • ***
  • Posts: 335
    • View Profile
Hmmm... was the tx file created? That's only a warning.

2015-08-04, 00:54:13
Reply #7

hugojackson18

  • Active Users
  • **
  • Posts: 36
    • View Profile
No nothing was created unfortunately....

2015-08-04, 11:30:44
Reply #8

haggi

  • Moderator
  • Active Users
  • ***
  • Posts: 335
    • View Profile
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?

2015-08-04, 14:55:52
Reply #9

hugojackson18

  • Active Users
  • **
  • Posts: 36
    • View Profile
I've tried with a png too, and had the same message. I'll try again tonight

2015-08-04, 15:46:28
Reply #10

haggi

  • Moderator
  • Active Users
  • ***
  • Posts: 335
    • View Profile
Any chance that you can send me the file?

2015-08-04, 15:49:38
Reply #11

hugojackson18

  • Active Users
  • **
  • Posts: 36
    • View Profile
Absolutely. I will send you some of them tonight as soon as I'm home!

2015-08-06, 23:11:15
Reply #12

hugojackson18

  • Active Users
  • **
  • Posts: 36
    • View Profile
The files are 96mb....

2015-08-06, 23:14:02
Reply #13

hugojackson18

  • Active Users
  • **
  • Posts: 36
    • View Profile
I've tried with a very simple file in a brand new scene, and it still fails to convert to tx

2015-08-07, 09:53:41
Reply #14

haggi

  • Moderator
  • Active Users
  • ***
  • Posts: 335
    • View Profile
I'll check it. Could you give me your simple scene just in case you do something else than me?

2015-08-13, 23:49:27
Reply #15

hugojackson18

  • Active Users
  • **
  • Posts: 36
    • View Profile
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?


2015-08-14, 09:41:12
Reply #16

haggi

  • Moderator
  • Active Users
  • ***
  • Posts: 335
    • View Profile
Yes, exactly, that should work. I'll have a look.

2015-08-16, 13:32:00
Reply #17

haggi

  • Moderator
  • Active Users
  • ***
  • Posts: 335
    • View Profile
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.

2015-08-20, 00:14:45
Reply #18

hugojackson18

  • Active Users
  • **
  • Posts: 36
    • View Profile
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!

2015-08-25, 02:03:09
Reply #19

hugojackson18

  • Active Users
  • **
  • Posts: 36
    • View Profile
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...

2015-08-25, 12:40:51
Reply #20

haggi

  • Moderator
  • Active Users
  • ***
  • Posts: 335
    • View Profile
Which benchmark scene do you mean?

2015-09-03, 18:54:53
Reply #21

hugojackson18

  • Active Users
  • **
  • Posts: 36
    • View Profile
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