<div dir="ltr">ah, sorry if I mentioned a constant examples, other examples can be max is not constant &quot;unknown&quot;.</div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jun 11, 2016 at 9:20 AM, gandalf3 <span dir="ltr">&lt;<a href="mailto:zzyxpaw@gmail.com" target="_blank">zzyxpaw@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <p>If I&#39;m not mistaken, in such a case as you describe (where the
      max is a known constant and the min is 0), all that&#39;s needed is a
      single division math node.</p>
    <p>It&#39;s worth noting that a normalize node like the compositor has
      would also cover this use-case (and other, <a href="http://blender.stackexchange.com/q/34582/599" target="_blank">more complex
        situations</a> as well)<br>
    </p><div><div class="h5">
    <br>
    <div>On 06/11/2016 12:03 AM, Mohamed Sakr
      wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">@ gandalf3, well, consider any thing like particle
        radius or particle index, it ranges from 0 to a value &gt; 1<br>
        with a node like this, you can remap the values of all particles
        to 0-1, which will help the user use color ramp more efficiently
        &quot;as he knows that the range is 0-1, not by trial and error
        testing..&quot;<br>
        <br>
        same for any other texture, like volume textures that got values
        &gt; 1, remapping them would be handy.<br>
        @ carlo, your range mapping is more general, my idea is more
        toward a normalize node &quot;that takes a texture and normalize to
        the texture max value&quot;.</div>
      <div class="gmail_extra"><br>
        <div class="gmail_quote">On Sat, Jun 11, 2016 at 6:18 AM,
          gandalf3 <span dir="ltr">&lt;<a href="mailto:zzyxpaw@gmail.com" target="_blank">zzyxpaw@gmail.com</a>&gt;</span>
          wrote:<br>
          <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div bgcolor="#FFFFFF" text="#000000">
              <p>This is doable with a node group, but a built in node
                to match the compositor would be nice.</p>
              <p>However, what can&#39;t be done with a node group is a
                *normalize* node (like the compositor), as this requires
                calculating the min and max values, which AFIAK can&#39;t be
                done with math nodes. How feasible would it be to
                implement such a node?<br>
              </p>
              <div>
                <div> <br>
                  <div>On 06/10/2016 07:21 PM, Mohamed Sakr wrote:<br>
                  </div>
                </div>
              </div>
              <blockquote type="cite">
                <div>
                  <div>
                    <div dir="ltr">Hi,<br>
                      <br>
                      is there a range mapping math node in Cycles?<br>
                      consider a texture input &quot;or any attribute&quot;, it is
                      an array of data, ranging [start, end], this node
                      will do a pre-calculation to a new texture using
                      the required range [newStart, newEnd].<br>
                      <br>
                      this will help a lot.<br>
                      I can do it, just need a hint on: where to write
                      the new functions &quot;which files/functions that are
                      related to writing a new node&quot;.<br>
                      <br>
                      and any suggestions would be helpful.<br>
                      <br>
                      cheers,<br>
                      Mohamed Sakr</div>
                    <br>
                    <fieldset></fieldset>
                    <br>
                  </div>
                </div>
                <pre>_______________________________________________
Bf-cycles mailing list
<a href="mailto:Bf-cycles@blender.org" target="_blank">Bf-cycles@blender.org</a>
<a href="https://lists.blender.org/mailman/listinfo/bf-cycles" target="_blank">https://lists.blender.org/mailman/listinfo/bf-cycles</a>
</pre>
              </blockquote>
              <br>
            </div>
            <br>
            _______________________________________________<br>
            Bf-cycles mailing list<br>
            <a href="mailto:Bf-cycles@blender.org" target="_blank">Bf-cycles@blender.org</a><br>
            <a href="https://lists.blender.org/mailman/listinfo/bf-cycles" rel="noreferrer" target="_blank">https://lists.blender.org/mailman/listinfo/bf-cycles</a><br>
            <br>
          </blockquote>
        </div>
        <br>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      <pre>_______________________________________________
Bf-cycles mailing list
<a href="mailto:Bf-cycles@blender.org" target="_blank">Bf-cycles@blender.org</a>
<a href="https://lists.blender.org/mailman/listinfo/bf-cycles" target="_blank">https://lists.blender.org/mailman/listinfo/bf-cycles</a>
</pre>
    </blockquote>
    <br>
  </div></div></div>

<br>_______________________________________________<br>
Bf-cycles mailing list<br>
<a href="mailto:Bf-cycles@blender.org">Bf-cycles@blender.org</a><br>
<a href="https://lists.blender.org/mailman/listinfo/bf-cycles" rel="noreferrer" target="_blank">https://lists.blender.org/mailman/listinfo/bf-cycles</a><br>
<br></blockquote></div><br></div>