Announcement

Collapse
No announcement yet.

VRayHairNextMtl - changing materials via timeline

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

  • VRayHairNextMtl - changing materials via timeline

    Hi, is it possible to change materials via timeline in the VrayHairNextMtl material? I make fabric renders created with VrayFur. I need to automate switching via timeline so that the color of the material in VrayHairNextMtl changes on each frame. On regular materials, I have various materials connected to Multi/Sub-Object and on a given model I "record" a change to a different fabric using the Material modifier, unfortunately it doesn't work on VrayHairNextMtl, or I'm doing something wrong.

    https://drive.google.com/file/d/1_1L...usp=drive_link
    In the video I show what switching materials is all about.

    I would be grateful for any tips

  • #2
    Inside the VRayFur, there's a "MapID" option, which works similarly to the Material modifier you are using in the video. Use it instead.
    Aleksandar Hadzhiev | chaos.com
    Chaos Support Representative | contact us

    Comment


    • #3
      Thanks for the help, but unfortunately this method doesn't work. I know why now, because I render on GPU and therefore it doesn't change materials using MapID.
      It works with VRaySwitchMtl but only on regular VRayMtl, unfortunately not on VrayHairNextMtl.​

      Below is a recording of what it looks like:
      https://drive.google.com/file/d/1v4g...ew?usp=sharing

      Is there any other solution for this?

      Comment


      • #4
        Try using the 3ds Max native "Material Switcher" material - it should work as expected. Otherwise, I'll log both other issues for investigation.

        EDIT: Logged as internal tracker id: VGPU-6758 and VGPU-6759.
        Last edited by hermit.crab; 05-03-2025, 03:27 AM.
        Aleksandar Hadzhiev | chaos.com
        Chaos Support Representative | contact us

        Comment


        • #5
          It would be great if improvements could be made The option with the native Material Switcher works, but there is no option to record in the timeline.

          Comment


          • #6
            Huh, you're right. It seems 3ds Max doesn't allow the ID parameter to be keyed. The only workaround I see is rendering the animation manually through a script, where on frame change, the Material Switcher ID also changes. Here is a sample script:
            Code:
            fn MaterialSwitchKey =
            (
            startFrame = 0
            endFrame = 3
            for i = startFrame to endFrame do
            (
            rendTimeType = 1
            slidertime = i
            for each in sceneMaterials where classof each == Material_Switcher do (
            if startFrame == 0 then each.selection = (i + 1) else each.selection = i
            )
            max quick render
            )
            )
            try(MaterialSwitchKey())catch()​
            It syncs the Frame Number with the ID of all Material Switcher shaders in the scene. I can adapt it to work for selections if you prefer. Simply edit the startFrame and endFrame value and run.
            Aleksandar Hadzhiev | chaos.com
            Chaos Support Representative | contact us

            Comment

            Working...
            X