Results 1 to 14 of 14

Thread: Multi-mixer Node?

  1. #1
    Exporter of Fine Polygons Psyhke's Avatar
    Join Date
    Feb 2003
    Location
    USA
    Posts
    387

    Multi-mixer Node?

    I'm wondering if anyone knows of a node that is essentially like the native Mixer node, but has multiple inputs (for Color at least). It would be great to quickly attach 3 or 4 color outputs into one node, rather than adding multiple Mixer nodes and chaining them together.

    If it doesn't exist..maybe some brilliant person can cook one up in the lab?

    I understand there would be choices to be made, such as how do the 4 layers get mixed? In what order? Etc. But even something as simple as mixing all the inputs evenly would be useful. One could also go nuts and start adding mixing, opacity, layer order options. But let's not get ahead of ourselves.
    Hey, who likes cupcakes!!?

  2. #2
    Super Member
    Join Date
    Feb 2003
    Location
    Hamburg
    Posts
    1,571

  3. #3
    Exporter of Fine Polygons Psyhke's Avatar
    Join Date
    Feb 2003
    Location
    USA
    Posts
    387
    Quote Originally Posted by dee View Post
    No I hadn't seen that one. Thanks for the link. It's close to what I'm looking for, in that it also can mix colors even though it was made for vectors, but the 4 foreground/background inputs are independent of each other. Each has it's own independent output, with no mixing (between 1 thru 4).
    Hey, who likes cupcakes!!?

  4. #4
    aka Ken9 DuneBoy's Avatar
    Join Date
    Sep 2005
    Location
    Los Angeles, CA
    Posts
    280
    Quote Originally Posted by Psyhke View Post
    ...it also can mix colors even though it was made for vectors...
    Internally Colors and Vectors are the same thing, an array of 3 floats. And because the Normal and Bump inputs on the Surface node only accept Vector inputs (which is lame and unneeded) I usually use a Vector output on the nodes I write.

    A Multi-Mixer node should be fairly easy to do. In fact, as I started this reply it occurred to me that I had written (but never released) a Comp Layers node which is somewhat similar. When I get a chance I'll check the code and release it. Right now I'm busy trying to port Jovian to the Mac.
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	CompLayers.png 
Views:	361 
Size:	20.2 KB 
ID:	71322  
    Last edited by DuneBoy; 03-20-2009 at 05:51 PM. Reason: corrected to say: only accept Vector inputs
    Ken Nign

  5. #5
    Exporter of Fine Polygons Psyhke's Avatar
    Join Date
    Feb 2003
    Location
    USA
    Posts
    387
    Quote Originally Posted by DuneBoy View Post
    Internally Colors and Vectors are the same thing, an array of 3 floats. And because the Normal and Bump inputs on the Surface node only accept Color inputs (which is lame and unneeded) I usually use a Vector output on the nodes I write.

    A Multi-Mixer node should be fairly easy to do. In fact, as I started this reply it occurred to me that I had written (but never released) a Comp Layers node which is somewhat similar. When I get a chance I'll check the code and release it. Right now I'm busy trying to port Jovian to the Mac.
    Wonderful! I would find that very useful. Can't wait to try it out.

    Regarding vector input/output versus color. Would there ever be a case that is the reverse of the Normal/Bump surface inputs situation? Such that a color input would needlessly disallow a vector input?

    EDIT: Oh, are you the creator of Jovian? Well, now you're going to make me go get the full version. (I wanted the swatch library stuff anyhow).
    Last edited by Psyhke; 03-20-2009 at 05:55 PM.
    Hey, who likes cupcakes!!?

  6. #6
    aka Ken9 DuneBoy's Avatar
    Join Date
    Sep 2005
    Location
    Los Angeles, CA
    Posts
    280
    Quote Originally Posted by Psyhke View Post
    Regarding vector input/output versus color. Would there ever be a case that is the reverse of the Normal/Bump surface inputs situation? Such that a color input would needlessly disallow a vector input?
    I edited my post, I meant to say the Normal/Bump only accept Vector input.

    But anyways, I know of no instance where a Color won't accept a Vector input. A node's author can decide to have his node's inputs reject anything he wants. But when the internal data type is the same there wouldn't really be a reason.

    I could see rejecting input where the data is different, like connecting a Function node into a Color input. Which will connect although I don't think it'll do anything.

    A node of mine you may want to play with is called Input Spy:
    http://www.lwplugindb.com/Plugin.aspx?id=c793077b
    It'll show you the values that a node is sending out. You can use it to see the color representation of a Vector, or by connecting a color into the Vector input you can see the internal floating point values of a color.

    Yep, I wrote Jovian. I just got your PM.
    Last edited by DuneBoy; 03-20-2009 at 06:13 PM. Reason: Addressed edit
    Ken Nign

  7. #7
    Exporter of Fine Polygons Psyhke's Avatar
    Join Date
    Feb 2003
    Location
    USA
    Posts
    387
    I just ran across the Input Spy recently when searching for a mulitmixer node. Would have been REALLY useful if I knew about it when first starting off with nodes. By now, I pretty much know what sort of data is going in and out of inputs. Still handy to have around though!

    So while it's possible in theory that a color input may block a vector type, one could always work around that case by pre-converting the vector to color (output type) with another node, I suppose.
    Hey, who likes cupcakes!!?

  8. #8
    aka Ken9 DuneBoy's Avatar
    Join Date
    Sep 2005
    Location
    Los Angeles, CA
    Posts
    280
    Quote Originally Posted by Psyhke View Post
    So while it's possible in theory that a color input may block a vector type, one could always work around that case by pre-converting the vector to color (output type) with another node, I suppose.
    Correct, that's the same maneuver that's used when connecting the regular color Mixer node into the Normal or Bump inputs. You just connect the Color output into a Vector Add (leaving input B zeroed out) then connect the Vector output into the Normal or Bump.

    I did a quick check and it's possible to convert a Vector connection into a Color output using the ColorTool node. It has a color input but it doesn't reject Vector connections.

    I could've written a node that would convert a Color connection to a Vector without the needless addition of 0.0 that the Vector Add does. But instead I chose to just re-implement the Mixer node using Vectors instead.
    Ken Nign

  9. #9
    Exporter of Fine Polygons Psyhke's Avatar
    Join Date
    Feb 2003
    Location
    USA
    Posts
    387
    Quote Originally Posted by DuneBoy View Post
    Correct, that's the same maneuver that's used when connecting the regular color Mixer node into the Normal or Bump inputs. You just connect the Color output into a Vector Add (leaving input B zeroed out) then connect the Vector output into the Normal or Bump.

    I did a quick check and it's possible to convert a Vector connection into a Color output using the ColorTool node. It has a color input but it doesn't reject Vector connections.

    I could've written a node that would convert a Color connection to a Vector without the needless addition of 0.0 that the Vector Add does. But instead I chose to just re-implement the Mixer node using Vectors instead.
    Good to know about the ColorTool node.

    You know, I've always just stuck with bump/normal outputs. And sometimes DPonts bump-to-normal node. I'm wondering now, in cases where you want to try using a color-based node that doesn't have a native bump or normal output, if simply converting it using Add or the ColorTool will give an appropriate effect when using it to drive the bump/normal surface input. I'll have to do some experimentation.
    Hey, who likes cupcakes!!?

  10. #10
    aka Ken9 DuneBoy's Avatar
    Join Date
    Sep 2005
    Location
    Los Angeles, CA
    Posts
    280
    Quote Originally Posted by Psyhke View Post
    Good to know about the ColorTool node.

    You know, I've always just stuck with bump/normal outputs. And sometimes DPonts bump-to-normal node. I'm wondering now, in cases where you want to try using a color-based node that doesn't have a native bump or normal output, if simply converting it using Add or the ColorTool will give an appropriate effect when using it to drive the bump/normal surface input. I'll have to do some experimentation.
    To use a regular color node output as a Bump or Normal input, it may need to go though some conversions. The Bump and Normal inputs are meant to be fed data that will tell LW how to shade the surface (the direction of the surface normals I believe).

    In the layered system grayscale data could be used to bump the surface, but feeding black and white data into the Bump input won't give the same results.

    If you load an image into an Image node then right click the node and change the Preview to Bump you can see the difference in the way the data looks.

    DPont has a Scalar Bump node which can convert a scalar into the proper bump data. You can connect a color node into this node's Scalar input which in essence converts the color values to grayscale before making the translation to bump data.
    Ken Nign

  11. #11
    Exporter of Fine Polygons Psyhke's Avatar
    Join Date
    Feb 2003
    Location
    USA
    Posts
    387
    Quote Originally Posted by DuneBoy View Post
    DPont has a Scalar Bump node which can convert a scalar into the proper bump data. You can connect a color node into this node's Scalar input which in essence converts the color values to grayscale before making the translation to bump data.
    ...and then the bump data into normal using his other node, if desired. So, the tools are all there to go from Color to Normal. Hmm. Sounds like another node: Color-to-Normal.

    Also, the bump and normal inputs expecting directional data makes sense, and explains the need for the above nodes.
    Hey, who likes cupcakes!!?

  12. #12
    aka Ken9 DuneBoy's Avatar
    Join Date
    Sep 2005
    Location
    Los Angeles, CA
    Posts
    280
    I've posted my Comp Layers node here:
    http://www.lwplugindb.com/Plugin.aspx?id=48331837

    A couple changes were made versus the unreleased version. It now supports 6 layers instead of 10, both the node and its panel were a bit too big with 10. Each layer now also has an envelopable Opacity control.
    Ken Nign

  13. #13
    Exporter of Fine Polygons Psyhke's Avatar
    Join Date
    Feb 2003
    Location
    USA
    Posts
    387
    Thanks. Taking it for a spin now!
    Hey, who likes cupcakes!!?

  14. #14
    DuneBoy: Was just looking for exactly that kind of node - thanks!

    Works fine in 11.5 x64

    Cheers,

    Tom

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •