Materials: Changing a Value WITHIN a Group Node?

Home Forums Graphics / Blender Materials: Changing a Value WITHIN a Group Node?

This topic contains 13 replies, has 4 voices, and was last updated by Ivan Lyubovnikov Ivan Lyubovnikov 2 weeks, 3 days ago.

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #21082
    GlifTek
    GlifTek
    Licensee

    hi
    i need to change the opacity of many objects at once.
    so i put a COPY of a group node that changes the opacity of whatever material it’s used in, at the end of every object’s material’s node chain.
    So it’s controlled from an object with the group node in it, separate from all the objects.

    how can i get the “set value in material” puzzle to see the value node within the group in order to change it?

    thanks.

    • This topic was modified 2 weeks, 5 days ago by GlifTek GlifTek. Reason: Edited for better understanding for posterity
    #21089

    You can use set value puzzle for this.

    Co-founder and lead graphics specialist at Soft8Soft.

    #21095
    GlifTek
    GlifTek
    Licensee

    You can use set value puzzle for this.

    Well that’s what I am using.
    Do I need to do something specific to tell it that the value node that I’m setting, is WITHIN a group node in the material?

    #21096

    Do I need to do something specific to tell it that the value node that I’m setting, is WITHIN a group node in the material?

    No.

    Co-founder and lead graphics specialist at Soft8Soft.

    #21104
    GlifTek
    GlifTek
    Licensee

    Is there any known reason why this wouldn’t be working?

    #21109

    Hi GlifTek,
    Actually, right now there’s a bug with node groups which can happen for some node setups.

    For example, it won’t work if you link a Value node directly to the group output:
    value_node.png

    As a workaround you can link it to some other node (e.g. Math/Add with zero value) and then to the output:
    value_fixed.png

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

    Co-founder and lead developer at Soft8Soft.

    #21119
    GlifTek
    GlifTek
    Licensee

    Haha!
    I HAD that! /facepalm/
    I had taken it out to “simplify” unneeded nodes.
    Thanks!!

    #21121
    Yuri Kovelenov
    Yuri Kovelenov
    Developer

    :good:

    3D Verger, the CEO
    LinkedIn | FB | Twitter | VK | 新浪微博

    #21131
    GlifTek
    GlifTek
    Licensee

    It’s crazy, because before resizing this very useful technique (which I think should be incorporated somehow in puzzles since it’s most likely going to be used widely)…
    I had spent a good couple weeks doing it in a very arduous manner, charting each material as it’s own dictionary value, with some complex conditionals to designate how ALL materials (every object) EXCEPT a certain focused object…gets opacity faded to 0…

    Now, with using this technique, if an EXTRA transparency/math(multiply)/value node group that circumvents whether the MASTER opacity group(post topic)… As to how I can designate which “focused” object is deemed to be omitted from the overall opacity control.
    This way helps SO much, so many issues avoided.
    :good:

    #21133
    Yuri Kovelenov
    Yuri Kovelenov
    Developer

    great it helped! :good:

    3D Verger, the CEO
    LinkedIn | FB | Twitter | VK | 新浪微博

    #21144
    GlifTek
    GlifTek
    Licensee

    ok.. bad news.
    I had written that last post prematurely without having gone back to the project and testing it.
    I’ve spent the day trying out every possible thing that may be wrong here and haven’t gotten it to work.
    I went ahead and recreated the basic setup in a default scene, still no dice.

    Here’s a zip of the default test project. (LINK)
    (If someone could take a look at it, that would be fantastic!)

    An invisible cube “Cube.Master_Opacity_Control” holds the material “Cube.Master_Opacity_Control_Material” which has the “Master_Opacity_Group” group in it that’s used to control the opacity of the 3 visible cubes, each with their own materials.
    The Value in the node group to be changed is “MasterOpacity”.

    I have the puzzles set to have the “MasterOpacity” value change to 0 when anything is clicked, which does not happen.
    If the value is set to 0 in Blender, however.. it gets the desired result.

    guess i celebrated success a bit too soon with this one…
    :-(

    any help would be fantastic!
    thanks!

    blender 2.8
    verge3d Version 2.16.0
    latest firefox
    windows 8.1

    • This reply was modified 2 weeks, 3 days ago by GlifTek GlifTek.
    • This reply was modified 2 weeks, 3 days ago by GlifTek GlifTek.
    #21151
    GlifTek
    GlifTek
    Licensee

    I also attempted to use a driver to control all the objects’ material’s opacity, but I assume those are not supported yet.

    One other thing is that one of my configurations with drivers had used an object’s Custom Property.
    This brought up another issue, that when I went to assign a variable, a dictionary through the “get custom property” puzzle, then print it to console, but that came up empty.
    Wondering if that element of Verge 3d had changed in the new release?….

    #21155

    I have the puzzles set to have the “MasterOpacity” value change to 0 when anything is clicked, which does not happen.

    The puzzle “set value in material” doesn’t work like that because, despite sharing the same node group in Blender and reacting to the changes at once, these materials are handled separately in the engine. You need to specify a particular material, e.g. “cube_material.001”, “cube_material.002”, etc… to make changes to them.

    So, for now it requires to list all objects or materials which you want to apply changes for, for example via the “create list with” and the “for each item in list” puzzles.

    Also, in the test project you can change the puzzle setup to the following to make it work:
    puzzles.png

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

    Co-founder and lead developer at Soft8Soft.

    #21160

    This brought up another issue, that when I went to assign a variable, a dictionary through the “get custom property” puzzle, then print it to console, but that came up empty.
    Wondering if that element of Verge 3d had changed in the new release?….

    This can be a bug, if you don’t mind I replied in this thread regarding that issue: retreiving Custom props not working

    Co-founder and lead developer at Soft8Soft.

Viewing 14 posts - 1 through 14 (of 14 total)

You must be logged in to reply to this topic.