Juraj Posted January 25, 2017 Share Posted January 25, 2017 Hello, Mantra during rendering is always converting all non-rat textures into rat and then discarding them after the render is finished. So I am considering batch-converting all of them to rat using the iconvert tool while keeping their original name and replacing only file extension. Batch conversion of textures is not a problem, but I am curious about re-linking them in shader networks. Arnold has an elegant solution for that - it checks if there is a .tx version of a texture and if so, it will use it and save some time. It also allows to do one-time conversion during the first use of a texture and then it will keep .tx version around inside the texture folder. So I am humbly hoping that there is somewhere hidden feature for this behavior also in Mantra. Any experience with that? Otherwise I can just scan all shading nodes in Houdini with python and replace texture file extensions for rat. Thanks, Juraj 1 Quote Link to comment Share on other sites More sharing options...
davpe Posted January 25, 2017 Share Posted January 25, 2017 Mantra, right now, has no feature like that one in Arnold... shame. as for replacing all the textures, the best is to make a setup that allows for easy replacement anytime, of course anyway, try 'opchange' in texport. it works like a search > replace for any strings in the scene so I suppose if you type something like... opchange -T SHOP exr rat ...you should get "rat" wherever was "exr" before. -T SHOP tells it to look at the shop networks only, check the docs for more info. cheers. 1 Quote Link to comment Share on other sites More sharing options...
Juraj Posted January 25, 2017 Author Share Posted January 25, 2017 Hi, thanks for great tips I will think about the converter, but to make it easy to use for artists I guess it will be a shelf tool where you will select a folder and the tool with scan all textures and convert them. I will check this opchange hscript command, seems to be good and easy choice for this task Quote Link to comment Share on other sites More sharing options...
lukeiamyourfather Posted January 25, 2017 Share Posted January 25, 2017 A Python script could make quick work of this problem looking at every parameter in the scene, calling iconvert (comes with Houdini) on the images, and change the path to the new image. Quote Link to comment Share on other sites More sharing options...
Guest tar Posted January 26, 2017 Share Posted January 26, 2017 It's worth running tests to see if the conversion to Rat is slowing anything down. Last time I checked EXR was just as fast. Quote Link to comment Share on other sites More sharing options...
davpe Posted January 26, 2017 Share Posted January 26, 2017 (edited) 13 minutes ago, marty said: It's worth running tests to see if the conversion to Rat is slowing anything down. Last time I checked EXR was just as fast. yes. not using rats slows down everything and it eats much more memory. with a few textures you may not even notice the difference but at some point your renders will become very slow and very memory hungry. I'm talking about differences like 4h/90gb ram/frame with exrs vs. 1h/40gb ram/frame with rats. These are made up numbers but I've seen this on some texture heavy projects. Edited January 26, 2017 by davpe Quote Link to comment Share on other sites More sharing options...
Guest tar Posted January 26, 2017 Share Posted January 26, 2017 @davpe how? Mantra converts to Rat - therefore it never uses other formats. Quote Link to comment Share on other sites More sharing options...
davpe Posted January 26, 2017 Share Posted January 26, 2017 yes. it converts the files and holds it in the memory while rendering. so not only converting alone for every frame can take quite a long time but also it can easily fill up your ram and then actual rendering runs on swap. Quote Link to comment Share on other sites More sharing options...
Guest tar Posted January 26, 2017 Share Posted January 26, 2017 that sounds like a bug then, it should convert to a rat, write that as a temp file then use that to continue rendering. There is no reason to hold the original in ram. Quote Link to comment Share on other sites More sharing options...
davpe Posted January 26, 2017 Share Posted January 26, 2017 exactly. and it would make even more sense not having to do it for every frame. Quote Link to comment Share on other sites More sharing options...
Guest tar Posted January 26, 2017 Share Posted January 26, 2017 this env variable is pretty useful then: MANTRA_NONRAT_ERROR Quote Normally, mantra will automatically convert texture files that are not in .rat format to .rat format internally - which can slow down render startup. To disable automatic conversion to .rat format and instead print out an error when textures are not in the native format, set this variable. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.