Don't Guess! The Map Range Node Visualized in Blender

Поделиться
HTML-код
  • Опубликовано: 4 авг 2024
  • The Map Range node is one of the most helpful utility nodes for procedural texturing in Blender's shader editor! In this Blender tutorial, learn how to use Map Range without guessing:
    The Map Range Node Visualized in Blender
    [0:40] Let's look at an example!
    [2:15] Trying out 'to' values
    [4:35] Looking at 'from' values
    [5:30] What is 'clamping'?
    [6:30] Practicing with different values
    [7:45] Get the download file
    cgcookie.com/lesson/bonus-und...
    Watch the full course 'Fundamentals of Texturing in Blender" on CG Cookie cgcookie.com/course/fundament...
    "WHO IS CG COOKIE?"
    We are real people! (OK, maybe some of us are cyborgs - we don't ask.)
    CG Cookie is a small crew of Blender artists, baking fresh videos for the Blender community.
    ❤️ If you love what we do, please support us by getting a membership at www.cgcookie.com (That's how we can afford to pay our bills..and coffee. We need lots of it.)
    "WHERE SHOULD I START LEARNING BLENDER?"
    For Blender beginners, we have a free tutorial series "Getting Started with Blender" bit.ly/36xCDVJ
    "I WANT MORE CG COOKIE IN MY LIFE!"
    Got it. Here's where you can reach us!
    / cgcookie
    / cgcookie
    / cgcookieinc
    Want Blender news in your mailbox?
    Sign up here for spam-free newsletter cgcookie.com/newsletter
    #CGCookie #blendertutorial #b3d

Комментарии • 77

  • @kebrus
    @kebrus 3 года назад +58

    I want to point out two small mistakes and one important omission on the video.
    I know you said the visualization wasn't completely correct but I still think it's worth pointing out that the drivers setup and explanation lead into a math mistake. The first mistake is at around 5:00, you say how by having the "From Max" at 0.5 makes the input max value (which is at 1 in the example) turn into 1.5. This is wrong, it's exactly 2. I didn't checked the drivers setup to see what is wrong with it but most likely the math is wrong there. The way that node works means that a value range of [0, 0.5] becomes [0, 1] which means that by extrapolating the range [0, 1] should go exactly to [0, 2].
    The second issue is with the clamp explanation. Clamp does not limit the value between 0 to 1 and it doesn't has anything to do how the principle BSDF or stuff like that. Clamp limits the output to the "to min" and "to max" values, so it happens at that point in time in the explanation the values are indeed 0 and 1, but if values were -1 and 2 it would clamp to those instead so you could still mess up any other following node configuration by having values outside of the "allowed ones". The reason clamps is sometimes useful is related to my final point and critique of your omission.
    Finally, one omission is the explanation of the first parameter of the node, if you click on it is says "interpolation type" and throughout the whole video you have it at "linear". Interpolation is a math operation where you guess the "inbetween" values of something using a mathematical equation. And linear is just the type of equation used, linear here means that values travel from and to, well... linearly, if you want to picture this using this video example it would mean that you would connect the from and to, min and max value with a straight line, not with a curve, in fact, one of the options in the interpolation type list is "smooth step" which uses a hermite interpolation equation which actually resembles the curve the video shows. So basically throughout the whole video you are showing a preview of the operation more closely resembling the smooth step type while having the node and actual texture preview using the linear mode. And the reason I said this was related to my second point is because the math being done here can actually calculate the value outside of the provided range, this is called "extrapolation", so by having clamp turned off imagine having the blue curve continue in whatever direction it was before reaching the "to" values which sometime leads to unwanted results, that's when clamp comes in hand.
    my two cents, the video is still good helping explaining visually what the node does, I just wanted to share these corrections in case someone stumbles across issues with them
    cheers

    • @Edgard422
      @Edgard422 3 года назад +1

      I was wondering why the value just went up to 1.5 instead of 2, I was assuming he was right and that the node just "stretchs" everything between the range ("map range" made sense) and that it only offsets everything outside it. I was then confused when he told that the outside values were extrapolated, so I didn't know what to believe.
      I hope they can reupload this video with the correct explanation.

    • @zetsology
      @zetsology 3 года назад +2

      Sounds logical. In your opinion, what is the best place to start learning math again, online, and at the same time understand how to apply it in Python and maybe even nodes? I really feel like I have missed a lot or at least forgot a lot. Thanks.

    • @cg_cookie
      @cg_cookie  3 года назад +17

      Thank you for the thorough corrections! You are right - my equation for the drivers was incorrect. I may reupload with corrections in the future, but in the meantime I'll pin this comment so that it's the most visible.

    • @kebrus
      @kebrus 3 года назад +4

      @@zetsology I'm not a good person to give such information, I know this stuff because I learned how to code my own shaders and then later on applied that to more complex situation, more specially in creating node based editors. In those two environments linear interpolation is actually very common so my eye is "trained" to it, hence why I noticed the issues in the video. There's a ton of good information online about shaders and about python however something specific like you want seems more difficult, at least to me.
      If would give any advice it would be to start a small project (1 or 2 weeks of time) and research everything you need for it. Just the act itself will set you in the path of getting the information and knowledge you seek, you can then move on to something progressively more complex.
      not sure if this helps in any way :\

    • @zetsology
      @zetsology 3 года назад

      @@kebrus thanks for taking time to answer. Take care.

  • @diegopadovani4942
    @diegopadovani4942 3 года назад +4

    I am mesmerized how you made the realtime graph... amazing.

  • @lightmanleaf3761
    @lightmanleaf3761 3 года назад +1

    I have been puzzled by this node for a long time. You saved me!

  • @user-sp9yg5jk3m
    @user-sp9yg5jk3m 9 дней назад

    Thank you for this cool lesson and for this beatiful visual demostration

  • @husainbadi8333
    @husainbadi8333 3 года назад +3

    dang this is a good video! the presentation make it a lot easier to understand!

  • @hamishmctiaigh4363
    @hamishmctiaigh4363 Год назад

    Brilliant explanation mate, thank you!

  • @richard29sher
    @richard29sher 3 года назад

    a great illustration of this node.

  • @martinconstable5911
    @martinconstable5911 Год назад

    Excellent work!

  • @brk5590
    @brk5590 Год назад

    Great explanaition. Thanks

  • @ThadeousM
    @ThadeousM 2 года назад

    thank you mate, very clear.
    Map range reminds me of After Effects Linear Expressions

  • @sycomorah1380
    @sycomorah1380 Год назад

    Very useful! Thank you

  • @GenericInternetter
    @GenericInternetter 3 года назад +6

    I've been using Map Range for ages now, it is truly the most underrated node imo

  • @balinthonvari7723
    @balinthonvari7723 9 месяцев назад

    Thank you so much!

  • @ombra30
    @ombra30 6 месяцев назад

    really nice as visualizer. it's useful for me as i just started

  • @jerryhunter1114
    @jerryhunter1114 2 месяца назад

    Had to go back a few times, but def worth watching. Totally get it......mostly lol

  • @SnowInHere
    @SnowInHere 27 дней назад

    ahh, now I understand. thanks for making this video

  • @GerardMenvussa
    @GerardMenvussa 3 года назад +1

    First time I even hear of this node. When was it added? :o

  • @usomat5447
    @usomat5447 3 года назад

    Hey Cookie-Team,
    im a citizen and i would like to build the rolls royce i see on the "Moving from 2.7 to 2.8" course. I couldnt find a course to model that car though. Can you help me out?

  • @InvasiveAlienPlants
    @InvasiveAlienPlants 3 года назад

    genius! I'm curious about a case that min value is bigger than max value. I saw someone use that values editing displacement in cycles

    • @cg_cookie
      @cg_cookie  3 года назад

      That will flip it and make the values appear inverted. It's a handy trick!

  • @johndc7446
    @johndc7446 3 года назад +3

    I guess it would be nice to have an optional 2 row map range node:
    FROM: (min:0.0 | max:1.0)
    TO: (min:0.0 | max:1.0)

    • @ian.ambrose
      @ian.ambrose Год назад

      Yeah the 2 rows is more intuitive than the 4 rows we have now.

  • @himoplayer1959
    @himoplayer1959 3 года назад +1

    If you have a random spots of 0 value like for example a voronoi texture ran into a greater than, how can you make it smoothly transition between the black value to white?

    • @ColinPaddock
      @ColinPaddock 3 года назад

      Check the image in this link. I think you’ll find “smoothstep” is your friend.
      twitter.com/bartekmoniewski/status/1229063557330984960?s=21
      Also this: www.shadertoy.com/view/ldB3zc
      , and this: www.iquilezles.org/www/articles/smoothvoronoi/smoothvoronoi.htm

    • @himoplayer1959
      @himoplayer1959 3 года назад

      @@ColinPaddock thanks for the useful resources, but that is not exactly the issue I wanted to address.
      My question was if you have only 0 and 1 values without falloff in ununiform pattern, how could you create a falloff between them?

    • @cg_cookie
      @cg_cookie  3 года назад

      @@himoplayer1959 I don't really think you can, without getting pretty hacky. I sometimes cheat by taking the vector coordinates and linear light mixing a white noise texture to make it appear blurred.

    • @ian.ambrose
      @ian.ambrose 3 года назад

      @@himoplayer1959 Sorry for late comment, as you said there is only number 0 and 1 on the surface (because of the Greater Than's output), it means there is no other numbers between 0 and 1 (0.000...----> 0.9999...) available to create said fall off. And since they are not available, you will have to manually generate those ''fall off numbers'' to achieve the smooth transition effect.

  • @minhchauo1279
    @minhchauo1279 2 года назад

    Can i download this file

  • @darrenberkey7017
    @darrenberkey7017 2 года назад +1

    I must not be cut out for Blender stuff, because even when someone draws a picture for me on how something works, I still don't understand. 🤔

  • @wakegary
    @wakegary 2 года назад

    Thanks. I was guessing.

  • @FCR3399
    @FCR3399 2 года назад

    so im trying to import a map and while i zoom out it just goes gone

  • @Qu1_qu3_TTV
    @Qu1_qu3_TTV 8 месяцев назад

    hi i know a lot years have passed since the video, but how did u the interactive graph there? i would like to know how to do that to see real time math models like functions along the time and things like this in b3d if u can answer ill be gratefull best regards ty

    • @cg_cookie
      @cg_cookie  8 месяцев назад +1

      The secret is drivers! An example of that workflow is here: ruclips.net/video/O4FOUtCXogY/видео.html

    • @Qu1_qu3_TTV
      @Qu1_qu3_TTV 8 месяцев назад

      ty@@cg_cookie

  • @kayquecavoli6313
    @kayquecavoli6313 3 года назад

    What is use this?

  • @pseenazloy6409
    @pseenazloy6409 2 года назад

    What if you don't know your FROM values, and you want to compress this whole unknown range to 0...1 (not clamp, but compress)?

    • @ian.ambrose
      @ian.ambrose Год назад +1

      There's no way you don't know the From value, just observe the values. You actually don't have to input the correct From values, if you input any value, Map Range will register that value and start interpolating.

    • @pseenazloy6409
      @pseenazloy6409 Год назад

      @@ian.ambrose yes, I wasn't thinking enough

  • @allinoneentertainment7499
    @allinoneentertainment7499 3 года назад +6

    Hit me hard. If i understand a single word in this videoo...😭

    • @mcan-piano4718
      @mcan-piano4718 3 года назад +2

      I didnt understand too. I have a easier explanation for you :) Map range node is same as color ramp. Once I made color ramp node by using maths to expose inputs, so those 4 values actually illustrate, 1)blacks color intensity, white color intensity, the position of black color on color ramp and position of white color on color ramp.

    • @bzikarius
      @bzikarius 3 года назад +2

      No point to understand, explanation is wrong.

  • @cauanorbiato1713
    @cauanorbiato1713 4 месяца назад

    I cannot understanding anything reading blender documentation. This way is much more easier to understand, because I can visualize what happening.

  • @quanli3552
    @quanli3552 Год назад

    What if you don't know the bound of the data?

  • @sforzz
    @sforzz 3 года назад +2

    well, sound a bit strange)

  • @drumboarder1
    @drumboarder1 Год назад

    The shirt makes this a total comedy
    EDIT: invaluable but comedy nonetheless

  • @stefanocippone942
    @stefanocippone942 3 года назад +2

    Ok ok..i understand...no i can t

  • @Mike-Bell
    @Mike-Bell Год назад

    Base is crazy high. It was too overwhelming to finish waching

  • @wycliffe_ndiba
    @wycliffe_ndiba 3 года назад +2

    😂😂I feel targeted.

    • @cg_cookie
      @cg_cookie  3 года назад +1

      Lol that wasn't intended...much

  • @OnionAddiction
    @OnionAddiction 3 года назад

    Who's your favorite UFC fighter?
    EL CUCUY and BOBBY THE REAPER team represent!

  • @caribbeanchild
    @caribbeanchild 3 года назад

    No extrapolation there.... only transformation

  • @minhchauo1279
    @minhchauo1279 3 года назад

    I'm not CGC, someone helps me file, thanks

  • @sleepyreapy1222
    @sleepyreapy1222 2 года назад

    This dude look like tom Holland with a perm

  • @richedge8667
    @richedge8667 2 года назад

    The effort is much appreciated but your understanding of maths and Blender's nodes is advanced to the degree that your explanation isn't at all accessible to the beginner. It might have helped if you'd used a subdivision surface modifier on that square with the camera viewing it from an angle, like looking at a mountain. Then changed a few parameters so we can better see what they do. I searched for help with the Map Range Node, found this video and was hoping to find a solution to overly sharp edges at the highest points of the ridges of a planet terrain I'm making. Totally lost with this video, makes no sense to me at all but thanks anyway.

    • @ian.ambrose
      @ian.ambrose Год назад

      You definitely should learn some math if you really care about making model procedurally with computational accuracy. This video provides incorrect information but knowing maths beforehand would help.

  • @gradynelson
    @gradynelson 2 года назад +1

    the explanation itself is harder for someone who wants to understand the node and i mean this is really not the best idea trying to explain something to someone who didn't get it in the same logic they didn't get before.

  • @nspidel
    @nspidel 3 года назад +1

    Am I wrong in thinking this just seems like a more convoluted and less powerful curves node? It didn't seem like you did anything with this node that couldn't easily be done with curves in a much more intuitive way.

    • @ian.ambrose
      @ian.ambrose 3 года назад +1

      You can't set keyframes and animate with curve node. But you can with map range.

    • @nspidel
      @nspidel 3 года назад

      @@ian.ambrose ah!! Right, okay that makes perfect sense actually. Great observation.

  • @nightcandle9437
    @nightcandle9437 3 года назад

    UFC fight club

  • @ped-away-g1396
    @ped-away-g1396 2 года назад

    i didn't understand this node. now i still don't understand plus more confused than ever.

  • @handlesucks509
    @handlesucks509 Год назад

    Wrong. When from A~B to C~D,
    than A- =C, B+ =D.
    Not copy and paste.

  • @reubenrk3406
    @reubenrk3406 3 года назад +1

    First to comment kkkkk, now to watch video

  • @xnet-pvzok728
    @xnet-pvzok728 3 года назад +1

    Who was struggling with this? EZ

  • @murdocklesban6836
    @murdocklesban6836 3 года назад

    QUE MALO ERES EXPLICANDO