We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

Invert texture

Home Forums General Questions Invert texture

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #34777
    KurtGR
    Customer

    Hi, is there a simple way I can invert a black and white texture with puzzles, so I don’t need to have an extra texture loaded in the scene?

    Thanks!

    #34778
    jem
    Customer

    Hi @kagoshi,
    This is easy to do. Add an invert node to your shader on the diffuse channel. Tie a value node to its factor input. A value of 0 will leave your pattern unaffected. A value of 1 will invert it.
    Values node can be set from puzzles. In my example, clicking on the sphere causes the puzzles to set the invert value to 1.

    Attachments:
    You must be logged in to view attached files.

    Jeremy Wernick

    #34781
    KurtGR
    Customer

    Ah, I’m using Maya, not sure a node with a factor value exists

    #34782
    jem
    Customer

    @kogoshi, as long as the Maya version has a value node and math nodes, you can do this. The math is easy. I will assume that Maya uses a 0…1 scale for values.
    1. Get a value from the puzzles. The value must be 1 or 0. O indicates no-change. 1 indicates inversion.
    2. Subtract the diffuse value from the inversion value.
    3. Take the absolute value.

    Here is the node set up in Blender.

    Attachments:
    You must be logged in to view attached files.

    Jeremy Wernick

    #34827

    In Maya you can inverse colors with reverse node. We’re going to support it (as well as many other Maya utitily nodes) in the upcoming Verge3D pre-release.

    Soft8Soft Tech Chief
    X | FB | LinkedIn

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.