Announcement

Collapse
No announcement yet.

randomise sub-material by render/instance ID?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • randomise sub-material by render/instance ID?

    I'm looking for something that works like multisubtex for randomisation but at a shader level. The situation is I have a multisubmaterial on a load of different objects. For one of the sunmaterials I want to randomise it in to different materials.

    Is there something I can plug in to VraySwitchMtl that will pick up the individual scene IDs of instanced geomety (some of which are proxies)

    I could probably write some kind of script to do it with user info if I knew how, however I will need to be using those for another map selection that needs to be precise. The selection of this particular set of materials I would like to be random.

    Ideally this would be done at a shader level, rather than a map level as it'll make the process easier to manage, rather than matching up maps across a range of slots.


  • #2
    Alternatively, if I do have to use multiple VrayMultiSubTex, and give them the same random seed, would they select the respective maps between instances?

    Comment


    • #3
      One thing that I thought of is using a VRayUserScalar node for the Switch value and using this little script I wrote to assign a random value to a user property.

      EDIT: Updated script, since it was overriding existing User Properties. Fixed it.
      Attached Files
      Last edited by hermit.crab; 04-11-2022, 01:50 AM.
      Aleksandar Hadzhiev | chaos.com
      Chaos Support Representative | contact us

      Comment


      • #4
        Originally posted by hermit.crab View Post
        One thing that I thought of is using a VRayUserScalar node for the Switch value and using this little script I wrote to assign a random value to a user property.

        EDIT: Updated script, since it was overriding existing User Properties. Fixed it.
        Sounds amazing! That will definitely be useful in future. For this case I ended up setting it up with maps, I'll keep that script for future

        Comment

        Working...
        X