Shader operations

This should be simple, but can I drag a shader from the Browser (My Shaders) onto a group or only onto each child one at a time?

Also, why can't I drag a shader onto the Properties window instances (groups)?

Comments

  • DartanbeckDartanbeck Posts: 21,583
    hrpschrd said:

    can I drag a shader from the Browser (My Shaders) onto a group or only onto each child one at a time?

    The easiest method I know of is to have the same shader in every child, then open that shader to edit it in the texture room, and drag the shader from the browser onto it's Top level. It will change that same shader everywhere else it exists.

    In some cases, within the Instances try but above it by where the shader is, we can appy the shader there and then click on Apply to Children. I've only ever done it once, a long while back, and noticed that this doesn't show up in all situations. Maybe only items in a group?

    Another thing I've never tried is to drag a single shader onto the big multi-colored ball icon on the top of a material zone list of a figure. Would this apply that shader to all zones? I don't know.

    An example: I bring in Genesis 1 (not a character preset), then Edit > Remove Unused Masters > Consolidate Duplicate Shaders

    Now I look in the shaders tray on the right to reveal that there are actually very few shaders - mostly eye parts. Everything else shares the same, blank shader. 

    If I open that shader and make changes to it, those change are made to everything that uses that shader.

    When I open a shader in the texture room, the first thing I see is the top level of the shader with a list of channels below it. If I wish, I may drag a shader from my browser onto that top level to change the entire shader or I can double-click the shader from the browser to only open it and drag things from it into the shader I'm working on. Ctrl + Drag will copy the channel, just dragging will move the channel. Very useful.

    If I do double-click a shder from the browser, I no longer see my list of zones. By clicking on the instances tab on the right, and selecting Actor, they appear again.

  • DartanbeckDartanbeck Posts: 21,583
    hrpschrd said:

    why can't I drag a shader onto the Properties window instances (groups)?

    You can if you drag it onto an item that can take the shader. In other situations, simply switch to the Shader tab (bottom right) and drag them into there. Same thing with Clips. We can't drag an NLA Clip from the browser onto a figure. We first have to drag it into the Clips tray.

  • hrpschrdhrpschrd Posts: 180
    edited December 2017

    Thanks but I don't follow. I was not specific enough.

    I want to change the color (shader) of groups of objects with time in an animation. I have two shaders created in the Properties (bottom right) window. I have also created the same shaders in the Browser window but I dont know which to use. 

    I know I can click on the edit button in the shader window (top right) and select one of my shaders and even apply to a group. I think I am changing the master shader though because I cannot change it with time in the sequencer. Any help out there?

    Post edited by hrpschrd on
  • DartanbeckDartanbeck Posts: 21,583
    edited December 2017

    Absolutely. I must admit that I'm lost when you say:

    hrpschrd said:

    I have also created the same shaders in the Browser window but I dont know which to use. 

    But to change shaders during an animation, lets look at it three ways.

    The first is that we can change individual setting within a channel along the timeline - but I think you know that already. Simply open each channel that needs a change at the appropriate spot in the timeline, and make the change. But this only works for certain settings, like those that have a value input or slider, etc.,

    If we need to change something that otherwise cannot be edited, like swapping a Texure Map, for example, or even changing from Noise to Patterns, or whatever, we can use the Multi-Layer shader function (Operations > Mullti-Layer), which has an opacity slider for each layer - so we can use as many layers as we want and swap out function by altering their layer opacity. This method is REALLY powerful because we are not limited to how many things we change in one channel, and have incredible control over the change.

    The full blown (third) way is to actually swap shaders over time. I love that we can do this! ;)

    This method is nice because it's so incredibly simple compared to the above, second, method - although we can use that method in this method too! Check it out:

    With the first shader (in time) opened in the Texture room, and still at the Top Level, change the Top Level shader from Multi Channel to Multi Channel Mixer (Top Level > Advanced Operations > Multi Channel Mixer)

    Now that shader that we just had open will be Source 1 in the Multi Channel Mixer, which also has another Multi Channel Shader as Source 2, but it's just a blank default.

    Drag your second shader (the whole thing by dragging the Top Level) into the top level of Source 2

    To easier see what's going on, we can collapse Source 1 and Source 2 

    We see under the two Sources that we have a third channel: Blender (or is it called Mixer?)

    The straight-forward way to blend them over time (the only way I've done it so far) is to use a Value 1-100

    When the slider is all the way to the left (0) we're using Source 1 at full strength, and Source 2 is not used at all

    When the slider is all the way to the right (100) we're using Source 2 at full strength, and Source 1 is not used at all

    Everywhere in between is a blended difference between Source 1 and 2.

     

    MultiLayerShaderFunction.jpg
    651 x 564 - 255K
    MultiLayerShaderPanel.jpg
    845 x 526 - 241K
    Post edited by Dartanbeck on
  • hrpschrdhrpschrd Posts: 180

    Thanks. I will try the third way. I was only thinking of jumping from one color to another over time but a gradual shade is better!

  • DartanbeckDartanbeck Posts: 21,583
    hrpschrd said:

    I was only thinking of jumping from one color to another over time

    That's easy using the first option. Just change the color in the color channel over time.

  • hrpschrdhrpschrd Posts: 180
    edited December 2017

    Actually, I don't know how to do that. I may have my shaders set up wrong. With the timeline showing, how do I pull a shader onto the new point along the timeline for an object?

     

    (BTW, have looked but don't know how to generate image file and paste into Forum.)

    Post edited by hrpschrd on
  • DartanbeckDartanbeck Posts: 21,583

    To see the keyframe of a shader, you need to scroll waaaaay to the bottom portion of the list in the timeline under: Master Shaders.

    So here's what we do:

    1. Set up the initial color shader at the first frame in the timeline
    2. Go to where we want the full change in the shader to be in effect along the timeline
    3. Open the shader and make the change (changing the color or value of a channel is fully animation-friendly)
    4. Scrub back to the first frame in the timeline to see that the original color is still intact
    5. Scroll to the very bottom of the list in the Sequencer under Master Shaders and see that there is a keyframe where the change takes place

    While we're looking at the keyframe, lets discuss tweeners. For a gradual persistent change we can use Linear but if we want the change to be more dramatic we might opt of Bezier. If all we want is linear but want to deley the start of the change or delay the end of the change, we have Ease-In and Ease-Out controls on the Linear Tweener.

    If we need a blinking change we can use the Oscillate tweener, which has several options for how the change oscillates. If we need the change to be more random and haphazard, Noise is a great choice - again with multiple options.

    If we want and incredibly abrupt change happening only when the keyframe is reached, use Discreet.

  • VyusurVyusur Posts: 2,235

    Dart, you are a great teacher!

  • DartanbeckDartanbeck Posts: 21,583
    Vyusur said:

    Dart, you are a great teacher!

    Thanks! I try to help when I can ;)

  • hrpschrdhrpschrd Posts: 180

    I am unable to follow your directions because when I edit the shader color I get a message that I am about to edit the Master. How can I edit the shader without editing the Master? I have the same instructions from PhilW in his tutorials with the same problem.

  • DartanbeckDartanbeck Posts: 21,583
    hrpschrd said:

    I am unable to follow your directions because when I edit the shader color I get a message that I am about to edit the Master. How can I edit the shader without editing the Master? I have the same instructions from PhilW in his tutorials with the same problem.

    Look at it like this:

    • If you want the change to occur over everything that uses that shader, then Edit the Master
    • If you only want the change to occur on what is selected, then Create New

    So it's not a poblem, just a simple safeguard and helpful assistant. Like PhilW says, it's wise to not disable this message so that we can always choose which occurs. Even if we "Always" decide to edit the master, we'll eventually come to a point when we want to instead make a new shader.

    The same message pops up if we try to make certain changes to a duplicated item. If we choose to Create New, we isolate that duplicated item as its own object, so it's no longer a memory-saving identical digital copy f the rest of them. But if we Edit the Master, the changes we make will occur across all items using that digitally-copied piece.

    I simple test:

    When we Consolidate Duplicate Shaders and end up with (just for example) 5 shaders, and one of those shaders is now being used in several material zones, we're saving computer resources as well as render computations.

    Now, if we go to edit that shader, the message you mention pops up and asks if we want to Edit the Master or make a New one. If we select to Create New, we'll now have 6 shaders and only the material zone you have selected will get the new shader you're about to edit. So if you want edits on the other zones that were using the original shader before editing it, you'd have to go into that shader again and once again decide if you want to change the shader for everything using it (Edit the Master) or only the selected material zone (Create New)

    I hope this helps

  • Shaders was a bit hard for me to learn when i started with Carrara because i didn't really knew what all these options are doing but with the tutorial, the help of the community and trying out is a good way to learn how they work.
    As me goes, i always like to use just one shader for everything like one shader for all face parts, one shader for all body parts, one shader for all limbs, if i like to change a shader like the lips because i want them more glossy, than i just go to the model room, use edit the master, than select the menu of the right side of the lips, scroll down and create a new master.
    Than i just open the fase shader, copy the full shaders and paste them into the lips shader and do my changes there, than you have a seperate shader for just the lips for example.
    The same thing can be done for finger and toenails because there are some limb textures that doesnt have the nails textures on as they are on a seperate image.

  • DartanbeckDartanbeck Posts: 21,583

    Shaders was a bit hard for me to learn when i started with Carrara because i didn't really knew what all these options are doing but with the tutorial, the help of the community and trying out is a good way to learn how they work.
    As me goes, i always like to use just one shader for everything like one shader for all face parts, one shader for all body parts, one shader for all limbs, if i like to change a shader like the lips because i want them more glossy, than i just go to the model room, use edit the master, than select the menu of the right side of the lips, scroll down and create a new master.
    Than i just open the fase shader, copy the full shaders and paste them into the lips shader and do my changes there, than you have a seperate shader for just the lips for example.
    The same thing can be done for finger and toenails because there are some limb textures that doesnt have the nails textures on as they are on a seperate image.

    Me too. All of it.

  • hrpschrdhrpschrd Posts: 180
    edited December 2017

    Thanks, that gets me started but the next step stops me. I create a new master shader later on the timeline for object 1. Now I want to make object 2 have the second shader at a later time, and so on with more objects. I now have the two shaders I want. I can't seem to paste the shader onto object 2. If I change the shader of object 2 (which has the original shader) then the original changes. Do you mean I have to create a new master shader for every object everytime I change it on the timeline?!

    Post edited by hrpschrd on
  • DartanbeckDartanbeck Posts: 21,583
    hrpschrd said:

     I create a new master shader later on the timeline for object 1.

    The new Master is the shader, no matter where you are in the timeline. We cannot actually change which shader is used along the timeline but we can use the information from one shader in another shader and animate the change.

    hrpschrd said:

    I now have the two shaders I want. I can't seem to paste the shader onto object 2. If I change the shader of object 2 (which has the original shader) then the original changes. Do you mean I have to create a new master shader for every object everytime I change it on the timeline?!

    I'm lost. This is going in circles. Perhaps if I knew the objective I could help better.

    Like I said above, we cannot actually swap which shader anything uses. That's why I explained using the Multi-Channel Mixer. Source 1 can contain an entire shader setup and Source 2 can contain another and we can animate the change using the Blender. We're not changing the master shader in the process.

    If Object 2 requires an entirely different change, yes... it will need a new shader. If it changes the same as Object 1, no... just select the shader used in Object 1 for Object 2.

    If we change a shader - it's a changed shader. We cannot expect to have Object 1 be red while Object 2 is blue using the same shader. We actually could by using some global positioning or other things, but we were talking about changing colors.

    So if O1 needs to be blue at the same time O2 needs to be red, but both of them change color at the same time, We could copy the shader for O1 into O2 and change the colors at the same points in the timeline where we make the change: Start with frame 0 and change blue to red, then go to where it changes in the timeline and change the color to what you need. That would be an example of a new Master shader. It's just like the previous Master shader, but it cannot be because the colors are entirely different.

    If, however, the colors and the changes are the same, and the shader can properly map to the object(s) in question, we can simply use the same shader. I have no clue what you mean by this:

    hrpschrd said:

    I can't seem to paste the shader onto object 2.

    Wherever we see the name of a shader in a panel of an object, we can use the neighboring drop-down menu to select a different shader. If you wnt to Paste the contents of one shader into the next so that you can then make changes to it,

    • Open the shader you need to Copy
    • While in the Top Level of the Shader, Right-click in the top panel of the top level and choose "Copy"
    • Go to the Top Level of the next shader, Right-click in the top panel of the top level and choose "Paste"

    That operation would give you two identical shaders. So if the shader you've just pasted into isn't going to need to be changed, we could bypass that entire thing and just use the copied shader instead of making a new one.

    If the changes have to take place at a different point aong the timeline - we need a new Master Shader, because it's different. 

  • hrpschrdhrpschrd Posts: 180

    If Object 2 requires an entirely different change, yes... it will need a new shader. If it changes the same as Object 1, no.

    I am doing something very basic. I changed O1 from blue to red at 1 sec. Then I want O2 to change at 2 sec. and so on.

    The question is not what to do but how?

    I have O2 selected and red shader selected but I cannot drag the shader onto the timeline or onto the shader panel. How exactly do I  

    .. just select the shader used in Object 1 for Object 2 

    (Easy for you to say.;-) 

  • DUDUDUDU Posts: 1,945
    edited December 2017

    You selected “Color” in texture room, you have a colour palette, you choose the first color with your mouse (blue), that corresponds to the first keyframe of the timeline of the shaders.
    If you want to make changes in “Cut”, you must duplicate the first keyframe and drag it at the image 23 (ALT/Drag), then you places your cursor on the image 24, you change the color in texture room by changing the color of your pallet (Red), which will create a new keyframe automatically. Repeat that as much as you want…

    PS: I'm not on my work computer , if it's not Alt/Drag, it's Ctrl/Dragsmiley

    Post edited by DUDU on
  • PhilWPhilW Posts: 5,145

    If the two objects that you are changing color point to the same Master Shader, then they will change color at the same time. They are referring to the same Shader, so they will change together, If you want them to change at different times, you will need a separate Shader ("Master Shader") for each different change that you are making. The shader definition can be essentially the same, you are just adjusting when the change takes place for each.

  • hrpschrdhrpschrd Posts: 180

    That is the answer, even though I don't like it. Every object needs a separate Master Shader if it changes color independently. Thanks PhilW. Where would i have found this in your Learning Carrara 8.5?

  • DartanbeckDartanbeck Posts: 21,583
    hrpschrd said:

    Every object needs a separate Master Shader if it changes color independently. 

    Yup. I kinda said that, but with a lot more... I was confused.

    But don't think of this as a bad thing - especially if their just simple color shaders - but even if they're really elaborate. Here's the thing:

    For animated video work, it's commonplace in major studios to do very short scene sequences. To further "tell the story" visually, it helps dramatically to switch to another angle, which is actually an entirely new scene - a whole new render. Then they stitch the various animations together in the final edit in a way that draws the viewer along an approprite path to 'feel' the truth of the story - visually.

    That being said, I know that I'm always harping on people to Edit > Remove Unused Masters > Consolidate Duplicate Shaders to keep the shader list to a minimum.

    That doesn't seem to apply to this particular case because it doesn't sound to me like you have tens and tens and tens of shaders accumulating as you're working. I preech the above because adding content from a Poser or DS library can and will eventually bog down our workflow and leave us with an overabundance of shaders in our shader tab that can easily be resolved by consolidating.

    Now, with that being said too, there's nothing wrong with adding more shaders when we need to. 

  • DartanbeckDartanbeck Posts: 21,583
    hrpschrd said:

    Every object needs a separate Master Shader if it changes color independently. 

    Yup. I kinda said that, but with a lot more... I was confused.

    But don't think of this as a bad thing - especially if their just simple color shaders - but even if they're really elaborate. Here's the thing:

    For animated video work, it's commonplace in major studios to do very short scene sequences. To further "tell the story" visually, it helps dramatically to switch to another angle, which is actually an entirely new scene - a whole new render. Then they stitch the various animations together in the final edit in a way that draws the viewer along an approprite path to 'feel' the truth of the story - visually.

    That being said, I know that I'm always harping on people to Edit > Remove Unused Masters > Consolidate Duplicate Shaders to keep the shader list to a minimum.

    That doesn't seem to apply to this particular case because it doesn't sound to me like you have tens and tens and tens of shaders accumulating as you're working. I preech the above because adding content from a Poser or DS library can and will eventually bog down our workflow and leave us with an overabundance of shaders in our shader tab that can easily be resolved by consolidating.

    Now, with that being said too, there's nothing wrong with adding more shaders when we need to. 

  • DartanbeckDartanbeck Posts: 21,583

    So let's look at this:

     

    hrpschrd said:

    If Object 2 requires an entirely different change, yes... it will need a new shader. If it changes the same as Object 1, no.

    I am doing something very basic. I changed O1 from blue to red at 1 sec. Then I want O2 to change at 2 sec. and so on.

    I have a very convenient workflow for you - I think.

    If everything in the shader is the same except for the timing, we can simply

    1. Copy and Paste the shader within the Shader tray (resulting in a new shader in the tray)
    2. Find the new Shader in the Master Shaders portion at the bottom of the list in the Sequencer
    3. Drag the keyframe in the shader to the desired point along the timeline
    4. Assign the new shader to the object that needs it

    Now you can even go back into the new shader and change the colors if you want. Just keep in mind that, if we make a change where there isn't already a keyframe, we'll get a new one added.

    So with this in mind, if we're going to need twelve animated color shaders, each with a different timing, we can copy the first shader and paste it in the shader tray. Then select both of those and copy/paste those resulting in 4 shaders. We could just keep pasting until we have 12, or we could now select all four, copy those, and paste them to get eight, then paste once more to get twelve. If we needed 14, we could paste once more and either keep the extra two in reserve or simply delete them.

    Now with the proper number of shaders needed, we can easily scroll down to them in the Sequencer list and drag around the keyframes in time to get what we want.

    This can be a much easier way to work, even if we have more things to hange than the placement of the keyframes too - simply because we have the shaders in the tray already. Now all we have to do is set them how we want them to be.

  • DartanbeckDartanbeck Posts: 21,583

    Please note that there's even an easier way if we're setting this up early enough in the project:

    Copy the Object in the instances tray, and Paste it. It will come in with it's own, new shader already assigned to it - ready to be edited as I mention in the above post.

    Duplicating the object will NOT give you a new shader, but Copy/Paste will yes

  • hrpschrdhrpschrd Posts: 180

    Dart;

    My work is simple enough that I can afford to use ten shaders. It just seemed awkward and wasteful to me. 

    On the other hand, I cut and paste comprehensive answers like this to a lessons learned file, so your thorough answer is not wasted.

    Thanks very much.

  • hrpschrdhrpschrd Posts: 180
    edited December 2017

    Why is this so complicated!? I still don't understand.

    I created ten shaders for my nine objects and when I wanted a object to change to red, I made another shader that was red. I got a mess.

    Can someone go step by step to help me? I want nine objects to start blue then morph to red, one at a time. Simple?

    Post edited by hrpschrd on
  • PhilWPhilW Posts: 5,145
    edited December 2017

    You can't change an object from one Shader to another on the timeline - I suspect this is what you are trying to do.

    What you can do is to change an individual Shader on the timeline to create a Shader which changes color (or anything else, but let's stick to Color!).

    I am not sure of your scene but let's say that it has nine identical objects which need to change from Yellow to Red in sequence.

    Create one object and apply a Yellow Shader.  Don't create the other objects yet (this won't apply if they are not identical).

    At the one second mark (assuming you want the change at one second) go into the Yellow Shader and make it Red by changing the color swatch under Color.

    If you run the animation, you will most likely see the object start as Yellow and then smoothly change to Red over the first second. If that is what you want then fine, but if you want an immediate change you can click between the two key frames that you will see in the animation timeline at the bottom for that Shader. This allows you to change the Tweener - how the change takes place. The default will either be Linear or Bezier, and for an immediate change you want to change that to Discreet.

    You can then Copy and Paste your object until you have nine objects. By Copy and Pasting rather than duplicating, you will have created copies of the Shader as well. If the first was called Shader, the second will be called Shader 1, the next Shader 2 and so on.

    You will see that each has a keyframe on the timeline. You can now drag the keys to where you want the changes to take place - every second or whatever you want.

    And that should be it. I hope that helps.

    Post edited by PhilW on
  • DartanbeckDartanbeck Posts: 21,583

    Step by Step

    A - Make Object 1

    Making the shader for Object 1:

    1. Open the shader in the Texture room and set the Color to Blue
    2. With the shader still open, move the timeline scrubber to where you need it to be completely changed to Red
    3. Click the color chip and change the color to Red

    When we go back to frame 0 in the timeline, the shader should now be blue and when we advance the time to where we changed it to red, the shader should be red.

    B - Make Object 2

    1. Back in the Assemble Room, select Object 1 from the Instances Tray
    2. Copy (Ctrl C/Cmd C)
    3. Patse (Ctrl V/Cmd V)
    4. Change the name to Object 2 and take note of the name of the shader
    5. Scroll down the list in the Sequencer toward the very bottom of the list, under Master Shaders and find the shader for Object 2
    6. Look along the timeline to fing the keyframe for the shader
    7. Select the keyframe and slide it to a new position in time
    8. If we want the change to be more abrupt, we may also slide the keyframe from frame 0 to the right to have it start changing later in time

    C - Make Object 3

    1. Still in the Assemble Room, select Object 2 from the Instances Tray
    2. Copy (Ctrl C/Cmd C)
    3. Paste (Ctrl V/Cmd V)
    4. Change the name to Object 3 and take note of the name of the shader
    5. Scroll down the list in the Sequencer toward the very bottom of the list, under Master Shaders and find the shader for Object 3
    6. Look along the timeline to fing the keyframe for the shader
    7. Select the keyframes and slide them to new positions in time

    D - Make Object 4

    1. Still in the Assemble Room, select Object 3 from the Instances Tray
    2. Copy (Ctrl C/Cmd C)
    3. Paste (Ctrl V/Cmd V)
    4. Change the name to Object 4 and take note of the name of the shader
    5. Scroll down the list in the Sequencer toward the very bottom of the list, under Master Shaders and find the shader for Object 4
    6. Look along the timeline to fing the keyframe for the shader
    7. Select the keyframes and slide them to new positions in time

    Repeat until all objects and shaders are made yes

  • hrpschrdhrpschrd Posts: 180
    edited December 2017
    PhilW said:

     

    Thanks everyone for your help. It is not as complicated as I thought, just have to be careful. 

    Post edited by hrpschrd on
Sign In or Register to comment.