jim c Posted May 7, 2013 Share Posted May 7, 2013 The idea is to take the default Mantra surface shader and enhance a number of the inputs, like diff intensity, spec1 and spec 2 intensity, and have them be driven by a texture map. Then, just for kicks, create a COPs network that can generate some things like noise, etc and possible affect the texture map with this. Maybe do some stuff to the diff texture map and allow for things color tuning, etc. Then read in the COPs node, instead of the original texture map. So the question is: how do I set this up to allow it to be built as a digital asset? In the vex vop, you can't have nested SHOP/SOP/COP etc networks. So is there another way to do this? Quote Link to comment Share on other sites More sharing options...
stevegh Posted May 7, 2013 Share Posted May 7, 2013 I am building a general purpose shader modelled off of the V-Ray Material in Max, and the conclusion I've come to is to have a tab that has some basic procedural stuff like ramps/noise as I've seen done in other shaders, and then bounce into COPs if more fine tuning was needed. I imagine any procedural you want to add to the shader has to be thrown in there vs. having a map browser like Max. What WOULD be nice is if we started creating snippets of code that we could hook up to our shaders to propagate the UI on an as needed basis. IE I need another noise, hit the plus and all the menus for diffuse/refl etc. now have that map as an option to modify. I'm thinking this could be done with callbacks but I'm not that far yet. Quote Link to comment Share on other sites More sharing options...
jim c Posted May 7, 2013 Author Share Posted May 7, 2013 OK I think I have a possible solution. 1) create a subnet in the Shop context 2) add an Output Shaders Node 3) add a Surface Shader Builder node and wire into the output 4) add Displacement Shader Builder node and wire into output 5) copy/paste the relevant surface nodes from the Default Mantra Surface shader into the surface shader from (3) 6) ditto for the displacement stuff 7) add a COPs context into the subnet and add what you need there 8) reference it 9) make the subnet a Digital Asset 10) Profit! Quote Link to comment Share on other sites More sharing options...
jim c Posted May 7, 2013 Author Share Posted May 7, 2013 (edited) Sigh... this sort of works. But sometimes it gives me an error mantra: Unable to load texture 'op:/shop/MyMat/cops/NOISE_OUT when I reference the COP like so: op:`opfullpath('../../cops/NOISE_OUT')` Edited May 8, 2013 by jim c Quote Link to comment Share on other sites More sharing options...
jim c Posted May 8, 2013 Author Share Posted May 8, 2013 What WOULD be nice is if we started creating snippets of code that we could hook up to our shaders to propagate the UI on an as needed basis. IE I need another noise, hit the plus and all the menus for diffuse/refl etc. now have that map as an option to modify. I'm thinking this could be done with callbacks but I'm not that far yet. Yeah that would be cool. Please post how you get along with that. Quote Link to comment Share on other sites More sharing options...
stevegh Posted May 8, 2013 Share Posted May 8, 2013 Hey Jim, So I tried what you suggested and it works quite nicely. Created a new Surface SHOP type, dropped a COP net right next to it and created a noise inside. Threw them both in a subnet and promoted the noise parameters and voila full control over the procedural being generated in COPs at the DA level. Sweet idea dude! noiseMat.hip noiseMat.otl Quote Link to comment Share on other sites More sharing options...
Guest mantragora Posted May 8, 2013 Share Posted May 8, 2013 please mantra: VEX error: Unable to load file SH_Shader.vex Quote Link to comment Share on other sites More sharing options...
stevegh Posted May 8, 2013 Share Posted May 8, 2013 Apologies I am still a newbie. SH_Shader.otl Quote Link to comment Share on other sites More sharing options...
stevegh Posted May 8, 2013 Share Posted May 8, 2013 So Jim, I think when we see multiparm creation in vex things will get a lot easier, at least for me. Does anyone know the status of the RFE? All the threads I came across referenced it but none seem to have had an answer... 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.