jim c Posted November 3, 2011 Share Posted November 3, 2011 I've got a character that is basically a single mesh, yet would have 3 -4 different materials on it, not all of which fall within the bounds a particular face, so creating a series of groups and assigning materials this way won't really work. But if I use the UV map and make a simple texture map of 3-4 primary colors,each of which represents the presence of a material, how hard would it be to come up with a master shader that takes the input of the color and then uses that to bring the results of the appropriate shader? For example, say you have a character with a form fitting suit, made up of a basic color, then panel insets that are another material, then a skin SSS material on the hands and face/head. You would paint a map using red, green, and blue for the appropriate areas. Now, is there a way that you could build a master material than links in the other arbitrary materials? The only way I'm aware of would be to create one huge shader and copy/paste the internals of existing shaders into it (assuming you could even do this). Or does this already exist? Quote Link to comment Share on other sites More sharing options...
jim c Posted November 9, 2011 Author Share Posted November 9, 2011 So 102 views? Do I take this to mean this is simply not possible? Have a done a poor job of phrasing the question? Is this something that's already in H11 (and I'm unaware of since I'm using H10)? Or is it that it's not useful at all? Quote Link to comment Share on other sites More sharing options...
tmdag Posted November 9, 2011 Share Posted November 9, 2011 (edited) If you want to use color as your guide in shader, you can simply import cd attribute in shader and with swich node, swich between desired materials Edited November 9, 2011 by tmdag Quote Link to comment Share on other sites More sharing options...
jim c Posted November 9, 2011 Author Share Posted November 9, 2011 OK, but how do you pull in the material? Would that mean you have to define the shader as a sub network within your main VOP node? Or can reference external shaders in there? For example: I have master material A. I have the specific materials B, C, D each defined in it's own material node in the SHOP. Is it possible to bring these (B,C, or D) into the VOP network in material A? Quote Link to comment Share on other sites More sharing options...
tmdag Posted November 9, 2011 Share Posted November 9, 2011 (edited) I have the specific materials B, C, D each defined in it's own material node in the SHOP. Is it possible to bring these (B,C, or D) into the VOP network in material A? yes, just copy/paste nodes Edited November 9, 2011 by tmdag Quote Link to comment Share on other sites More sharing options...
jim c Posted November 9, 2011 Author Share Posted November 9, 2011 So there's no way to reference the stuff, you have to explicitly copy/paste the whole VOP network for nodes B,C, and D, right? I guess I was hoping there was some sort of equivalent to the Object Merge SOP. Otherwise the shader get's kind of cumbersome. Quote Link to comment Share on other sites More sharing options...
tmdag Posted November 9, 2011 Share Posted November 9, 2011 You cannot reference shader within a shader but you could also group primitives and put few material sops based on your groups that will use different shaders Quote Link to comment Share on other sites More sharing options...
jim c Posted November 9, 2011 Author Share Posted November 9, 2011 OK, thanks. I'm aware of using groups, I wanted to avoid that. I wanted to use a texture map to define what parts of the model are affected so I'm not limited by the polygon topology. Oh well. Quote Link to comment Share on other sites More sharing options...
tmdag Posted November 9, 2011 Share Posted November 9, 2011 If you read color attribute from geometry, you are still limited to topology ( because it is a clolor per geo point and not shading point) Quote Link to comment Share on other sites More sharing options...
jim c Posted November 9, 2011 Author Share Posted November 9, 2011 That was not my original plan - the original plan was to read the color information from a texture map, not the color on the geo. The hope was to be able to reference external shaders without duplicating and embedding them in the master shader. Apparently that's not possible, so back to doing it the hard way. Quote Link to comment Share on other sites More sharing options...
edward Posted November 10, 2011 Share Posted November 10, 2011 Do you really have material boundaries that go "halfway" through a polygon? I personally would just split the polygon into two as a modeling operation and thus be able to do separate shader assignments. Quote Link to comment Share on other sites More sharing options...
jim c Posted November 10, 2011 Author Share Posted November 10, 2011 Sure, think of a somewhat complex suit pattern, like that character I'm working on in my Tron WIP. Or a character where you've modeled the clothing, like a tight top, or a cloth armband, or something like that, as part of a single mesh. You could retopologize the mesh but that's a PITA and potentially a lot of work. 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.