abvfx Posted March 2, 2010 Share Posted March 2, 2010 (edited) Hey there, I wanted to build a convenience shader that would allow anyone using it to plug a texture in, and you can convert it into a rat file if you wanted. Is this possible using VOPs? I was thinking the inline code vop? But i dont know the node which allows you to have a button to execute code from another node? Is this possible? Thanks. edit:// or should i just use COP's to lay down a file, and then a ROP file output? It would be great to embed that functionality into a shader to save the user going anywhere. Edited March 2, 2010 by phrenzy84 Quote Link to comment Share on other sites More sharing options...
edward Posted March 3, 2010 Share Posted March 3, 2010 For the last little while, Mantra has been converting all non-rat textures into rat files at render time anyhow. So I'm not sure that you would save anything here. Quote Link to comment Share on other sites More sharing options...
abvfx Posted March 3, 2010 Author Share Posted March 3, 2010 yeah thats the thing. Like most people i convert them before i start a session, because i hate waiting at rendertime, plus i get the feeling its actually longer then if i do at the command line. So picture a shader with a tab <Texture conversion> plug in your texture, convert and specify a location of just simply put it in the same hip directory would make things more simpler. Plus it allows a bit more spontaneity since you dont always have a specific texture in mind for a job. Maybe it might be simpler to write a python shelf tool that just opens a dialogue where you navigate to a file and then specify a directory for the rat to be placed in, but to have it in a shader would really be useful. Quote Link to comment Share on other sites More sharing options...
mrice Posted March 3, 2010 Share Posted March 3, 2010 So picture a shader with a tab <Texture conversion> plug in your texture, convert and specify a location of just simply put it in the same hip directory would make things more simpler. Plus it allows a bit more spontaneity since you dont always have a specific texture in mind for a job. Take a look inside my prototype_material, I did exactly what you're describing. Its two cop nodes, with a bit of python that will find any textures without a .rat extension in the shader. Quote Link to comment Share on other sites More sharing options...
abvfx Posted March 4, 2010 Author Share Posted March 4, 2010 michael.. thank you. I checked out the video and that is exactly what i am looking for. The shader itself is pretty amazing, but its baby steps for me at the moment and i will check out that python code. Python is easier to understand off the bat than i first thought, hopefully i wont freak when i see it . Thanks for sharing. 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.