Posted by: | engineeringa52 | |
Data created: | 7 September 2016 |
Hello all, I was wondering how to use the "Use Strand Groups for Material Ids' so that I can have regions that use miltiple shaders? Ex. ShaderList[0] - FeatherA,FeatherB,FeatherC ShaderList[1] - FeatherD,FeatherE,FeatherF ShaderList[2] - FeatherG,FeatherH,FeatherI etc.... I am using vray so is a way to pass a random scalar though each channel group then I can assign a single VrayShaderSwitchMTL to each and then pass along a random per strand id... ex: shaderSwitch=rand(0,2). Then plug "shaderSwitch" into my vray shader? or is there a better way? or additionally can you plug a channel operator in the Mesh From Strand node... so I can have multiple of those guys using my channel IDs ... that would work too... Maybe I can use the Shader Scatter Multiplier but it doesn't seem to intuative. thoughts? Thanks in advanced. Andy | |
7 September 2016
#10369 | |
Thanks Andy, we'll have a look at this and get back to you. Marsel Khadiyev (Software Developer, EPHERE Inc.) | |
7 September 2016
#10370 | |
Thanks, Havings support for vrayUserScalars would really help streamline the number of shaders as well. Vlado is also planning on adding VrayUserScalar support to their new multiSubTexture node... so instead of multiple shaders with different maps.. you can have one Uber hair(feather..etc) and have the maps switch based off of the scalar. very usefull on the look dev and maintaince side of things... thanks for looking into this. Andy | |
8 September 2016
#10376 | |
Hi Andy, I'm not quite sure I understand your question. If you need general help about how to use the shader list, I'd recommend this video that Marsel made (if you haven't seen it already): https://www.youtube.com/watch?v=uzNdLYhyygI also, here you can find how to use the "shader scatter multiplier": https://ephere.com/plugins/autodesk/maya/ornatrix/docs/1/Mesh_from_strands.html Let me know if this does not answer your question. Emil | |
8 September 2016
(updated 9 September 2016)
#10377 | |
Here is a bit more of a visual explanation. I want to be able to add another tier of randomization within a strand group vs blasting that strand group with 1 shader. I see this as being done a couple of ways. - first image = 3 shaders with out materialIDs checked - second Image = 3 shaders with materialIDs check... but I want to add another layer of randomness to each channel group. 1. simply add a channel operator to the existing Mesh from strands node so that I can have one for each strand group thus giving me the control to randomize within a channel group. 2. add some type of control to be able to specify the channel the shader is going to - ShaderStackingMockup_01.png 3. Even more powerfull be able to create VRayUserAttributes (this case a scalar) and assign a value on a per strand basis and make that available to vray. Thus letting vray use the scalar to choose which shader to switch to. Maybe this can be accessable in the VRayHairSampler?? There is also a vray texture switch that will soon support VrayUserScalar and that would simplify the number of shaders and allow a simular method of texture switching. 4. something even more creative I haven't thought of! :) does this make sense? | |
9 September 2016
#10380 | |
I got you. Well 2) is out of the question, this would totally break the way it all works right now. About VRayUserAttributes, I don't think you can pass functions to them as you are showing in the image (rand(0,2)). I think it expects one of (r,g,b,a),(r,g,b),(r). But using VraySwitchMtl is a good idea, so why not use it with another type of texture, say noise, instead of user scalar? I guess a noise could too provide some randomness for the switch mtl and you could tweak it until it's fine. Also, from your screens it seems you got something working with a VRaySwitchMtl.
Best, E. | |
9 September 2016
#10381 | |
Thanks for the Reply, is #1 an option? that would be great as well.... What you see in the screen grabs are just photoshop mockups so that I could illustrate my question a bit better. The vray user attributes can both be a color and scalar. The per strand random function was more of an ask as you guys would have to support some basic scripting functions to attach a random number to each strand...and expose it as a vrayUserAttribute (color or a single value). the swtich material expects a int or an approximation from a texture map which not impossible would be difficult to control. I am going to see if Vlado can get to the strand ID suing the vray hair sampler as there is a Texture node that can randomize within a range based off of IDs vray has access to. I'd love to keep the control in the procedural nature of things as that's the whole power of your system. :) The only way I can achieve this now is to create mutiple hair systems and cull out the unwanted hair generation in the hairfromguides node. This is not ideal as there is more groom continuity management across hair system... getting them to blend etc..... thanks for looking into this and maybe consider it for a larger release as having a better granular control of strand texturing would be great..... in the mean time i'm going to play around with noise functions and masking in other ways. | |
10 September 2016
#10386 | |
Hello, my name is Dimitar Toshev and I'm part of the V-Ray for Maya team responsible for our Ornatrix support. What you want can be achieved today, just not with user attributes. Connect a noise texture map as the input value of the Materials Switch attribute of your VRaySwitchMtl. Since the noise texture values are from 0 to 1, you'll want to multiply the output by the number of materials minus one. Meaning, if you have 3 materials in your VRaySwitchMtl, add a Multiply node, connect "Out Color R" to input1X, set input2X to 2, then connect outputX to "Materials Switch" of your VRaySwitchMtl. Make sure that in the "MeshFromStrandsNode" of your Ornatrix stack you've NOT checked "per-strand coordinates" under "Mapping coordinates". This ensures that every strand will have the same UV coordinates across all its faces (otherwise you'll get a random material across every strand, probably not what you want). If you also want to apply textures to your strands, add a second mapping channel by increasing "Map Channel Count" and configure one of the map channels to not be per-strand, then use the appropriate mapping channel for each texture by selecting the "place2dTexture" node connected to that texture, then in the Attribute Editor selecting Attributes->VRay->2D Placement Options, which will add under Extra Attributes an attribute called "Vray UV Set Name". Type in "mapN" where N is the number of the map channel, counting from 1. I'm attaching a sample scene with everything set up. | |
12 September 2016
#10390 | |
Thanks! looking at this now! Andy |