Control a ColorRamp Outside of a Node Group (Blender Tutorial)

Поділитися
Вставка
  • Опубліковано 11 вер 2024

КОМЕНТАРІ • 88

  • @ShangFengYang
    @ShangFengYang Рік тому +4

    Thank you for your awesome Blender tutorials. I always learn a lot from them!
    My last comment somehow disappeared right after I submit it 24+ hours ago. I can not even find it in my comment history. The following is from my unreliable memory of what I wrote in that comment minus a reference link to an Blender Artists post which inspires the solution but somehow triggers UA-cam's automatic "filtering".
    Actually, it is possible to control both the position and color for the color stops in the original color ramp directly using drivers without creating the masks for the color stops and mixing them afterwards.
    For the "Position" part, it is quite simple. It can be done either by your approach, or, probably a little bit more easily, by right-clicking on, say, the "Color 1 Position" field of the node group node, selecting the "Copy as New Driver", and then pasting it to the "Position" field on the color ramp node inside the group of the corresponding color stop using the "Paste Driver" option from the context menu.
    For the "Color" part, it is not so straight-forward. Directly editing the driver of the color field in the color ramp node inside the group would lead to the "driver editor" with a graph-editor-like interface. Instead, the driver should be created for individual "channels" using either "RGB" mode or the "HSV" mode of the color picker. For example, to control the color of the color stop 1 (which has an index of 0), do the following steps:
    1. From outside of the node group, right click on the "Color 1" field to open the color picker for color 1. Switch to the "RGB" mode in the color picker.
    2. Right-click on the input field of "Red" channel and select "Copy as New Driver".
    3. Press Tab to jump into the group. Select color stop 1. Click on the "Color" field to open the color picker. Switch to the "RGB" mode. Right-click on the input field of "Red" channel and select "Paste Driver".
    4. Repeat step 1 to 3 for "Green", "Blue", and "Alpha" channels, too.
    Although I personally haven't tried it, this approach should also work for the "HSV" mode. The "Hex" mode, unfortunately, didn't work in my experiment.
    By directly controlling the original color ramp, the node tree in the group could be a little cleaner in my opinion.
    Again, thanks for your great tutorials, and have a nice day!
    * The comment has been edited to mainly fix some incorrect spellings and bad grammar. Sorry about that.

  • @TheDucky3D
    @TheDucky3D Рік тому +5

    This is insanely useful

  • @designfreedom3651
    @designfreedom3651 Рік тому +7

    This is awesome! It's one of those nodes that I always wished Blender had by default. Thank you Ryan!

  • @fahmiraza1763
    @fahmiraza1763 11 місяців тому +4

    Oh my God
    I don't know it's pro level or intermediate level lesson you explain like piece of cake
    Every tutorial make me stunt
    God bless you
    I just feel bad I can't help you financial just my blessing with you
    I really appreciate your work

    • @RyanKingArt
      @RyanKingArt  11 місяців тому +1

      Glad you like my videos! No worries, I know that not everyone can support financially. thanks for watching.

  • @DavidWinstead
    @DavidWinstead Рік тому +4

    Dang man, I had no idea you drag and drop colors, huge time saver!! Great tutorial as always.

    • @RyanKingArt
      @RyanKingArt  Рік тому +1

      Glad its helpful!

    • @tuxgirl
      @tuxgirl Рік тому +2

      You can also just hover the mouse over the color, hit ctrl-c, then hover over where you want it to go, and hit ctrl-v

    • @DavidWinstead
      @DavidWinstead Рік тому

      @@tuxgirl Thanks awesome, good to know, thanks!

  • @triple7evenn
    @triple7evenn Рік тому +3

    thank u so much for this tutorial, ive always wanted to know how to do this, but couldn't figure it out for the longest time 💯

  • @heiro5
    @heiro5 Рік тому +1

    Yes! I wanted to know how to do exactly this, and here you are, breaking down how to do exactly this. Thank you, Ryan!

    • @RyanKingArt
      @RyanKingArt  Рік тому +1

      hope you find it helpful!

    • @heiro5
      @heiro5 Рік тому

      @@RyanKingArt Dude! Sir!! Incredibly helpful. When I was teaching myself Maya like 20 years ago there weren't resources like the YT tut ecology. Something like this would have been a complete dead end "guess I don't do that" kind of thing. Truly, thank you.

  • @phildavison319
    @phildavison319 Рік тому +2

    Thanks for this and well done for figuring out how to control the actual colours from outside the color ramp. I tried using drivers to change the colours from outside the group but just got the graph editor thing. BTW, a quick note for anyone who hasn't controlled the positions before, you must copy the data path and not the full data path or it doesn't work.
    The driver technique works for any node with a variable which doesn't have an input (e.g. the four variables at the top of the brick texture or the depth field in the magic texture). However, as far as I am aware you can't control drop-down lists such as the gradient type in the gradient texture node in this way without resorting to Python.
    Finally, congratulations for managing to explain this so well in under half an hour!

  • @Noel_FGC
    @Noel_FGC Рік тому +1

    man why do i always find these videos like the day after i need them , seriously though this is ingenius thank you so much

  • @limdoha
    @limdoha Рік тому +1

    Really impressed! The details and creative combinations are amazing. Thanks a lot!

    • @RyanKingArt
      @RyanKingArt  Рік тому +1

      Glad you liked it! thanks for watching!

  • @blenderstuffs
    @blenderstuffs Рік тому +3

    Amazing 🤩🤩

  • @ralphedenbag4552
    @ralphedenbag4552 Місяць тому +1

    Very useful. Thanks a lot for the tip !

  • @charlesmayberry2825
    @charlesmayberry2825 Місяць тому

    I find that for Node Groups like this, this works fine for a material append, but for instance if you want a node group that uses different edge detection methods for edge wear like say a group (that I made for myself and use frequently) that has outputs for pointiness, AO, and Bevel Difference methods, using a color ramp with drivers set up this way becomes an issue, as you'd need to pop into the node group and select the new material for each of the 6 drivers involved, any time you include it in a new material. Instead the alternative worth considering is using a map range node the from min and from max operate the same as the position value on the color ramp, only not allowing you to select a color, which is fine when using color selection and mixing the way you do here, it saves a lot of effort setting up the drivers.
    That said, both solutions work, and in some cases, like the exact situation you're working with where it is material specific groups, your method is actually preferable, but I find that in a lot of instances it's worth considering a map range, and setting the group input to limit the float to a normalized float (0-1 for those that aren't familiar with the term)
    What I'm saying is I love the method, the video is informative for this use case, I just wanted to add a bit that depending on the use case there may be a more useful alternative that avoids having the material dependency. Useful for mask nodes, creating edge wear, scratch masks, grunge masks etc. It certainly can speed up the work flow if used correctly.

  • @moonkilig3234
    @moonkilig3234 Рік тому

    Thank you very much for this tutorial, I couldn't be more happy ! My friend who use Blender was Gatekeeping this system to make his cell shading :) Not anymore !!!

  • @fudge7534
    @fudge7534 Рік тому +2

    I really love your tutorials but sometimes I wish they could be a bit more streamlined and shorter
    However I must say thank you for your time and effort it's genuinely helped me out in my work

  • @stevemcclintock309
    @stevemcclintock309 Рік тому +1

    Awesome Tutorial Ryan, top class as always 👍

  • @bonecoseoutrascoisas-leiri1131

    Another great tutorial. Thanks!

  • @abraxasseven6212
    @abraxasseven6212 5 місяців тому

    excatly what i needed,thank you~!

  • @GaryParris
    @GaryParris Рік тому +1

    Excellent Ryan

  • @cm.shirown
    @cm.shirown Рік тому

    Thanks a lot ! Great video and explanations. It opens the doors to a lot of interesting things :)

  • @neyptune
    @neyptune Рік тому

    This is so helpful ! Amazing work thank you! :)

  • @DanielGrovePhoto
    @DanielGrovePhoto Рік тому

    Well looky there! Haha thanks for making a video for this.

  • @mattrowe2652
    @mattrowe2652 6 місяців тому +1

    Thanks

  • @iaian7
    @iaian7 Рік тому +3

    In my experience, drivers will break when duplicating or reusing a node group, but using Map Range instead of Color Ramp nodes would fix this; it has actual node inputs for the start and stop of the value ramp. No need for drivers at all.

    • @RyanKingArt
      @RyanKingArt  Рік тому +1

      👍‍

    • @timsob100
      @timsob100 5 місяців тому

      Yes, the reason is that you are using a different material that the one that you specified when creating the node group drivers. When you start a new material it will have the name 'material'. Drop in the node group from the asset browser, delete the BSDF and connect the node group to the materials output. Now if you go to where the materials name is at the top of the window and list the materials you will see the name of the material in the node group, click on it and it will work.
      Cheers
      Lyle

  • @cat9595
    @cat9595 Рік тому +2

    Hello sir I'm from Pakistan you are my best teacher ❤️ I love you

  • @titanmoruma5834
    @titanmoruma5834 5 місяців тому +1

    Drivers are preserved between apended scenes?
    all time i create drivers to control, they are not transferred to other scenes.
    Again i love your tutorials

  • @uncommongamers
    @uncommongamers Рік тому

    Oh.....!
    It’s the super colour ramp

  • @belayarada3235
    @belayarada3235 11 місяців тому +1

    wow🤩

  • @atenoct
    @atenoct Рік тому +1

    Thank you for the lifehack))😅

  • @ghostwarrior-ni1xb
    @ghostwarrior-ni1xb Рік тому

    amazing

  • @Tiki_Media
    @Tiki_Media Рік тому +1

    Delightfully over my head, now it's just at forehead level, causing it to hurt; in a good way :-) Thanks for the added depth by moving into drivers and data paths! I found it helped to go back into the group node and in the Group tab > Inputs, set the Min. value to "0" and the Max. value to "1", so when you control the Color X Positions from outside the node, you don't "spin" the controller into crazy negative and positive values, since the control is so sensitive.
    Is there a math node, or adjustment that could be made within the driver, to make the controller less coarse and finer increments, without having to hold the shift key?

    • @RyanKingArt
      @RyanKingArt  Рік тому +2

      Thanks for the tip with the Min and Max values! That makes it much easier to use! 👍‍ Yes, I think that is possible with some math nodes. Can't think off the top of my head how to do it though.

    • @bonecoseoutrascoisas-leiri1131
      @bonecoseoutrascoisas-leiri1131 Рік тому

      @@RyanKingArt It's possible. I know I did it some time ago, but I don't remember how and can't find the file. But, you can make the slider range (it's 0 to 1) bigger, like: 0 to 1000 and, inside the group, multiply the input valu by 1000. Just rename the slider to something like "Color x Position (/1000)". It works. Not pretty, but easy.

  • @cncpts66
    @cncpts66 2 місяці тому

    Hey Ryan is there a way to do this with the "image texture node" allowing you to place the image selection on the outside?

  • @beyond9thousand
    @beyond9thousand 9 місяців тому

    is there a way to keep this consisten between separate materials? i am trying to come up with something for soft box lighting setup

  • @xolotltolox7626
    @xolotltolox7626 Рік тому

    This tutorial is greatly appreciated, but blender really needs to simplfiy stuff liek this so such an elaborate setup is not required

    • @RyanKingArt
      @RyanKingArt  Рік тому +1

      Yeah Agreed. The Color Ramp could just be updated so that it has inputs for all of the colors and positions.

  • @einselkampfer4387
    @einselkampfer4387 3 місяці тому

    you can export this proyect to .obj and, you see all texture right? i have this problem....

  • @StefanoOrlando_s
    @StefanoOrlando_s 9 місяців тому

    hi, i have a problem, when i duplicate the node group, the copy dont work..

  • @BenRidgwayArt
    @BenRidgwayArt Рік тому

    Hey Ryan, I noticed this technique does not work in version 3.6. It seems that the color shows up in the node group but does not respond to changing the color. Is there another method for this new version of Blender?

    • @BenRidgwayArt
      @BenRidgwayArt Рік тому

      Lol, right after typing this I tried again and it works :) Thanks for all the work you put into these videos! You have a great way of explaining things!

    • @RyanKingArt
      @RyanKingArt  Рік тому

      Oh glad its still working!

  • @Aniversity
    @Aniversity Рік тому +1

    I’m curious. Are your materials available for commercial use? And if so, would we need to credit you for creating them?

    • @RyanKingArt
      @RyanKingArt  Рік тому +1

      Yes, you can use them for commercial use, and no, you don't have to credit me.

    • @RyanKingArt
      @RyanKingArt  Рік тому

      On Blender Market, you can read more about the license on the License page.

    • @Aniversity
      @Aniversity Рік тому +1

      Thank you.

  • @stephanechataignie
    @stephanechataignie Рік тому +2

    Knowing that "map range" node is identical to colorramp but with more control, it is useless to go through dark data paths

  • @cekconi1773
    @cekconi1773 Рік тому +1

    👍👍👍

  • @Slickstaff_Stainpants
    @Slickstaff_Stainpants Рік тому

    Maya has a Switch node just for this
    Im surprised Blender doesnt have it already

  • @shadow_animates898
    @shadow_animates898 Рік тому +1

    1

  • @joelkowalski6869
    @joelkowalski6869 Рік тому +1

    Drink every time he says color

  • @AyushBakshi
    @AyushBakshi 6 місяців тому

    blender devs gotta be dum dums to not already have controllable ramps

    • @RyanKingArt
      @RyanKingArt  6 місяців тому +1

      yeah it would be a nice feature to have in Blender